/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Фоновое изображение */
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/images/fon2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    z-index: -2;
}

/* Затемнение фона */
.background-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.7), rgba(0,0,0,0.4));
    z-index: -1;
}

/* Основной контейнер */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Герой секция */
.hero-section {
    text-align: center;
    padding: 100px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.main-title {
    font-size: 6rem;
    font-weight: 900; /* Жирный шрифт */
    margin-bottom: 20px;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    color: #ffffff; /* Белый цвет */
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

/* Секция с контентом */
.content-section {
    min-height: 200vh; /* Увеличиваем высоту для большего количества блоков */
    position: relative;
    padding: 100px 0;
}

/* Боковые блоки */
.scroll-block {
    position: absolute;
    width: 450px;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Блоки слева - начинаются за левым краем */
.left-block {
    left: -400px; /* Начинаются за экраном слева */
    text-align: left;
    transform: translateX(0);
}

/* Блоки справа - начинаются за правым краем */
.right-block {
    right: -400px; /* Начинаются за экраном справа */
    text-align: left;
    transform: translateX(0);
}

/* Видимое состояние блоков - останавливаются по центру */
.scroll-block.visible {
    opacity: 0.9;
}

.left-block.visible {
    left: 100px; /* Останавливаются по левому краю */
}

.right-block.visible {
    right: 100px; /* Останавливаются по правому краю */
}

/* Скрытое состояние при прокрутке вниз */
.scroll-block.hidden {
    opacity: 0;
}

.left-block.hidden {
    left: -400px; /* Уезжают за левый край */
}

.right-block.hidden {
    right: -400px; /* Уезжают за правый край */
}

/* Содержимое блоков */
.block-content {
    background: rgba(120, 120, 120, 0.6);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px;
    margin: 60px 0;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    max-width: 400px;
    transition: transform 0.3s ease;
}

.block-content:hover {
    transform: translateY(-5px);
}

.icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #ffffff;
    opacity: 0.9;
}

.block-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 600;
}

.block-content p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    text-align: left;
}

/* Позиционирование блоков по вертикали */
.scroll-block:nth-child(1) { top: 100px; }
.scroll-block:nth-child(2) { top: 400px; }
.scroll-block:nth-child(3) { top: 700px; }
.scroll-block:nth-child(4) { top: 1000px; }
.scroll-block:nth-child(5) { top: 1300px; }
.scroll-block:nth-child(6) { top: 1600px; }
.scroll-block:nth-child(7) { top: 1900px; }
.scroll-block:nth-child(8) { top: 2200px; }

/* Блок авторизации в углу */
.auth-corner {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
}

.auth-trigger {
    background: rgba(120, 120, 120, 0.7); /* Светло-серый */
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.auth-trigger:hover {
    background: rgba(140, 140, 140, 0.8);
    transform: translateY(-2px);
}

.auth-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: rgba(120, 120, 120, 0.9); /* Светло-серый */
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px;
    min-width: 250px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.auth-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.auth-header h3 {
    font-size: 1.2rem;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.close-btn:hover {
    opacity: 1;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.vk-btn {
    background: #4a76a8;
    color: white;
}

.yandex-btn {
    background: #ffcc00;
    color: #000;
}

.email-btn {
    background: rgba(255,255,255,0.2);
    color: white;
}

.auth-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.show {
    display: flex;
}

.modal-container {
    background: rgba(120, 120, 120, 0.9); /* Светло-серый */
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #ffffff;
}

/* Формы */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255,255,255,0.2);
}

.form-group input::placeholder {
    color: rgba(255,255,255,0.7);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    border: none;
    border-radius: 10px;
    color: #333;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.9);
}

.auth-switch a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}
/* Стили для профиля пользователя в чате */
.user-profile-header {
    position: relative;
    margin-left: auto;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid #e1e5e9;
}

.user-profile-trigger:hover {
    background-color: #f8f9fa;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.dropdown-arrow {
    font-size: 10px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.user-profile-header.active .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.user-profile-header.active .user-dropdown-menu {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background-color: #e1e5e9;
    margin: 4px 0;
}

.logout-item {
    color: #dc3545;
}

.logout-item:hover {
    background-color: #fff5f5;
}
/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .scroll-block {
        position: relative;
        left: auto;
        right: auto;
        width: 100%;
        margin: 20px 0;
        transform: none !important;
    }
    
    .block-content {
        max-width: 100%;
        margin: 20px 0;
    }
    
    .auth-corner {
        top: 15px;
        right: 15px;
    }
    
    .auth-trigger span {
        display: none;
    }
    
    .scroll-block:nth-child(n) {
        position: relative;
        top: auto !important;
    }
}