/* header-common.css - Common Header Styles for All Pages */


/* ===============================
   CSS VARIABLES
   =============================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #111827;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}


/* ===============================
   MODERN HEADER WRAPPER
   =============================== */

.modern-header-wrapper {
    position: absolute;
    top: 0;
    left: 5%;
    right: 5%;
    width: 90%;
    max-width: 1300px;
    z-index: 999999;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    transform: translateY(0);
    opacity: 1;
    will-change: transform, opacity, visibility;
}

.modern-header-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.modern-header-wrapper.fixed {
    position: fixed;
    top: 0;
    left: 50%;
    right: auto;
    width: 90%;
    max-width: 1300px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 0;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    will-change: transform, opacity, visibility;
}


/* ===============================
   HEADER TOPBAR
   =============================== */

.modern-header-wrapper .header-topbar {
    background: transparent;
    border: none;
    box-shadow: none;
}

.modern-header-wrapper.fixed .header-topbar {
    background: transparent;
    border: none;
    box-shadow: none;
}


/* ===============================
   BRAND STYLES
   =============================== */

.modern-header-wrapper .header-brand .brand-name {
    color: #1a1a1a;
    font-weight: 700;
    transition: all 0.3s ease;
}


/* ===============================
   NAVIGATION LINKS
   =============================== */

.modern-header-wrapper .nav-link {
    color: #1a1a1a !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.modern-header-wrapper .nav-link:hover {
    color: yellow !important;
    background: rgba(26, 115, 232, 0.1);
}


/* ===============================
   BUTTONS
   =============================== */

.modern-header-wrapper .btn-deposit,
.modern-header-wrapper .btn-login {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.modern-header-wrapper .btn-deposit:hover,
.modern-header-wrapper .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}


/* ===============================
   DARK MODE STYLES
   =============================== */

body.dark-mode .modern-header-wrapper.fixed {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 26px;
}

body.dark-mode .modern-header-wrapper .header-brand .brand-name {
    color: #e2e8f0;
}

body.dark-mode .modern-header-wrapper .nav-link {
    color: #e2e8f0 !important;
}

body.dark-mode .modern-header-wrapper .nav-link:hover {
    color: #8ba4ff !important;
    background: rgba(139, 164, 255, 0.1);
}


/* ===============================
   LIGHT MODE STYLES
   =============================== */

body.light-mode .modern-header-wrapper .header-brand .brand-name {
    color: #ffffff;
    /* Trắng khi chưa fixed */
}

body.light-mode .modern-header-wrapper .nav-link {
    color: #ffffff !important;
    /* Trắng khi chưa fixed */
}

body.light-mode .modern-header-wrapper .nav-link:hover {
    color: yellow !important;
    background: rgba(26, 115, 232, 0.1);
}

body.light-mode .modern-header-wrapper.fixed .header-brand .brand-name {
    color: #1a1a1a;
    /* Đen khi fixed */
}

body.light-mode .modern-header-wrapper.fixed .nav-link {
    color: #1a1a1a !important;
    /* Đen khi fixed */
}

body.light-mode .modern-header-wrapper.fixed .nav-link:hover {
    color: red !important;
    background: rgba(26, 115, 232, 0.1);
}


/* Light Mode Responsive Menu - Luôn đen */

body.light-mode .modern-header-wrapper .navbar-collapse .nav-link {
    color: #1a1a1a !important;
    /* Đen cho responsive menu */
}


/* ===============================
   NAVBAR TOGGLER COLORS
   =============================== */

body.light-mode .modern-header-wrapper .navbar-toggler-icon {
    filter: invert(1);
    /* Trắng khi chưa fixed */
}

body.light-mode .modern-header-wrapper.fixed .navbar-toggler-icon {
    filter: none;
    /* Đen khi fixed */
}

body.dark-mode .modern-header-wrapper .navbar-toggler-icon {
    filter: invert(1);
    /* Trắng cho dark mode */
}


/* ===============================
   RESPONSIVE DESIGN
   =============================== */

@media (max-width: 768px) {
    /* Smart header responsive */
    .modern-header-wrapper {
        left: 2%;
        right: 2%;
        width: 96%;
    }
    .modern-header-wrapper.fixed {
        left: 50%;
        width: 96%;
        padding: 0;
    }
}

@media (max-width: 576px) {
    .modern-header-wrapper.fixed {
        padding: 0.5rem;
    }
    .modern-header-wrapper .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    .modern-header-wrapper .btn-deposit,
    .modern-header-wrapper .btn-login {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
}


/* ===============================
   BODY PADDING FOR SMART HEADER
   =============================== */

body {
    padding-top: 0;
    /* No padding for smart header */
}


/* ===============================
   ANIMATIONS
   =============================== */

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}


/* ===============================
   UTILITY CLASSES
   =============================== */

.header-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.header-fade-out {
    animation: fadeOut 0.5s ease-in-out;
}