/* ── Season Navigation (Leaderboard) ─────────────────────────── */
.season-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0;
    position: relative;
}

.season-nav::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: var(--indicator-left, 0);
    width: var(--indicator-width, 0);
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
    transition: left 0.15s ease-out, width 0.15s ease-out;
    pointer-events: none;
    opacity: 0;
}

@keyframes season-indicator-fade {
    to { opacity: 1; }
}

.season-nav[data-indicator-ready]::after {
    animation: season-indicator-fade 0.25s ease-out forwards;
}

.season-nav.no-transition::after {
    transition: none;
}

.season-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.season-btn:hover {
    color: var(--text-primary);
}

.season-btn.active {
    color: var(--text-primary);
}

.season-past-wrap {
    position: relative;
    user-select: none;
}

.season-past-sizer {
    visibility: hidden;
    pointer-events: none;
}

.season-past-label {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


@keyframes seasonPanelReveal {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.season-past-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 0.5rem;
    z-index: 1000;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    animation: seasonPanelReveal 0.2s ease-out;
    transform-origin: top center;
}

.season-past-panel.open {
    display: flex;
}

.season-past-item {
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    transition: background 0.2s;
}

.season-past-item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
}

.season-past-item.selected {
    color: var(--accent-hover);
    background: rgba(99, 102, 241, 0.1);
}

/* Profile season dropdown (keeps original styling) */
.season-profile-select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

.season-profile-select:focus {
    outline: none;
    border-color: var(--accent);
}

.season-countdown {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    padding: 0.5rem 0 0.15rem;
    min-height: 1.1rem;
    opacity: 0;
    animation: none;
}

.season-countdown.season-text-visible {
    animation: list-item-in 0.25s ease-out backwards;
    opacity: 1;
}

.season-user-rank {
    font-size: 0.85rem;
    color: var(--accent-hover);
    text-align: center;
    font-weight: 600;
    padding: 0.15rem 0;
    height: 1.4rem;
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.season-user-rank.season-text-visible {
    opacity: 1;
}

/* ── Season Transition Modal ─────────────────────────────────── */
.season-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 1;
    transition: opacity 0.25s ease;
}

.season-modal-overlay.fade-out {
    opacity: 0;
}

.season-modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: season-modal-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes season-modal-in {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.season-modal-recap-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.season-modal-recap {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.season-recap-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.season-recap-value {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.season-recap-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.season-modal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 1.5rem 0;
}

.season-modal-new-title {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.season-modal-new-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.season-modal-dates {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.season-modal-timer {
    font-size: 2.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.15);
    min-height: 2.8rem;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}

.season-modal-timer.active {
    color: var(--text-primary);
}

.season-modal-dismiss {
    opacity: 0.3;
    pointer-events: none;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    padding: 0.75rem 2rem;
    font-size: 0.95rem;
}

.season-modal-dismiss.ready {
    opacity: 1;
    pointer-events: auto;
    animation: season-pulse-glow 2s ease infinite;
}

@keyframes season-pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(99, 102, 241, 0.15); }
}

/* ── Profile Season Tabs ─────────────────────────────────────── */
.profile-view-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.25rem;
    margin: 0.75rem auto 0;
    max-width: 280px;
}

.profile-view-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.profile-view-tab:hover {
    color: var(--text-primary);
}

.profile-view-tab.active {
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.season-profile-controls {
    margin-bottom: 1rem;
}

#profile-seasons-view .profile-stats-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 600px) {
    .season-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .season-modal {
        padding: 2rem 1.5rem;
    }

    .season-modal-recap {
        gap: 1rem;
    }

    .season-recap-value {
        font-size: 1.2rem;
    }
}
