/* ============================================================
   Mini Game Page
   ============================================================ */

.nav-active {
    color: var(--accent-light) !important;
}
.nav-active::after {
    transform: scaleX(1) !important;
}

/* Hero */
#game-hero {
    min-height: 38vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 3rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.game-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

/* Game Section */
#game-section {
    padding: 0 2rem 6rem;
    background: var(--bg);
}

.game-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* ── Game Picker Slider ── */
.game-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.picker-track-wrap {
    flex: 1;
    overflow: hidden;
}

.picker-track {
    display: flex;
    gap: 0.6rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.game-tile {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    min-width: 110px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
    user-select: none;
}

.game-tile:hover {
    border-color: rgba(234, 179, 8, 0.35);
    background: rgba(234, 179, 8, 0.05);
    transform: translateY(-2px);
}

.game-tile.active {
    border-color: var(--accent);
    background: rgba(234, 179, 8, 0.08);
    box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.2);
}

.tile-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.tile-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.game-tile.active .tile-name {
    color: var(--accent-light);
}

.picker-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.picker-arrow:hover {
    background: rgba(234, 179, 8, 0.08);
    border-color: rgba(234, 179, 8, 0.35);
    color: var(--accent-light);
}

.picker-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── iframe ── */
.iframe-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    background: #000;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
}

.iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.iframe-wrap iframe.loaded {
    opacity: 1;
}

/* ── Overlays ── */
.game-overlay {
    position: absolute;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: opacity 0.25s;
}

.game-overlay.hidden {
    display: none;
}

.game-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.blocked-game-icon {
    font-size: 2.5rem;
}

.game-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.game-overlay p {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 300px;
    line-height: 1.6;
}

/* ── Controls bar ── */
.game-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-faint);
    flex-wrap: wrap;
}

.controls-sep {
    opacity: 0.4;
}

kbd {
    display: inline-block;
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.15);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 0.1rem 0.5rem;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--accent-light);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    #game-hero {
        padding: 7rem 1.5rem 2rem;
    }
    #game-section {
        padding: 0 1rem 4rem;
    }
    .game-tile {
        min-width: 90px;
        padding: 0.6rem 0.75rem;
    }
    .tile-icon {
        font-size: 1.3rem;
    }
}
