:root {
    --header-height: 76px;
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --dark: #0a0f28;
    --darker: #070a1e;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
}

header {
    position: sticky;
    top: 0;
    z-index: 2000;
    background: rgba(7, 10, 30, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-scrolled {
    background: rgba(7, 10, 30, 0.98);
    backdrop-filter: blur(40px) saturate(200%);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    position: relative;
}

.logo {
    font-size: 2.1rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
    position: relative;
    padding: 0.5rem 1.2rem;
    border-radius: 16px;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(139, 92, 246, 0.05) 50%, 
        rgba(236, 72, 153, 0.08) 100%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.logo:hover::before {
    opacity: 1;
}

.logo span {
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo:hover span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    transform: translateY(-1px);
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 1px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-tabs {
    display: flex;
    gap: 0.1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    position: relative;
}

.tab-btn {
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn:hover::before {
    opacity: 1;
    transform: scale(1);
}

.tab-btn:hover {
    color: white;
    transform: translateY(-1px);
}

.tab-btn.active {
    color: white;
    background: rgba(99, 102, 241, 0.15);
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn.active::before {
    opacity: 1;
    transform: scale(1);
    background: rgba(99, 102, 241, 0.2);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.tab-btn:active {
    transform: scale(0.98) translateY(0);
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.discord-btn {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.discord-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #5865F2;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.discord-btn:hover::before {
    opacity: 1;
}

.discord-btn svg {
    width: 24px;
    height: 24px;
    fill: rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.discord-btn:hover svg {
    fill: white;
    transform: scale(1.1);
}

.discord-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 101, 242, 0.4);
}

.discord-btn:active {
    transform: scale(0.95) translateY(0);
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-btn {
    display: none;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.mobile-menu-btn:hover span {
    background: var(--primary);
}

.mobile-menu-btn.active {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--primary);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--accent);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .nav-tabs {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(7, 10, 30, 0.98);
        backdrop-filter: blur(30px) saturate(180%);
        -webkit-backdrop-filter: blur(30px) saturate(180%);
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        padding: 2rem 1.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 0.8rem;
    }

    .nav-tabs.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .tab-btn {
        padding: 1.2rem 2rem;
        margin: 0.1rem 0;
        text-align: center;
        font-size: 1.1rem;
        width: 100%;
        max-width: 250px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.06);
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-tabs.active .tab-btn {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-tabs.active .tab-btn:nth-child(1) { transition-delay: 0.05s; }
    .nav-tabs.active .tab-btn:nth-child(2) { transition-delay: 0.1s; }
    .nav-tabs.active .tab-btn:nth-child(3) { transition-delay: 0.15s; }
    .nav-tabs.active .tab-btn:nth-child(4) { transition-delay: 0.2s; }
    .nav-tabs.active .tab-btn:nth-child(5) { transition-delay: 0.25s; }

    .tab-btn:hover {
        background: rgba(255, 255, 255, 0.08);
        transform: translateY(-1px);
    }

    .tab-btn.active {
        background: rgba(99, 102, 241, 0.15);
        border-color: rgba(99, 102, 255, 0.3);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-backdrop {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(5px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1998;
    }

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

.tab-btn:focus, .discord-btn:focus, .mobile-menu-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

html {
    scroll-behavior: smooth;
}

.logo, .tab-btn, .discord-btn, .mobile-menu-btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.logo:active, .tab-btn:active, .discord-btn:active, .mobile-menu-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

.nav-tabs, .tab-btn, .logo, .discord-btn {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn {
    transition: 
        color 0.3s ease,
        background-color 0.3s ease,
        transform 0.3s ease,
        border-color 0.3s ease;
}

.tab-btn:active {
    transition: transform 0.1s ease;
}