/* =====================================================
   NEBRASKETBALL - TAB-BASED LAYOUT
   Mobile-first responsive design
   ===================================================== */

/* Tab Navigation - Mobile Subnav */
.tab-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    align-items: center;
    transition: all 0.3s ease;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Oswald', sans-serif;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 3px;
    background: var(--accent-red);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.tab-btn.active {
    color: var(--accent-red);
}

.tab-btn.active::before {
    transform: translateX(-50%) scaleX(1);
}

.tab-icon {
    font-size: 20px;
    line-height: 1;
}

/* Tab Content Panels */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

/* Hero hiding for non-home tabs */
.hero {
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.4s ease, padding 0.4s ease;
    overflow: hidden;
}

.hero.hero-hidden {
    max-height: 0 !important;
    min-height: 0 !important;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Add top padding for non-home tabs since hero is hidden */
#tab-roster,
#tab-schedule,
#tab-game {
    padding-top: 100px;
}

/* Adjust main content to account for bottom nav */
body.has-tab-nav {
    padding-bottom: 80px;
}

/* Replay Animation Button */
.replay-intro-btn {
    position: fixed;
    bottom: 90px;
    right: 16px;
    z-index: 99;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.replay-intro-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: white;
    transform: scale(1.1);
}

.replay-intro-btn::after {
    content: '🎬';
}

/* Tooltip for replay button */
.replay-intro-btn::before {
    content: 'Re-watch Intro';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
    padding: 6px 12px;
    background: var(--nav-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.replay-intro-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Desktop Navigation Override */
@media (min-width: 768px) {
    .tab-nav {
        position: static;
        bottom: auto;
        background: transparent;
        backdrop-filter: none;
        border: none;
        padding: 0;
        justify-content: center;
        gap: 2rem;
    }

    .tab-btn {
        flex-direction: row;
        font-size: 14px;
        padding: 12px 24px;
    }

    .tab-btn::before {
        top: auto;
        bottom: -12px;
    }

    .tab-icon {
        display: none;
    }

    body.has-tab-nav {
        padding-bottom: 0;
    }

    .replay-intro-btn {
        bottom: 24px;
        right: 24px;
    }
}

/* Hero Section with Tab Controls */
.hero-with-tabs {
    min-height: auto;
    padding-bottom: 2rem;
}

.hero-with-tabs .scroll-indicator {
    display: none;
}

/* Dynamic Record Display */
.stat-value.dynamic {
    min-width: 60px;
    text-align: center;
}

/* Content Section adjustments */
.content-section {
    padding: 2rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .content-section {
        padding: 4rem 2rem;
    }
}

/* Fade animation for tab switches */
@keyframes tab-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    animation: tab-fade-in 0.3s ease-out;
}

/* Section without scroll - compact view */
.section-compact {
    padding-top: 1rem;
}

.section-compact .section-header {
    margin-bottom: 2rem;
}

/* =====================================================
   NAV LINKS TAB BUTTONS (Desktop header)
   ===================================================== */
.nav-links .tab-btn {
    flex-direction: row;
    gap: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Oswald', sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 16px;
    transition: color 0.2s ease;
}

.nav-links .tab-btn:hover {
    color: var(--text-primary);
}

.nav-links .tab-btn.active {
    color: var(--accent-red);
}

.nav-links .tab-btn::before {
    display: none;
}

/* Hide desktop nav on mobile */
@media (max-width: 767px) {
    .nav-links {
        display: none;
    }
}

/* Show mobile bottom nav only on mobile */
@media (min-width: 768px) {
    nav.tab-nav {
        display: none;
    }
}

/* =====================================================
   IMPROVED MOBILE BOTTOM NAV
   ===================================================== */
@media (max-width: 767px) {
    nav.tab-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1000;
    }

    nav.tab-nav .tab-btn {
        flex: 1;
        flex-direction: column;
        gap: 4px;
        padding: 8px 0;
        font-size: 10px;
    }

    nav.tab-nav .tab-btn .tab-icon {
        font-size: 22px;
    }

    /* Replay button positioning for mobile */
    .replay-intro-btn {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* =====================================================
   FOOTER ADJUSTMENTS
   ===================================================== */
.footer {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .footer {
        padding-bottom: calc(80px + env(safe-area-inset-bottom) + 20px);
    }
}