@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700;900&display=swap');

:root {
    --accent: #ffffff;
    --bg: #050505;
    --card-bg: rgba(15, 15, 15, 0.85);
}

body,
html {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.music-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.music-btn svg {
    display: block;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.5s;
}

.scroll-text {
    font-size: 0.6rem;
    letter-spacing: 2px;
    margin-top: 10px;
    color: #888;
    text-transform: uppercase;
}

.chevron {
    width: 28px;
    height: 8px;
    opacity: 0;
    animation: move 3s ease-out infinite;
    position: relative;
}

.chevron:before,
.chevron:after {
    content: ' ';
    position: absolute;
    top: 0;
    height: 100%;
    width: 51%;
    background: #fff;
}

.chevron:before {
    left: 0;
    transform: skew(0deg, 30deg);
}

.chevron:after {
    right: 0;
    width: 50%;
    transform: skew(0deg, -30deg);
}

@keyframes epicEntry {
    0% {
        opacity: 0;
        transform: scale(4) translateZ(0);
        /* Очень большое */
        filter: blur(20px);
        /* Сильно размыто */
        letter-spacing: 20px;
        /* Буквы далеко друг от друга */
    }

    /* Резкое проявление и сужение */
    40% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1.1) translateZ(0);
        letter-spacing: 2px;
    }

    /* Легкий "отскок" назад */
    70% {
        transform: scale(0.98) translateZ(0);
    }

    /* Финальное состояние */
    100% {
        opacity: 1;
        transform: scale(1) translateZ(0);
        filter: blur(0);
        letter-spacing: 2px;
    }
}

.hero-section {
    height: 100vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), var(--bg)), url('saratov.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.main-title {
    font-size: 9vw;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.1);

    /* Убираем старую анимацию пульсации */
    /* animation: titlePulse 4s infinite ease-in-out; */

    /* Добавляем новую анимацию появления */
    opacity: 0;
    /* Изначально невидимо */
    animation: epicEntry 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 1s;
    /* Небольшая задержка после прелоадера */

    will-change: transform, opacity, filter;
}

.timer-display {
    display: flex;
    justify-content: space-between;
    /* Распределяем равномерно внутри карточки */
    margin-top: 15px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-block span {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    /* Немного уменьшил размер для компактности */
    font-weight: 900;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.time-block label {
    font-size: 0.55rem;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 1px;
    margin-top: 5px;
}

@media (max-width: 480px) {

    .main-title {
        font-size: 9vw;
        letter-spacing: 1px;
        line-height: 1.1;
        margin-bottom: 10px;
    }

    .sub-title {
        /* Минимальный порог 0.7rem, чтобы текст оставался читаемым */
        font-size: clamp(0.7rem, 4vw, 0.9rem);

        /* Плотная разрядка для узких экранов */
        letter-spacing: 2px;

        /* Безопасная зона по бокам */
        padding: 0 15px;

        /* Компактный отступ сверху */
        margin-top: 15px;

        /* Чтобы строки не слипались при переносе */
        line-height: 1.4;

        /* Гарантируем, что блок занимает всю ширину для правильного центрирования */
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Не забывай эту скобку! */

@keyframes titlePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.9;
    }

    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

.sub-title {
    font-size: clamp(0.8rem, 3vw, 1.1rem);
    margin-top: 20px;
    color: #888;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.content {
    max-width: 900px;
    margin: -60px auto 60px;
    padding: 0 15px;
    position: relative;
    z-index: 3;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 8px;
    overflow: hidden;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.card-header {
    padding: 35px 30px 20px;
}

h2 {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #555;
    margin-bottom: 15px;
}

.info-text {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.info-text2 {
    font-size: clamp(0.7rem, 3vw, 1.3rem);
    /* Немного уменьшил, чтобы не было гигантизма */
    font-weight: 800;
    line-height: 1.2;
    /* Чтобы строки не слипались */
    margin-bottom: 15px;
    /* Отступ между пунктами */
    text-transform: uppercase;
}

#map {
    width: 100%;
    height: 250px;
    background: #111;
}

/* Контейнер чата — теперь он просто белый, без лишних стилей */
.chat-container {
    grid-column: 1 / -1;
    background: #ffffff !important;
    padding: 25px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

/* Блок заголовка (аватарка + имя) */
.msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

/* Имя пользователя — делаем тонким и неброским */
.name-label {
    font-size: 0.7rem;
    font-weight: 400;
    /* Убрали жирность */
    color: #8e8e8e;
    /* Спокойный серый цвет */
    letter-spacing: 0.5px;
}

/* Аватарка */
.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* Сами бабблы — возвращаем стандартный вид */
.bubble {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 400;
    /* Обычный шрифт текста */
    line-height: 1.4;
    display: inline-block;
    color: #000;
    /* Текст в бабблах по умолчанию черный */
}

/* Сообщение Алана */
.msg-alan .bubble {
    background: #f1f1f1;
    border-bottom-left-radius: 2px;
    /* Чуть острее уголок для реализма */
}

/* Сообщение Алексея */
.msg-alexey .bubble {
    background: #000000;
    color: #ffffff;
    /* У Алексея текст белый на черном фоне */
    border-bottom-right-radius: 2px;
}

/* Анимация появления (как в логах) */
.msg {
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.msg.show {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.btn-glow {
    grid-column: 1 / -1;
    background: #fff;
    color: #000;
    padding: 22px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.footer {
    padding: 60px 20px;
    text-align: center;
    color: #333;
    font-size: 0.7rem;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

.loader-content {
    text-align: center;
    width: 300px;
}

.glitch-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.loader-status {
    font-size: 0.6rem;
    color: #555;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.progress-bar {
    width: 100%;
    height: 2px;
    background: #111;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    animation: fillProgress 3s forwards;
}

@keyframes fillProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

#access-btn {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 10px 20px;
    font-size: 0.7rem;
    letter-spacing: 2px;
    cursor: pointer;
    opacity: 0;
    animation: fadeInBtn 0.5s 3.2s forwards;
    /* Появится после полоски */
    transition: all 0.3s;
}

#access-btn:hover {
    background: #fff;
    color: #000;
}

@keyframes fadeInBtn {
    to {
        opacity: 1;
    }
}

/* Класс для скрытия прелоадера */
.loader-hidden {
    opacity: 0;
    pointer-events: none;
}