/* ─── Game Complete Modal ─── */

/* ── Full-screen celebration overlay on game completion ── */
#game-complete-modal {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

#game-complete-modal.active {
    opacity: 1;
    pointer-events: all;
}

.game-complete-content {
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: fadeSlide 0.4s var(--ease-out);
}

.game-complete-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 8px;
}

.game-complete-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-family: var(--font-mono);
}

.final-score-display {
    background: var(--surface2);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.final-score-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-family: var(--font-mono);
}

.final-score-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.final-score-rank {
    font-size: 1.1rem;
    color: var(--green);
    margin-top: 8px;
    font-weight: 700;
}

.game-complete-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.play-again-btn {
    background: var(--gold);
    color: var(--bg);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    padding: 16px;
    transition: transform 0.12s;
}

.play-again-btn:active {
    transform: scale(0.97);
}

.game-complete-btn {
    background: var(--surface3);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid var(--border2);
}

.scroll-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin: 6px 0;
    animation: hint-float 3s ease-in-out infinite;
    transition: opacity 0.4s ease;
}

.scroll-hint-hidden {
    opacity: 0 !important;
    pointer-events: none;
}


/* Custom scrollbar styles */
.scrollable {
    max-height: 60vh;
    overflow-y: auto;

    /* spacing for scrollbar */
    padding-right: 12px;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

/* Chrome, Edge, Safari */
.scrollable::-webkit-scrollbar {
    width: 10px;
}

.scrollable::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
    /* top/bottom breathing room */
}

.scrollable::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 999px;

    /* creates left/right spacing effect */
    border: 3px solid transparent;
    background-clip: content-box;
}

.scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dim);
    background-clip: content-box;
}

@keyframes hint-float {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(4px); opacity: 1; }
}