* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Mono', monospace;
    background: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* Main Menu */
#mainMenu h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

.currency-container {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1.1rem;
    background: #2a2a2a;
    padding: 0.5rem 1rem;
    border: 2px solid #444;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: right;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

button {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 2rem;
    background: #2a2a2a;
    color: #ffffff;
    border: 2px solid #444;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
}

button:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    transform: translateY(-2px);
}

/* Tank Builder */
#tankBuilder h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6b35;
}

.builder-content {
    display: flex;
    gap: 3rem;
    width: 90%;
    max-width: 1200px;
}

.component-selection {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.component-group h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #cccccc;
}

.component-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    padding-right: 10px; /* Space for scrollbar */
}

/* Custom scrollbar for component options */
.component-options::-webkit-scrollbar {
    width: 8px;
}

.component-options::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.component-options::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.component-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.component-btn {
    font-size: 1rem;
    padding: 0.8rem 1rem;
    min-width: auto;
}

.component-btn.locked {
    background: #222;
    color: #888;
    border-color: #333;
    cursor: pointer;
}

.component-btn.locked:hover {
    background: #333;
    border-color: #444;
}

.component-btn.selected {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #ffffff;
}

.component-btn.previewing {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.tank-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#previewCanvas {
    border: 2px solid #444;
    background: #2a2a2a;
}

#selectedComponentDetails {
    margin-top: 2rem;
    width: 100%;
    max-width: 300px; /* Align with tank-stats or adjust as needed */
    text-align: left;
    background: #2a2a2a;
    padding: 1rem;
    border: 2px solid #444;
}

.part-error-message {
    background-color: #ff4444;
    color: white;
    padding: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    border-radius: 4px;
    font-size: 0.9rem;
}

#selectedComponentDetails h3 {
    font-size: 1.2rem;
    color: #ff6b35;
    margin-bottom: 1rem;
    text-align: center;
}

.part-detail-group {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #444;
}

.part-detail-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.part-detail-group h4 {
    font-size: 1rem;
    color: #cccccc;
    margin-bottom: 0.4rem;
}

.part-detail-group div {
    font-size: 0.9rem;
    color: #afafaf;
    margin-left: 0.5rem;
}

.part-trivia-message {
    font-style: italic;
    font-size: 0.85rem;
    color: #999;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dotted #333;
}

.tank-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
}

.stat {
    font-size: 0.9rem;
    color: #cccccc;
    white-space: nowrap;
}

#backToMenu {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

#tierTooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    pointer-events: none;
    display: none;
    z-index: 10;
    transition: opacity 0.2s;
}

/* Wheel Screen */
#wheelScreen {
    gap: 1rem;
}

#wheelScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #ff6b35;
}

#wheelTicketsContainer {
    font-size: 1.2rem;
    margin-bottom: 0;
}

#wheelContainer {
    position: relative;
    width: 400px;
    height: 400px;
    margin-bottom: 0;
}

#wheelCanvas {
    border-radius: 50%;
    border: 5px solid #444;
}

#wheelPointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 30px solid #ff6b35;
    z-index: 10;
}

#wheelResult {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffc107;
    margin-bottom: 0;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.5);
    border-radius: 5px;
    min-height: 2.5rem;
}

.spin-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.spin-controls label {
    font-size: 1.2rem;
}

#spinCountInput {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    padding: 0.5rem;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    width: 80px;
    text-align: center;
}
/* Hide number input arrows */
#spinCountInput::-webkit-outer-spin-button,
#spinCountInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#spinCountInput[type=number] {
  -moz-appearance: textfield;
}

#spinBtn {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
}

#backToMenuFromWheel {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Black Market Screen */
#blackMarketScreen {
    gap: 1.5rem;
}

#blackMarketScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #ff6b35;
}

#blackMarketYenContainer {
    font-size: 1.2rem;
    color: #cda434;
}

#blackMarketItems {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #2a2a2a;
    padding: 1.5rem;
    border: 2px solid #444;
    min-width: 400px;
    max-height: 60vh;
    overflow-y: auto;
}

/* @tweakable Outline color for Black Market prototype items (orange by default) */
#blackMarketItems .market-item {
    border: 2px solid #ff8c00;
    box-shadow: 0 0 12px rgba(255,140,0,0.08);
    padding: 0.5rem;
    border-radius: 6px;
}

.market-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px dashed #555;
    padding-bottom: 1rem;
}

.market-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.market-item-info h4 {
    font-size: 1.2rem;
    color: #eee;
}

.market-item-info p {
    font-size: 0.9rem;
    color: #aaa;
}

.market-item button {
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
}

#backToMenuFromMarket {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Codes Screen */
#codesScreen {
    gap: 1.5rem;
}

#codesScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ff6b35;
}

.code-hint {
    background: #2a2a2a;
    border: 2px solid #4caf50;
    padding: 1.5rem 2rem;
    text-align: center;
    border-radius: 8px;
    max-width: 450px;
}

.code-hint h3 {
    color: #4caf50;
    margin-bottom: 0.5rem;
}

.code-hint p {
    color: #ccc;
    margin-bottom: 1rem;
}

.code-hint .code-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    background: #1a1a1a;
    padding: 0.5rem;
    border: 1px dashed #555;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.redeem-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#codeInput {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    padding: 0.8rem;
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
    width: 300px;
    text-align: center;
}

#redeemCodeBtn {
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
}

#redeemMessage {
    font-size: 1rem;
    height: 1.2rem; /* Reserve space to prevent layout shifts */
}

#backToMenuFromCodes {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Tech Tree Screen */
#techTreeScreen {
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    padding-top: 4rem;
}

#techTreeScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #ff6b35;
}

#expContainer {
    font-size: 1.4rem;
    color: #87ceeb; /* Light blue for EXP */
    background: #2a2a2a;
    padding: 0.5rem 1rem;
    border: 2px solid #444;
}

#techTreeContainer {
    width: 90%;
    max-width: 1000px;
    height: 70vh;
    overflow-y: auto;
    background: #222;
    border: 2px solid #444;
    padding: 1.5rem;
}

.nation-tree {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nation-tree h3 {
    font-size: 1.8rem;
    color: #ccc;
    border-bottom: 2px solid #444;
    padding-bottom: 0.5rem;
}

.tree-row {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.tree-node {
    border: 2px solid #555;
    background: #2a2a2a;
    padding: 1rem;
    min-width: 200px;
    text-align: center;
}

.tree-node.researched {
    border-color: #4caf50;
    background: #3a5a3a;
}

.tree-node.researchable {
    border-color: #87ceeb;
}

.tree-node h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tree-node p {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.tree-node button {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

#backToMenuFromTechTree {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Sets Screen */
#setsScreen {
    gap: 1.5rem;
    padding-top: 4rem;
}

#setsContent {
    background: #2a2a2a;
    padding: 2rem;
    border: 2px solid #ff6b35;
    width: 90%;
    max-width: 800px;
    min-height: 50vh;
    overflow-y: auto;
}

.set-card {
    border: 1px solid #444;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.set-header h3 {
    font-size: 1.8rem;
    color: #ff6b35;
}

.set-details p {
    margin-bottom: 0.5rem;
}

.set-progression {
    margin-top: 1rem;
    border-top: 1px dashed #444;
    padding-top: 1rem;
}

.set-progression-bar {
    width: 100%;
    height: 15px;
    background: #333;
    border: 1px solid #666;
    margin-top: 0.5rem;
    overflow: hidden;
}

.set-progression-fill {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease;
}

.set-tank-unlocks {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #555;
}

.set-tank-unlocks h4 {
    margin-bottom: 0.8rem;
    color: #ccc;
}

.set-tank-unlocks button {
    margin-right: 10px;
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
}

#backToMenuFromSets {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Crates Screen */
#cratesScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff6b35;
}

#cratesContainer {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
}

.crate-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.crate-item-visual {
    width: 120px;
    height: 100px;
    background-color: #8B4513; /* Brown crate color */
    border: 4px solid #5C2E0D;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: #D4AF37; /* Gold for tier text */
    text-shadow: 2px 2px 2px #000;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.crate-item-visual:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

.crate-item .crate-count {
    font-size: 1rem;
    color: #ccc;
}

#buyCratesContainer {
    margin-top: 3rem;
    text-align: center;
}

#buyCratesContainer.hidden {
    display: none;
}

#buyCratesContainer h3 {
    font-size: 1.5rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

#buyCratesContainer p {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
}

#buyCratesOptions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#buyCratesOptions button {
    min-width: 150px;
}

#crateRewardModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#crateRewardContent {
    background: #2a2a2a;
    padding: 2rem 3rem;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.4);
}

#crateRewardContent h3 {
    font-size: 1.8rem;
    color: #ff6b35;
    margin-bottom: 1rem;
}

#rewardPartName {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 2rem;
}

#backToMenuFromCrates {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Game Screen */
#gameScreen {
    justify-content: flex-start;
    align-items: stretch;
}

#gameUI {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.bar {
    width: 200px;
    height: 20px;
    background: #333;
    border: 1px solid #666;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.bar-label {
    font-size: 0.8rem;
    color: #ccc;
    margin-bottom: 0.2rem;
}

#ammoInfo {
    font-size: 0.9rem;
    color: #ccc;
}

#rocketInfo {
    font-size: 0.9rem;
    color: #ffc107; /* Orange color for rockets */
    margin-top: 4px;
}

#targetingInfo {
    font-size: 0.9rem;
    color: #ccc;
    text-transform: capitalize;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    background: #2d4a2d;
    display: block;
}

#pauseBtn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    min-width: auto;
    padding: 0.5rem 1rem;
}

#damageIndicators {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.damage-indicator {
    position: absolute;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff4444;
    animation: damageFloat 1s ease-out forwards;
    pointer-events: none;
}

@keyframes damageFloat {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

#mobileControls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 200;
}

#joystickZone {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    pointer-events: auto;
}

#fireBtn {
    position: absolute;
    bottom: 50px;
    right: 50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #ff6b35;
    border: none;
    color: white;
    font-weight: bold;
    pointer-events: auto;
}

#battleNotifications {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 101;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
}

.battle-notification {
    font-size: 1.5rem;
    font-weight: bold;
    animation: notificationFade 3s ease-out forwards;
}

@keyframes notificationFade {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(-20px);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px);
    }
}

#crewChatter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 150;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1.2rem;
    border-radius: 5px;
    color: #e0e0e0;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
    max-width: 80%;
    font-style: italic;
}

/* Mobile styles */
@media (max-width: 768px) {
    .builder-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    #mainMenu h1 {
        font-size: 2.5rem;
    }
    
    .component-options {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .component-btn {
        flex: 1;
        min-width: 100px;
    }
}

body.in-game {
    cursor: none;
}

/* Add these styles for the contracts screen */

#contractsScreen {
    gap: 1.5rem;
    padding-top: 4rem;
}

#contractsScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: #ff6b35;
}

#contractsContainer {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 90%;
    max-width: 800px;
    max-height: 60vh;
    overflow-y: auto;
}

.contract-item {
    background: #2a2a2a;
    border: 2px solid #444;
    padding: 1.5rem;
    border-radius: 8px;
}

.contract-item h3 {
    color: #ff6b35;
    margin-bottom: 0.5rem;
}

.contract-item p {
    color: #ccc;
    margin-bottom: 1rem;
}

.contract-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contract-progress-bar {
    flex: 1;
    height: 20px;
    background: #333;
    border: 1px solid #666;
    overflow: hidden;
    border-radius: 10px;
}

.contract-progress-fill {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease;
}

.contract-rewards {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #555;
}

.contract-rewards p {
    color: #D4AF37;
    font-weight: bold;
}

.contract-item button {
    margin-top: 1rem;
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
}

#backToMenuFromContracts {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

/* Contract Components Modal */
#contractComponentsModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}
#contractComponentsContent {
    background: #2a2a2a;
    border: 2px solid #444;
    padding: 1.25rem;
    width: 90%;
    max-width: 520px;
    border-radius: 8px;
    color: #fff;
}
#contractComponentsList {
    margin-top: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}
.contract-component-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0.5rem 0;
    border-bottom:1px dashed #3a3a3a;
}
.contract-component-row:last-child { border-bottom: none; }

/* Premium card outline for premium parts/tank cards */
.premium-card {
    border: 2px solid var(--premium-outline-color, #D4AF37); /* default gold/yellow */
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.12);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.18);
}

/* Prototype card outline for Black Market prototype parts shown in the Tank Builder */
.prototype-card {
    border: 2px solid var(--prototype-outline-color, #ff8c00); /* default orange */
    box-shadow: 0 0 12px rgba(255,140,0,0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.prototype-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255,140,0,0.18);
}

/* Purchased state style for General Market buttons */
.purchased-market-btn {
    background: #2a2a2a;
    border-color: #4caf50;
    color: #cfcfcf;
    cursor: default;
    opacity: 1;
}

#wheelRewardsModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}
#wheelRewardsContent {
    background: #2a2a2a;
    border: 2px solid #444;
    padding: 1rem 1.25rem;
    width: 90%;
    max-width: 520px;
    border-radius: 8px;
    color: #fff;
}
#wheelRewardsList {
    margin-top: 0.75rem;
    max-height: 60vh;
    overflow-y: auto;
}
.wheel-reward-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0.5rem 0;
    border-bottom:1px dashed #3a3a3a;
}
.wheel-reward-row:last-child { border-bottom: none; }

/* Crate open choice modal (reuses modal patterns) */
#crateOpenChoiceModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}
#crateOpenChoiceContent {
    background: #2a2a2a;
    border: 2px solid #ff6b35;
    padding: 1rem 1.25rem;
    width: 90%;
    max-width: 420px;
    border-radius: 8px;
    color: #fff;
}
#crateOpenChoiceContent input[type="number"] {
    background: #1a1a1a;
    border: 2px solid #444;
    color: #fff;
}
#crateOpenChoiceContent button {
    padding: 0.6rem 1rem;
    font-weight: 700;
    background: #2a2a2a;
    border: 2px solid #444;
    cursor: pointer;
}
#crateOpenChoiceContent button:hover {
    background: #ff6b35;
    border-color: #ff6b35;
    color: #000;
}

/* Progression tab (top-left) */
#progressionTab {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 220px;
    background: #2a2a2a;
    border: 2px solid #444;
    padding: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-radius: 6px;
    z-index: 2000;
}
#progressionLabel {
    font-size: 0.9rem;
    color: #ccc;
    min-width: 64px;
    text-align: left;
}
#progressionBar {
    flex: 1;
    height: 12px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    overflow: hidden;
}
#progressionFill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4caf50, #ffd700);
    transition: width 400ms ease;
}
#progressionPercent {
    font-size: 0.9rem;
    color: #fff;
    min-width: 42px;
    text-align: right;
}

/* Keep the tab unobtrusive on very small screens */
@media (max-width: 420px) {
    #progressionTab { width: 170px; padding: 6px; top: 0.6rem; left: 0.6rem; }
    #progressionLabel { display: none; }
    #progressionPercent { min-width: 36px; font-size: 0.85rem; }
}