/* ===== CONSISTENT NAVIGATION STYLES ===== */
/* Include this file in all HTML pages for consistent navigation */

:root {
    /* Dark theme (default) */
    --primary: #00ff9d;
    --secondary: #ffffff;
    --background: #0a0a0a;
    --card-bg: rgba(20, 20, 20, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --success: #00ff9d;
    --error: #ff3e3e;
    --neon-glow: 0 0 10px rgba(0, 255, 157, 0.5),
                 0 0 20px rgba(0, 255, 157, 0.3),
                 0 0 30px rgba(0, 255, 157, 0.1);
    --neon-glow-white: 0 0 10px rgba(255, 255, 255, 0.5),
                      0 0 20px rgba(255, 255, 255, 0.3),
                      0 0 30px rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(20, 20, 20, 0.85);
    --filter-bg: rgba(0, 255, 157, 0.05);
    --border-color: rgba(0, 255, 157, 0.12);
}

[data-theme="light"] {
    --primary: #00cc7e;
    --secondary: #000000;
    --background: #f5f5f5;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #2d2d2d;
    --text-secondary: #666666;
    --success: #00cc7e;
    --error: #ff3e3e;
    --neon-glow: 0 0 10px rgba(0, 204, 126, 0.3),
                 0 0 20px rgba(0, 204, 126, 0.2),
                 0 0 30px rgba(0, 204, 126, 0.1);
    --neon-glow-white: 0 0 10px rgba(0, 0, 0, 0.2),
                      0 0 20px rgba(0, 0, 0, 0.1),
                      0 0 30px rgba(0, 0, 0, 0.05);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --filter-bg: rgba(0, 204, 126, 0.05);
    --border-color: rgba(0, 204, 126, 0.12);
}

/* ===== MAIN NAVIGATION STYLES ===== */
.nav {
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    position: relative;
}

/* ===== LEFT SIDE - LOGO/TITLE ===== */
.nav-title {
    color: var(--primary);
    font-size: 2em;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
    text-shadow: var(--neon-glow);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.nav-title:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-title span {
    color: var(--secondary);
    text-shadow: var(--neon-glow-white);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* ===== RIGHT SIDE - NAVIGATION LINKS ===== */
.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95em;
    position: relative;
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--filter-bg);
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.nav-link:hover::before {
    width: 60%;
}

.nav-link.active {
    color: var(--primary);
    background: var(--filter-bg);
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 255, 157, 0.2);
}

.nav-link.active::before {
    width: 60%;
}

/* ===== SPECIAL NAVIGATION ELEMENTS ===== */
.score-display-nav {
    background: var(--filter-bg);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.score-display-nav .score-value {
    font-size: 1.1em;
    text-shadow: var(--neon-glow);
}

.score-display-nav:hover {
    background: var(--primary);
    color: var(--background);
    transform: translateY(-1px);
    box-shadow: var(--neon-glow);
}

.live-scores-btn {
    background: linear-gradient(135deg, #ff3e3e, #ff6b6b);
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 62, 62, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.live-scores-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 62, 62, 0.4);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--filter-bg);
    transform: translateY(-1px);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* ===== USER PROFILE ===== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: var(--filter-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.user-email {
    color: var(--text-primary);
    font-size: 0.9em;
    font-weight: 500;
}

.logout-btn {
    color: var(--error) !important;
    border: 1px solid var(--error) !important;
    background: transparent !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 0.85em !important;
}

.logout-btn:hover {
    background: var(--error) !important;
    color: white !important;
}

/* ===== AUTH LINKS ===== */
.auth-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sign-up-btn {
    background: var(--primary) !important;
    color: var(--background) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: var(--neon-glow);
}

.sign-up-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--filter-bg);
}

.mobile-menu-toggle svg {
    width: 20px;
    height: 20px;
}

/* ===== MOBILE MENU OVERLAY & CONTENT ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    z-index: 10000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--filter-bg);
}

.mobile-menu-title {
    color: var(--primary);
    font-size: 1.5em;
    font-weight: 700;
    text-shadow: var(--neon-glow);
}

.mobile-menu-close {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--filter-bg);
}

.mobile-menu-content {
    padding: 24px;
}

.mobile-menu-section {
    margin-bottom: 32px;
}

.mobile-menu-section-title {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    background: transparent;
    border: 1px solid transparent;
}

.mobile-menu-item:hover {
    background: var(--filter-bg);
    color: var(--primary);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.mobile-menu-item.active {
    background: var(--filter-bg);
    color: var(--primary);
    border-color: var(--primary);
}

.mobile-menu-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== MOBILE SCORE DISPLAY ===== */
.mobile-score-display {
    background: var(--filter-bg);
    color: var(--primary);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    text-align: center;
    font-weight: 600;
    text-shadow: var(--neon-glow);
    margin-bottom: 12px;
}

/* ===== MOBILE USER PROFILE ===== */
.mobile-user-profile {
    padding: 16px;
    background: var(--filter-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.mobile-user-email {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
}

.mobile-logout-btn {
    background: linear-gradient(135deg, #ff3e3e, #ff6b6b);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.mobile-logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 62, 62, 0.3);
}

/* ===== MOBILE THEME TOGGLE ===== */
.mobile-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--filter-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-content {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-title {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .nav-content {
        padding: 0 12px;
    }

    .nav-title {
        font-size: 1.6em;
    }

    .mobile-menu {
        width: 280px;
        right: -280px;
    }

    .mobile-menu-content {
        padding: 16px;
    }
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    -webkit-tap-highlight-color: transparent;
}

.nav-link,
.mobile-menu-item,
.theme-toggle,
.mobile-menu-toggle {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .mobile-menu-item,
    .theme-toggle,
    .mobile-menu-toggle,
    .mobile-menu,
    .mobile-menu-overlay {
        transition: none;
    }
    
    .live-indicator {
        animation: none;
    }
}

/* ===== FOCUS STYLES ===== */
.nav-link:focus,
.theme-toggle:focus,
.mobile-menu-toggle:focus,
.mobile-menu-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
} 