body {
    height: 100vh;
    overflow: hidden;
    justify-content: flex-start;
    align-items: center;
    padding-top: 80px;
}

#cookie img {
    pointer-events: none;
    transition: transform 0.08s ease;
}

#cookie:active img {
    transform: scale(0.88);
}

h1 {
    font-size: 18px;
}

.box {
    background: linear-gradient(160deg, #0d1b3e, #0a1628);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 2%;
    border-radius: 20px;
    width: 48%;
    margin: 2%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upgrades {
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
}

.upgrades::-webkit-scrollbar { width: 4px; }
.upgrades::-webkit-scrollbar-track { background: transparent; }
.upgrades::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 2px; }
.upgrades::-webkit-scrollbar-thumb:hover { background: #2d5a8f; }

.title {
    font-size: 32px;
}

.container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: calc(100vh - 80px);
}

.upgrades button, #cookie {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    border-radius: 10px;
    margin: 4px;
    min-width: 150px;
    min-height: 50px;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.25s, transform 0.1s, color 0.25s;
    border: 1px solid transparent;
}

.upgrades button.unaffordable {
    background: #111827;
    color: #374151;
    border-color: #1f2937;
    cursor: not-allowed;
}

.upgrades button.affordable {
    background: linear-gradient(135deg, #1d4ed8, #4f46e5);
    color: #e5e7eb;
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 8px rgba(79, 70, 229, 0.35);
}

.upgrades button.affordable:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px rgba(79, 70, 229, 0.55);
}

.upgrades button.affordable:active {
    transform: translateY(0px);
    box-shadow: 0 0 6px rgba(79, 70, 229, 0.3);
}

.upgrades button.purchased {
    background: linear-gradient(135deg, #059669, #10b981) !important;
    box-shadow: 0 0 22px rgba(16, 185, 129, 0.6) !important;
    color: #fff !important;
}

.upgrades button.one-time-bought {
    background: linear-gradient(135deg, #1a3a2a, #0f2d1f) !important;
    color: #34d399 !important;
    border-color: rgba(52, 211, 153, 0.25) !important;
    cursor: default;
    opacity: 0.75;
}

#save-status {
    font-size: 11px;
    letter-spacing: 1px;
    color: #334155;
    margin-top: 8px;
    transition: color 0.3s;
}

#save-status.saving { color: #64748b; }
#save-status.saved  { color: #34d399; }

#cookie {
    border-width: 0px;
    background-color: transparent;
    color: transparent;
    user-select: none;
    touch-action: manipulation;
}

@media (max-width: 600px) {
    body {
        height: auto;
        overflow: auto;
        padding-top: 70px;
    }

    .container {
        flex-direction: column;
        height: auto;
    }

    .box {
        width: 92%;
        margin: 2% auto;
    }

    .upgrades {
        overflow-y: visible;
        max-height: none;
    }

    #cookie img {
        width: 140px;
    }
}

@media (hover: hover) {
    #cookie:hover img {
        transform: scale(1.06);
    }
    #cookie:active img {
        transform: scale(0.88);
    }
}

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