body.coffee-clicker {
    background: linear-gradient(135deg, #2b1d14, #3b261a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5e6d3;
}

.game-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.35);
    padding: 2rem 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

h1 {
    margin-bottom: 1rem;
}

.counter {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* Offline summary (warehouse-driven) */
.offline-summary {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    opacity: 0.85;
    color: #d9c19a;
    font-style: italic;
    transition: opacity 0.4s ease;
}

.offline-summary.fade-out {
    opacity: 0;
}

/* Coffee click button */
#coffeeButton {
    font-size: 10rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.1s ease;
}

#coffeeButton:hover {
    transform: scale(1.1);
}

#coffeeButton:active {
    transform: scale(0.95);
}

.hint {
    opacity: 0.7;
    margin-top: 1rem;
}

/* Upgrades */
.upgrade {
    margin-top: 1.2rem;
}

.upgrade button {
    display: inline-block; /* natural width */
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    white-space: normal; /* safe wrapping if needed */
}

.upgrade button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-info {
    margin-top: 0.3rem;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Upgrades box */
.upgrades-box {
    margin-top: 1.5rem;
    padding: 1rem 1.2rem;

    max-height: 320px;
    overflow-y: auto;

    border-radius: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Scrollbar – subtle, coffee-style (RESTORED) */
.upgrades-box {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(245, 230, 211, 0.35) transparent;
}

.upgrades-box .upgrade:first-child {
    margin-top: 0;
}

/* WebKit (Chromium, Safari) */
.upgrades-box::-webkit-scrollbar {
    width: 6px;
}

.upgrades-box::-webkit-scrollbar-track {
    background: transparent;
}

.upgrades-box::-webkit-scrollbar-thumb {
    background: rgba(245, 230, 211, 0.25);
    border-radius: 6px;
}

.upgrades-box::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 230, 211, 0.4);
}

/* Warehouse bar */
.warehouse-bar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center; /* center horizontally */
    gap: 8px;
    margin-top: 6px;
    animation: fadeInWarehouse 250ms ease-out;
}

@keyframes fadeInWarehouse {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smaller, subtler bar */
.warehouse-bar {
    height: 5px;
    width: 120px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    overflow: hidden;
}

.warehouse-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #cfa36a, #f5e6d3);
    transition: width 0.15s ease;
}

/* Capacity text */
.warehouse-cap {
    font-size: 0.75rem;
    opacity: 0.75;
    white-space: nowrap;
}

/* Release button behavior */
#releaseWarehouse {
    margin-top: 0.4rem;
}

#releaseWarehouse:disabled {
    display: none;
}

/* Reset section */
.game-options {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.reset-button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: red;
    border: none;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    white-space: normal;
}

/* Floating coffee */
.floating-coffee {
    position: fixed;
    pointer-events: none;
    z-index: 9999;

    font-size: 1.1rem;
    font-weight: bold;
    color: #f5e6d3;

    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;

    animation: floatUp 800ms ease-out forwards;
}

@keyframes floatUp {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -85px);
        opacity: 0;
    }
}
