/* ===========================
   File: assets/css/header.css
   =========================== */
body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: #f4f6fb;
    margin: 0;
    padding: 0;
}

.main-header {
    background: #fff;
    box-shadow: 0 2px 18px 0 rgba(64,86,161,0.08), 0 1.5px 6px 0 rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 100;
    animation: fadeInDown 0.4s;
}

@keyframes fadeInDown {
    from {transform: translateY(-30px); opacity:0;}
    to {transform: translateY(0); opacity:1;}
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.5rem 2vw;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: #354e7c;
    text-decoration: none;
    gap: 0.7rem;
    letter-spacing: 0.03em;
}

.main-nav {
    display: flex;
    gap: 2vw;
    align-items: center;
    transition: 0.25s;
}
.main-nav .nav-link {
    color: #384c7c;
    text-decoration: none;
    padding: 0.6em 1.1em;
    border-radius: 22px;
    font-size: 1.05em;
    transition: background .17s, color .18s;
    position: relative;
}
.main-nav .nav-link.active,
.main-nav .nav-link:hover {
    background: linear-gradient(90deg, #9ebcff 0%, #f0f6ff 90%);
    color: #2467e8;
    font-weight: 600;
    box-shadow: 0 2px 10px #c5d8ff44;
}
.admin-link {
    color: #ff9800 !important;
    border: 1px solid #ffd28b;
    background: #fffbe7;
    margin-left: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    position: relative;
}
.user-avatar img {
    width: 32px; height: 32px;
    border-radius: 50%; border: 2px solid #e4e6f7;
    background: #eef2fb;
}
.vip-badge {
    background: linear-gradient(90deg, #fad961 0%, #f76b1c 100%);
    color: #fff;
    font-size: 0.85em;
    padding: 2px 10px;
    border-radius: 16px;
    font-weight: 600;
    margin-left: 4px;
    box-shadow: 0 2px 8px #ffe2a855;
    position: absolute;
    left: 30px; top: 18px;
    z-index: 2;
}
.vip-0  { background: #bbb !important; }
.vip-1  { background: linear-gradient(90deg,#9be15d,#00e3ae) !important;}
.vip-2  { background: linear-gradient(90deg,#fdc830,#f37335) !important;}
.vip-9  { background: linear-gradient(90deg,#fcff00,#c9ff00,#7cfc00) !important;}

.user-dropdown {
    position: relative;
    cursor: pointer;
    padding: 0 8px;
    user-select: none;
    transition: 0.1s;
}
.user-dropdown .username {
    font-weight: 600;
    color: #344a73;
}
.user-dropdown .dropdown-content {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    min-width: 170px;
    background: #fff;
    box-shadow: 0 8px 30px #6472b919;
    border-radius: 14px;
    z-index: 2;
    padding: 10px 0;
    font-size: 1em;
    animation: fadeInDown .18s;
}
.user-dropdown.open .dropdown-content { display: block; }
.user-dropdown .dropdown-content a {
    display: block;
    padding: 8px 18px;
    color: #394a78;
    text-decoration: none;
    border-bottom: 1px solid #f1f3fa;
    transition: background .14s;
}
.user-dropdown .dropdown-content a:last-child { border-bottom: none; }
.user-dropdown .dropdown-content a:hover {
    background: #f7faff;
    color: #0072ff;
}
.user-dropdown .dropdown-content div {
    padding: 7px 18px 5px 18px;
    color: #5684c7;
    font-size: 0.96em;
}
.btn-login {
    background: linear-gradient(90deg,#72aaff 0,#26f1c7 100%);
    color: #fff;
    padding: 0.5em 1.2em;
    border: none;
    border-radius: 22px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    transition: box-shadow .16s;
    box-shadow: 0 2px 10px #b8e1ff55;
}
.btn-login:hover { background: #2467e8; color: #fff; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    margin-left: 10px;
}
.hamburger span {
    width: 27px; height: 4px; background: #7fa4fa; border-radius: 3px;
}

@media (max-width: 850px) {
    .main-header .container { flex-wrap: wrap; padding: 0.5rem 3vw; }
    .main-nav { 
        position: absolute;
        top: 58px; left: 0;
        width: 100vw;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        box-shadow: 0 8px 30px #b3b3b310;
        display: none;
        padding-bottom: 10px;
    }
    .main-nav.show { display: flex; }
    .main-nav .nav-link { width: 100%; border-radius: 0; padding: 1em 1.5em; }
    .hamburger { display: flex; }
}

@media (max-width: 600px) {
    .logo span { display: none; }
    .user-avatar img { width: 28px; height: 28px; }
    .main-header .container { padding: 0.2rem 2vw; }
    .user-dropdown .dropdown-content { min-width: 125px; }
}


