﻿/* site.css - полная версия со стилями для профиля */

:root {
    --primary: #4361ee;
    --primary-dark: #3451d1;
    --primary-light: #eef2ff;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.5;
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Навигация */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

    .navbar .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

    .navbar-brand:hover {
        color: var(--primary-dark);
    }

.navbar-toggler {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

    .navbar-toggler span {
        width: 24px;
        height: 2px;
        background: var(--text);
        transition: all 0.3s ease;
    }

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .nav-link:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

    .dropdown-toggle::after {
        content: '';
        display: inline-block;
        width: 4px;
        height: 4px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg);
        margin-left: 6px;
        margin-bottom: 2px;
    }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    list-style: none;
    margin-top: 8px;
}

    .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    cursor: pointer;
}

    .dropdown-item:first-child {
        border-radius: 8px 8px 0 0;
    }

    .dropdown-item:last-child {
        border-radius: 0 0 8px 8px;
    }

    .dropdown-item:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* Профильное меню - обновленные стили */
.profile-menu {
    position: relative;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--white);
}

    .profile-toggle:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

    .profile-avatar img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

.profile-name1 {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    margin-top: 8px;
    list-style: none;
    padding: 8px 0;
}

    .profile-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .profile-dropdown .dropdown-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        color: var(--text);
        text-decoration: none;
        font-size: 14px;
        transition: all 0.2s ease;
        background: none;
        border: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
    }

        .profile-dropdown .dropdown-item i {
            font-size: 16px;
            color: var(--text-light);
            transition: color 0.2s ease;
        }

        .profile-dropdown .dropdown-item:hover {
            background: var(--primary-light);
            color: var(--primary);
        }

            .profile-dropdown .dropdown-item:hover i {
                color: var(--primary);
            }

.text-danger {
    color: var(--danger) !important;
}

    .text-danger:hover {
        background: #fee2e2 !important;
        color: var(--danger) !important;
    }

        .text-danger:hover i {
            color: var(--danger) !important;
        }

/* site.css - стили для кнопок в шапке */

/* Кнопки авторизации в шапке */
.header-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.header-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

    .header-btn-outline:hover {
        background: var(--primary-light);
    }

.header-btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

    .header-btn-primary:hover {
        background: var(--primary-dark);
    }

/* Для мобильной версии */
@media (max-width: 768px) {
    .auth-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .header-btn {
        text-align: center;
        width: 100%;
    }
}

/* Алерты */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-warning {
    background: #ffedd5;
    border: 1px solid #fed7aa;
    color: #92400e;
}

.alert-message {
    font-size: 14px;
    font-weight: 500;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: currentColor;
    opacity: 0.7;
    padding: 0 4px;
    line-height: 1;
}

    .alert-close:hover {
        opacity: 1;
    }

/* Футер */
.footer {
    margin-top: auto;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    background: var(--white);
}

.footer-content {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* Bootstrap Icons - если используете */
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

/* Адаптивность */
@media (max-width: 768px) {
    .navbar-toggler {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 20px;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        box-shadow: var(--shadow-md);
    }

        .navbar-menu.show {
            display: flex;
        }

    .navbar-nav {
        flex-direction: column;
        gap: 4px;
    }

    .nav-link {
        padding: 12px 16px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        margin-left: 16px;
        margin-top: 4px;
        display: none;
    }

        .dropdown-menu.show {
            display: block;
        }

    .dropdown-toggle::after {
        margin-left: auto;
    }

    .navbar-profile {
        border-top: 1px solid var(--border);
        padding-top: 16px;
    }

    .profile-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 1px solid var(--border);
        margin-top: 8px;
        display: none;
    }

        .profile-dropdown.show {
            display: block;
        }

    .profile-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .btn-auth {
        justify-content: center;
    }
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }


}
/* ===== ПРОФИЛЬНОЕ МЕНЮ ===== */
.profile-menu {
    position: relative;
}

/* Кнопка профиля */
.profile-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .profile-button:hover {
        border-color: var(--primary);
        background: var(--primary-light);
    }

/* Аватар */
.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

/* Имя пользователя */
.profile-name {
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Стрелка */
.profile-arrow {
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

/* Выпадающее меню */
.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
    margin-top: 8px;
    overflow: hidden;
}

    .profile-dropdown.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

/* Шапка меню */
.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
}

.profile-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    text-transform: uppercase;
}

.profile-dropdown-info {
    flex: 1;
}

.profile-dropdown-name {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    font-size: 14px;
}

.profile-dropdown-email {
    font-size: 12px;
    color: var(--text-light);
    word-break: break-all;
}

/* Пункты меню */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

    .dropdown-item:hover {
        background: var(--primary-light);
        color: var(--primary);
    }

.dropdown-item-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Кнопка выхода */
.logout-button {
    color: var(--danger) !important;
}

    .logout-button:hover {
        background: #fee2e2 !important;
        color: var(--danger) !important;
    }

/* Разделитель */
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .profile-button {
        width: 100%;
        justify-content: space-between;
    }

    .profile-name {
        max-width: none;
    }

    .profile-dropdown {
        position: static;
        margin-top: 8px;
        width: 100%;
        box-shadow: none;
    }
}
