/**
 * FPLyzer - Shared Header Styles
 * Consistent header across all pages with logo (left) and navigation (right)
 * Includes hamburger menu for mobile
 */

/* ==========================================
   Site Header Container
   ========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(56, 0, 60, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 255, 135, 0.2);
    padding: 10px 20px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* ==========================================
   Logo Styles
   ========================================== */
.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img {
    height: 80px;
    width: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(233, 0, 82, 0.3));
}

.header-logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(233, 0, 82, 0.4));
}

/* Brand Text beside Logo */
.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin-left: 10px;
    letter-spacing: -0.5px;
    transition: text-shadow 0.3s ease;
}

.brand-fpl {
    color: #E90052;
    transition: text-shadow 0.3s ease;
}

.brand-yzer {
    color: #00FF87;
    transition: text-shadow 0.3s ease;
}

.header-logo a:hover .brand-fpl {
    text-shadow: 0 0 8px rgba(233, 0, 82, 0.6), 0 0 15px rgba(233, 0, 82, 0.4), 0 0 25px rgba(233, 0, 82, 0.3);
}

.header-logo a:hover .brand-yzer {
    text-shadow: 0 0 8px rgba(0, 255, 135, 0.6), 0 0 15px rgba(0, 255, 135, 0.4), 0 0 25px rgba(0, 255, 135, 0.3);
}

/* ==========================================
   Navigation Container
   Hidden - using hamburger menu for all sizes
   ========================================== */
.header-nav {
    display: none;
    align-items: center;
    gap: 10px;
}

/* Welcome message styling */
.welcome-message {
    color: #00FF87;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-right: 5px;
}

/* ==========================================
   Mobile Header Right (Welcome + Hamburger)
   Now used for all screen sizes
   ========================================== */
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-welcome {
    color: #00FF87;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ==========================================
   Header Auth Buttons (Login/Register on index)
   ========================================== */
.header-auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-auth-buttons .nav-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.header-auth-buttons .register-btn {
    background: #E90052;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(233, 0, 82, 0.3);
}

.header-auth-buttons .register-btn:hover {
    background: #D10048;
    box-shadow: 0 6px 20px rgba(233, 0, 82, 0.4);
    color: #FFFFFF;
}

/* ==========================================
   Navigation Buttons
   ========================================== */
.nav-btn {
    padding: 10px 18px;
    background: #00FF87;
    border: none;
    border-radius: 10px;
    color: #38003C;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 135, 0.3);
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 135, 0.4);
    background: #00E67A;
    text-decoration: none;
    color: #38003C;
}

.nav-btn:active {
    transform: translateY(0);
}

/* Logout button - pink accent */
.nav-btn.logout-btn {
    background: #E90052;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(233, 0, 82, 0.3);
}

.nav-btn.logout-btn:hover {
    background: #D10048;
    box-shadow: 0 6px 20px rgba(233, 0, 82, 0.4);
    color: #FFFFFF;
}

/* ==========================================
   Hamburger Menu Button
   Now visible on all screen sizes
   ========================================== */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background: #00FF87;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger animation when menu is open */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   Mobile Menu Overlay
   Now used for all screen sizes
   ========================================== */
.mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================
   Navigation Menu (Slide-in)
   Now used for all screen sizes
   ========================================== */
.mobile-nav {
    display: block;
    position: fixed;
    top: 80px;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 15px 0 0 15px;
    border: 2px solid rgba(0, 255, 135, 0.3);
    border-right: none;
    padding: 20px;
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.mobile-nav.active {
    right: 0;
    pointer-events: auto;
}

.mobile-nav .nav-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav .welcome-message {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 255, 135, 0.2);
    margin-bottom: 10px;
    text-align: center;
}

.mobile-nav .nav-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
    justify-content: center;
}

/* Disabled state for mobile nav buttons */
.mobile-nav .nav-btn.disabled {
    background: linear-gradient(135deg, #555, #333) !important;
    cursor: not-allowed;
    opacity: 0.5;
    pointer-events: none;
    color: #888 !important;
}

.mobile-nav .nav-btn.disabled::after {
    content: " (updating)";
    font-size: 0.75rem;
    color: #FFA500;
}

/* ==========================================
   Body Padding to Account for Fixed Header
   ========================================== */
body.has-header {
    padding-top: 80px;
}

/* ==========================================
   Desktop Styles (default)
   Hamburger menu used for all sizes
   ========================================== */
@media (min-width: 769px) {
    /* Desktop nav is hidden - we use hamburger for all sizes */
    .header-nav {
        display: none !important;
    }
}

/* ==========================================
   Tablet & Mobile Styles
   ========================================== */
@media (max-width: 768px) {
    .site-header {
        padding: 8px 15px;
    }
    
    .header-container {
        height: 50px;
    }
    
    .header-logo img {
        height: 55px;
    }
    
    .brand-text {
        font-size: 1.4rem;
        margin-left: 8px;
    }
    
    .mobile-welcome {
        font-size: 0.85rem;
    }
    
    .header-auth-buttons .nav-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .mobile-nav {
        top: 70px;
    }
    
    body.has-header {
        padding-top: 70px;
    }
}

/* ==========================================
   Small Mobile Styles
   ========================================== */
@media (max-width: 480px) {
    .site-header {
        padding: 6px 12px;
    }
    
    .header-container {
        height: 45px;
    }
    
    .header-logo img {
        height: 45px;
    }
    
    .brand-text {
        font-size: 1.1rem;
        margin-left: 6px;
    }
    
    .mobile-welcome {
        font-size: 0.75rem;
    }
    
    .mobile-header-right {
        gap: 8px;
    }
    
    .header-auth-buttons {
        gap: 6px;
    }
    
    .header-auth-buttons .nav-btn {
        padding: 5px 10px;
        font-size: 0.75rem;
    }
    
    .mobile-nav {
        top: 60px;
        width: 260px;
        padding: 15px;
    }
    
    .mobile-nav .nav-btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    body.has-header {
        padding-top: 60px;
    }
}
