/* static/includes/css/header.css */

/* ===== HEADER ===== */
header {
    background: linear-gradient(to bottom right, #393eb4 60%, #a439b4 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Стили для неавторизованного пользователя */
.nav-center {
    flex-shrink: 0;
    display: flex;
    gap: 30px;
}

/* Для авторизованного пользователя - обычное центрирование */
.nav-menu {
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.nav-link:hover {
    background: rgba(216, 228, 240, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.nav-link.active {
    background: linear-gradient(to bottom right, #d8e4f0 0%, #e0e4f0 50%, #e8e4f0 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 12px rgba(216, 228, 240, 0.3);
}

.nav-link.active i {
    color: #1a1a2e;
}

.logout-btn {
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 20px;
    cursor: pointer;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.6);
    color: white;
}

.login-btn {
    background-color: #28a745;
    color: white;
    padding: 8px 20px;
    text-decoration: none;
    border-radius: 30px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.login-btn:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

.nav-link:focus,
.nav-link:active {
    outline: none !important;
    box-shadow: none !important;
}

.logout-btn:focus,
.logout-btn:active {
    outline: none !important;
    box-shadow: none !important;
}

/* ===== FLOATING HEADER (для авторизованных) ===== */
.floating-header {
    position: relative;
    top: 20px;
    margin: 0 20px 20px 20px;
    background: linear-gradient(to bottom right, #393eb4 60%, #a439b4 100%);
    border-radius: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(0px);
    z-index: 1000;
}

.floating-header .container {
    padding: 8px 20px;
}

.floating-header .nav-link:hover {
    background: rgba(216, 228, 240, 0.2);
    color: white;
    transform: translateY(-2px);
}

.floating-header .nav-link.active {
    background: linear-gradient(to bottom right, #d8e4f0 0%, #e0e4f0 50%, #e8e4f0 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 12px rgba(216, 228, 240, 0.3);
}

.floating-header .logout-btn:hover {
    background: rgba(220, 53, 69, 0.6);
    color: white;
}

/* Адаптивность для header */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 6px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-left, .nav-right {
        flex: none;
        padding: 0;
        justify-content: center;
    }
    
    .nav-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 8px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .login-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .floating-header {
        top: 10px;
        margin: 0 10px 10px 10px;
        border-radius: 30px;
    }
    
    .floating-header .container {
        padding: 5px 15px;
    }
}