/* Хедер */
.header {
    background-color: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(123, 98, 254, 0.2);
}

.header.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 40px;
    width: auto;
}
.user-profile.active .profile-dropdown {
    display: block;
}
.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 1px;
    margin: 0;
}

/* Основная навигация */
.nav {
    display: flex;
    height: 100%;
    align-items: center;
}

.nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.nav li {
    display: flex;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #7b62fe, #5e43ff);
    transition: all 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
    background: none;
    border: none;
}

/* Профиль пользователя */
.user-profile {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-left: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    transition: all 0.3s ease;
}

.user-name {
    margin-left: 10px;
    font-weight: 500;
    color: #ffffff;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a2a2a;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 10px 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.profile-dropdown.active {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s;
}

.profile-dropdown a:hover {
    background: rgba(123, 98, 254, 0.2);
}

.profile-dropdown .divider {
    height: 1px;
    background: #7e65fe;
    margin: 5px 0;
}

/* Мобильное меню */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: #1e1e1e;
    z-index: 1100;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #2a2a2a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-menu {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.mobile-nav-link:hover {
    background-color: rgba(123, 98, 254, 0.2);
}

.mobile-nav-link.active {
    color: #7b62fe;
    background-color: rgba(123, 98, 254, 0.1);
}

.mobile-user-profile {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-user-profile a {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.mobile-user-profile .user-avatar {
    width: 30px;
    height: 30px;
    margin-right: 10px;
}

/* Оверлей для мобильного меню */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Адаптация под мобильные устройства */
@media (max-width: 992px) {
    .nav ul {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header .container {
        padding: 10px 15px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .user-profile .user-name {
        display: none;
    }
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1rem;
    }
    
    .mobile-menu {
        width: 85%;
    }
    
    .mobile-nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 0.9rem;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .mobile-menu {
        width: 90%;
    }
    
    .mobile-nav-link {
        padding: 10px 15px;
    }
}