/* Базовые стили */
:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #27ae60;
    --warning: #f39c12;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Навигация */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--light);
    color: var(--secondary);
}

/* Кнопки авторизации */
.auth-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-login:hover {
    background: var(--secondary);
    color: white;
}

.btn-register {
    background: var(--secondary);
    border: 2px solid var(--secondary);
    color: white;
}

.btn-register:hover {
    background: var(--primary);
    border-color: var(--primary);
}



.hero {
    background: white;
    border-radius: 10px;
    padding: 60px 20px;
    margin: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.hero h1 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.subtitle {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    padding: 30px;
    background: var(--light);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
}
/* Стили для нового логотипа */
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    margin-left: 8px;
}

.logo-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1em;
}

.logo-sub {
    font-size: 0.8em;
    color: var(--secondary);
    font-weight: 500;
}

/* Для мобильных - делаем логотип компактнее */
@media (max-width: 768px) {
    .logo-text {
        display: none; /* Скрываем текст на мобильных */
    }
    
    .logo i {
        font-size: 1.8rem;
        margin-right: 0;
    }
}

/* Обновим hero-заголовок */
.hero .brand {
    color: var(--secondary);
    font-weight: 700;
}

/* Стили для выпадающего меню пользователя */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-btn {
    background: var(--light);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.user-btn:hover {
    background: #e0e0e0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 5px;
    margin-top: 5px;
    display: none;
    z-index: 1000;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-menu a:hover {
    background: var(--light);
    color: var(--secondary);
}

.dropdown-menu a:last-child {
    border-bottom: none;
    color: var(--accent);
}

/* Выпадающее меню пользователя */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--light);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary);
    font-weight: 500;
}

.user-btn:hover {
    background: #e0e0e0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-avatar i {
    font-size: 1.2rem;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.8rem;
    color: #777;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Выпадающее меню */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    min-width: 240px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-avatar i {
    font-size: 1.5rem;
}

.dropdown-user-info {
    flex: 1;
}

.dropdown-user-info strong {
    display: block;
    font-size: 0.95rem;
}

.dropdown-user-info small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #f8f9fa;
    border-left-color: var(--secondary);
    color: var(--secondary);
}

.dropdown-item i {
    width: 20px;
    color: #666;
}

.dropdown-item:hover i {
    color: var(--secondary);
}

.logout-item {
    color: #e74c3c;
}

.logout-item:hover {
    background: #ffebee;
    color: #c0392b;
    border-left-color: #e74c3c;
}

.logout-item i {
    color: #e74c3c;
}

/* === ФИКС ДЛЯ ВЫПАДАЮЩЕГО МЕНЮ === */
.user-dropdown {
    position: relative;
}

/* Убираем щель между кнопкой и меню */
.dropdown-menu {
    top: calc(100% + 1px) !important; /* Минимальный отступ */
    transition: opacity 0.1s, transform 0.1s !important; /* Мгновенное появление */
}

/* Создаем перекрывающую область */
.user-dropdown::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: -10px;
    right: -10px;
    height: 20px;
    background: transparent;
    z-index: 999;
}

/* Стили для секции статистики */
.stats-section {
    margin-top: 3rem;
    padding: 2rem 0;
}

.stats-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 1.8rem;
}

.stats-row {
    justify-content: center;
}

.stat-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.stat-card .stat-desc {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.stat-card i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

/* Стили для секции статистики */
.stats-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.stats-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.8rem;
}

.stats-row {
    justify-content: center;
}

.stat-card {
    text-align: center;
    transition: transform 0.3s ease;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.stat-card .stat-desc {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.stat-card i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

/* Стили для кнопок действий */
.action-buttons {
    margin-top: 3rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 0.5rem;
    min-width: 200px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: 1px solid #2980b9;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.3);
}

.btn-secondary {
    background-color: #2ecc71;
    color: white;
    border: 1px solid #27ae60;
}

.btn-secondary:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.btn-admin {
    background-color: #9b59b6;
    color: white;
    border: 1px solid #8e44ad;
}

.btn-admin:hover {
    background-color: #8e44ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(155, 89, 182, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stat-card .stat-number {
        font-size: 2rem;
    }
    
    .stats-section {
        padding: 1.5rem;
    }
}

/* Анимация для чисел статистики */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}