/* === ПЕРЕМЕННЫЕ ТЕМ === */
:root {
    --bg-image: url('../assets/images/background.png'); 
    --overlay-color: rgba(255, 255, 255, 0.4); 
    --text-color: #1a1a1a;
}

[data-theme="dark"] {
    --overlay-color: rgba(10, 10, 15, 0.7); 
    --text-color: #f0f0f0;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --overlay-color: rgba(10, 10, 15, 0.7);
        --text-color: #f0f0f0;
    }
}

/* === БАЗОВЫЕ НАСТРОЙКИ СТРАНИЦЫ === */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh; /* Минимальная высота - экран, но МОЖНО скроллить вниз */
    overflow-x: hidden; /* Строго запрещаем скролл влево-вправо */
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-color);
    
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    /* ФИКСИРУЕМ ФОН, чтобы он не прокручивался вместе с контентом */
    background-attachment: fixed; 
}

/* === ЗАТЕМНЕНИЕ ФОНА (Не двигается при скролле) === */
.theme-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--overlay-color);
    transition: background-color 0.5s ease;
    z-index: 1;
    pointer-events: none; /* Разрешаем кликать "сквозь" затемнение на кнопки */
}

/* === ГЛАВНЫЙ КОНТЕЙНЕР (Выстраивает всё по центру в столбик) === */
.menu-layout {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column; /* Элементы идут сверху вниз */
    align-items: center; /* Центрируем по горизонтали */
    padding: 20px 0;
    width: 100%;
    gap: 30px; /* Расстояние между блоками */
}

/* === 1. ЛОГОТИП === */
.section-logo img {
    margin-top: 2vh;
    width: 90vw; /* Занимает 90% ширины экрана телефона */
    max-width: 800px; /* Но на ПК не больше 800px */
    height: auto;
    filter: drop-shadow(0px 10px 15px rgba(0,0,0,0.5));
}

/* === 2. КНОПКА СТАРТ === */
.start-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}
.start-btn img {
    width: 70vw;
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0px 5px 10px rgba(0,0,0,0.4));
}
.start-btn:hover {
    transform: scale(1.05); /* Легкое увеличение при наведении */
}

/* === 3. ДИДЖЕЙ И ДИАЛОГ === */
.section-mascot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#djkin-mascot {
    width: 85vw;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    transform-origin: bottom center;
}

/* Анимация покачивания Диджея */
@keyframes bounceMascot {
    0%   { transform: scaleY(1); }
    50%  { transform: scaleY(0.96) translateY(15px); }
    100% { transform: scaleY(1); }
}
.dj-bounce {
    animation: bounceMascot 0.3s ease-out;
}

/* Окошко диалога (теперь оно просто лежит "на ногах" диджея) */
.dialogue-box {
    margin-top: -60px; /* Задвигаем окошко немного вверх, поверх ног персонажа */
    width: 95vw;
    max-width: 600px;
    min-height: 120px;
    background-image: url('../assets/images/dialog_bg.png'); 
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    padding: 25px 40px;
    box-sizing: border-box;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center; /* Текст тоже по центру для красоты */
    text-align: center;
}

#dialogue-text {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
    line-height: 1.4;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] #dialogue-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}
.blinking-cursor {
    font-weight: bold;
    font-size: 22px;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* === 4. КНОПКА СМЕНЫ ТЕМЫ (В САМОМ НИЗУ) === */
.section-theme {
    margin-top: 10px;
    margin-bottom: 40px; /* Отступ от самого низа страницы */
}
.theme-btn {
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}
.theme-btn img {
    width: 60px; 
    height: 60px;
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.5));
}
.theme-btn:hover {
    transform: scale(1.1);
}

/* МЕЛКАЯ ПРАВКА ДЛЯ ОЧЕНЬ УЗКИХ ЭКРАНОВ */
@media (max-width: 400px) {
    #dialogue-text { font-size: 16px; }
    .blinking-cursor { font-size: 16px; }
    .dialogue-box { padding: 15px 25px; min-height: 90px; }
}