header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(10, 10, 26, 0.9);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.light-mode header.scrolled {
    background: rgba(240, 242, 245, 0.9);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
}

.logo span {
    color: var(--accent-cyan);
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover {
    color: var(--accent-cyan);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 30px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(0, 180, 255, 0.5);
}

.light-mode .control-btn:hover {
    box-shadow: 0 0 10px rgba(0, 119, 204, 0.3);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

    .light-mode nav ul {
        background: var(--secondary);
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
    }

    .nav-controls {
        margin-left: 0;
        margin-top: 15px;
        justify-content: center;
        width: 100%;
    }
    
    .mobile-menu {
        display: block;
    }
}