/* تم توحيد تصميم الهيدر مع الصفحة الرئيسية */

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-logo {
    height: 36px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Header Navigation - Desktop & Tablet - Professional Text Only */
.header-nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }
}

.header-nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    text-decoration: none;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #fff;
    transition: width 0.3s ease;
}

.header-nav-link:hover {
    color: #fff;
}

.header-nav-link:hover::after {
    width: 100%;
}

.header-nav-link.active {
    color: #fff;
    font-weight: 600;
}

.header-nav-link.active::after {
    width: 100%;
}

/* Header balance display - Clean & Minimal */
.header-balance {
    display: none;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #10b981;
}

@media (min-width: 768px) {
    .header-balance {
        display: flex;
    }
}

.header-balance i {
    font-size: 0.8rem;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Text-only login link */
.header-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0.5rem 0;
    text-decoration: none;
}

.header-btn:hover {
    color: #fff;
}

.header-btn i {
    font-size: 0.9rem;
}

/* Primary button with background */
.header-btn-primary {
    background: #fff;
    color: #000;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
}

.header-btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    transform: translateY(-1px);
}

/* User avatar - clean circle */
.header-user {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #fff, #e5e5e5);
    color: #000;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    overflow: hidden;
}

.header-user img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50% !important;
}

.header-user:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Theme Toggle Button */
.header-theme-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
}

.header-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

@media (min-width: 768px) {
    .header-theme-toggle {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: #fff;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: flex;
    }

    .header-btn span {
        display: none;
    }

    .header-btn {
        padding: 0.5rem;
        min-width: 40px;
    }
}

/* ===== Light Theme Styles ===== */
body.light-theme .site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .header-nav-link {
    color: rgba(0, 0, 0, 0.6);
}

body.light-theme .header-nav-link:hover,
body.light-theme .header-nav-link.active {
    color: #000;
}

body.light-theme .header-nav-link::after {
    background: #000;
}

body.light-theme .header-btn {
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .header-btn:hover {
    color: #000;
}

body.light-theme .header-btn-primary {
    background: #000;
    color: #fff;
}

body.light-theme .header-btn-primary:hover {
    background: rgba(0, 0, 0, 0.9);
}

body.light-theme .menu-toggle {
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .menu-toggle:hover {
    color: #000;
}

body.light-theme .header-logo {
    height: 40px !important;
}

@media (max-width: 480px) {
    body.light-theme .header-logo {
        height: 36px !important;
    }
}

body.light-theme .header-theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

body.light-theme .header-theme-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

body.light-theme .header-user {
    color: #fff;
    background: linear-gradient(135deg, #333, #000);
}

/* ===== Membership Level Avatar Borders & Glowing ===== */
.site-header .header-user.level-bronze {
    border: 2px solid #e08d3c;
    box-shadow: 0 0 6px #e08d3c, 0 0 15px rgba(224, 141, 60, 0.5);
    animation: bronze-pulse-anim 3s infinite alternate ease-in-out;
}
.site-header .header-user.level-silver {
    border: 2px solid #e2e8f0;
    box-shadow: 0 0 6px #e2e8f0, 0 0 15px rgba(226, 232, 240, 0.5);
    animation: silver-pulse-anim 3s infinite alternate ease-in-out;
}
.site-header .header-user.level-gold {
    border: 2px solid #ffd700;
    box-shadow: 0 0 8px #ffd700, 0 0 20px rgba(255, 215, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.3);
    animation: gold-pulse-anim 2.5s infinite alternate ease-in-out;
}
.site-header .header-user.level-platinum {
    border: 2px solid #00ffd0;
    box-shadow: 0 0 10px #00ffd0, 0 0 25px rgba(0, 255, 208, 0.7), 0 0 35px rgba(0, 255, 208, 0.4);
    animation: platinum-pulse-anim 2s infinite alternate ease-in-out;
}
.site-header .header-user.level-diamond {
    border: 2px solid #ff0055;
    box-shadow: 0 0 12px #ff0055, 0 0 30px rgba(255, 0, 85, 0.8), 0 0 45px rgba(255, 0, 85, 0.5);
    animation: diamond-pulse-anim 1.8s infinite alternate ease-in-out;
}

/* Pulse Keyframes for All Levels */
@keyframes bronze-pulse-anim {
    0% {
        box-shadow: 0 0 4px #e08d3c, 0 0 10px rgba(224, 141, 60, 0.3);
    }
    100% {
        box-shadow: 0 0 10px #e08d3c, 0 0 22px rgba(224, 141, 60, 0.8);
    }
}
@keyframes silver-pulse-anim {
    0% {
        box-shadow: 0 0 4px #e2e8f0, 0 0 10px rgba(226, 232, 240, 0.3);
    }
    100% {
        box-shadow: 0 0 10px #e2e8f0, 0 0 22px rgba(226, 232, 240, 0.8);
    }
}
@keyframes gold-pulse-anim {
    0% {
        box-shadow: 0 0 5px #ffd700, 0 0 12px rgba(255, 215, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 12px #ffd700, 0 0 30px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.4);
    }
}
@keyframes platinum-pulse-anim {
    0% {
        box-shadow: 0 0 6px #00ffd0, 0 0 18px rgba(0, 255, 208, 0.5);
    }
    100% {
        box-shadow: 0 0 15px #00ffd0, 0 0 35px rgba(0, 255, 208, 0.9), 0 0 50px rgba(0, 255, 208, 0.6);
    }
}
@keyframes diamond-pulse-anim {
    0% {
        box-shadow: 0 0 8px #ff0055, 0 0 20px rgba(255, 0, 85, 0.5);
    }
    100% {
        box-shadow: 0 0 20px #ff0055, 0 0 40px rgba(255, 0, 85, 0.95), 0 0 60px rgba(255, 0, 85, 0.7);
        border-color: #ff3377;
    }
}

/* Hover updates to double the glow on hover */
.site-header .header-user.level-bronze:hover {
    box-shadow: 0 0 14px #e08d3c, 0 0 28px rgba(224, 141, 60, 0.95);
    transform: scale(1.08);
}
.site-header .header-user.level-silver:hover {
    box-shadow: 0 0 14px #e2e8f0, 0 0 28px rgba(226, 232, 240, 0.95);
    transform: scale(1.08);
}
.site-header .header-user.level-gold:hover {
    box-shadow: 0 0 18px #ffd700, 0 0 40px rgba(255, 215, 0, 0.95), 0 0 50px rgba(255, 215, 0, 0.6);
    transform: scale(1.08);
}
.site-header .header-user.level-platinum:hover {
    box-shadow: 0 0 22px #00ffd0, 0 0 45px rgba(0, 255, 208, 0.95), 0 0 60px rgba(0, 255, 208, 0.7);
    transform: scale(1.08);
}
.site-header .header-user.level-diamond:hover {
    box-shadow: 0 0 26px #ff0055, 0 0 55px rgba(255, 0, 85, 0.98), 0 0 75px rgba(255, 0, 85, 0.85);
    transform: scale(1.08);
}
