* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #8B0000 !important;
    background: no-repeat center url("img/bg.png");
    background-size: cover;
}
/* --- Анимации появления --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Класс, который будет добавляться при прокрутке */
.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Анимация "Парения" для монет --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-coins {
    animation: float 3s ease-in-out infinite;
}
.container {
    max-width: 100%;
    margin: 0 auto;
    /*background: linear-gradient(180deg, #8B0000 0%, #B22222 30%, #DC143C 60%, #8B0000 100%);*/
    position: relative;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 20px 20px 0;
    position: relative;
    z-index: 2;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

/* Section 1 - Main Tiger */
.section-1 {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}
/* --- СТИЛИ ДЛЯ ДЕСКТОПА (ОСНОВНЫЕ) --- */
.tiger-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Обрезает лишнее на десктопе */
    margin-bottom: 20px;
}

.tiger-main-img {
    max-width: 1000px; /* Ограничение для десктопа */
    width: 100%;
    height: auto;
    display: block;
}
.main-title {
    font-size: 56px;
    font-weight: 900;
    color: white;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    margin-bottom: 5px;
    line-height: 1;
}

.subtitle {
    font-size: 22px;
    color: #FFD700;
    font-weight: bold;
    margin-bottom: 20px;
}

.tiger-placeholder {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Обрезает всё, что не влезло по бокам */
}

.tiger-placeholder img {
    max-width: none; /* Разрешаем картинке быть больше контейнера на мобилках */
    display: block;
}

.tiger-placeholder-with-coin{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Анимация пульсации */
@keyframes pulse-yellow {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 215, 0, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
}
.btn-yellow {
    display: inline-block;
    padding: 20px 50px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B0000;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-top: 10px;
    text-decoration: none;
    animation: pulse-yellow 2s infinite ease-in-out;
    transition: transform 0.2s;
}
.btn-yellow:active {
    transform: scale(0.95);
    animation: none; /* Останавливаем пульсацию при нажатии */
}
/* Section 2 - Text + Coins */
.section-2 {
    text-align: center;
    padding: 30px 20px;
    position: relative;
    z-index: 2;
}

.text-white {
    color: white;
    line-height: 1.5;
    margin-bottom: 15px;
}

.coins-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.coins-container-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: -300px;
    overflow: hidden;
}

.coin-placeholder {
    width: 70px;
    height: 70px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px dashed rgba(255, 215, 0, 0.5);
    border-radius: 50%;
}

/* Section 3 - Wheel */
.section-3 {
    text-align: center;
    padding: 30px 20px;
    position: relative;
    z-index: 2;
}

.wheel-placeholder {
    width: 280px;
    height: 280px;
    margin: 30px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gift-placeholder {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px dashed rgba(255, 215, 0, 0.5);
}

/* Section 4 - Second Tiger */
.section-4 {
    text-align: center;
    padding: 40px 20px;
    margin-top: 150px;
    position: relative;
    z-index: 2;
    overflow: hidden;   /* Чтобы молнии не вылезали за края лендинга */
}

.title-medium {
    font-size: 36px;
    font-weight: 900;
    color: white;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Section 5 - Final */
.section-5 {
    text-align: center;
    padding: 40px 20px 60px;
    position: relative;
    z-index: 2;
    overflow: hidden;   /* Чтобы молнии не вылезали за края лендинга */
}

/* Lightning decorations */
.lightning-left,
.lightning-right {
    position: absolute;
    width: 80px;
    height: 120px;
    z-index: 1;
}

.lightning-left {
    left: 10px;
}

.lightning-right {
    right: 10px;
}
.wheel-wrapper {
    position: relative;
    margin-top: 200px;
    width: 500px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wheel {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 5s cubic-bezier(0.25, 0.1, 0.25, 1);
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.2));
}

/* СТИЛИ СЕКТОРОВ ОБНОВЛЕНЫ */
.sector {
    position: absolute;
    /* 1. Отступ от внешнего края круга (чтобы не прилипало к краям) */
    top: 10px;
    left: 50%;

    /* 2. Размеры подобраны, чтобы убрать растянутость */
    width: 120px;  /* Чуть шире */
    height: 150px; /* СИЛЬНО КОРОЧЕ (было 250px). Это убирает растянутость. */

    /* Центровка по горизонтали */
    margin-left: -60px;

    /* 3. ГЛАВНЫЙ СЕКРЕТ ОТСТУПА ОТ КНОПКИ */
    /* Мы вращаем сектор вокруг точки, которая находится далеко внизу (в центре колеса).
       240px = (Радиус колеса 250px) - (Top 10px) */
    transform-origin: 50% 240px;

    background-size: 100% 100%;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
}

.sector.prize {
    background-image: url('img/wheel/sector.png'); /* */
    z-index: 1;
    transition: transform 0.5s ease-out, background-image 0.3s ease-in; /* */
}

.sector.prize.is-win {
    background-image: url('img/wheel/price_sector.png') !important; /* */
    z-index: 10;
    filter: drop-shadow(0 0 20px #FFD700); /* */
    transform: scale(1.1); /* */
}

.sector.standard {
    background-image: url('img/wheel/sector.png');
    z-index: 1;
}

/* Подарок внутри сектора */
.prize-icon {
    width: 65px;
    height: auto;
    position: absolute;
    /* Подвинули подарок, так как сектор стал короче */
    top: 25px;
}

.spin-btn {
    position: absolute;
    width: 130px; /* Кнопка чуть меньше, чтобы подчеркнуть зазор */
    height: 130px;
    background: url('img/wheel/spen_button.png') no-repeat center center;
    background-size: contain;
    border: none;
    cursor: pointer;
    z-index: 20;
    border-radius: 50%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
    transition: transform 0.1s;
}

#spinBtn:active { transform: scale(0.9); }

.spin-btn:active {
    transform: scale(0.97);
}

/* --- МОБИЛЬНАЯ ВЕРСИЯ --- */
@media screen and (max-width: 1024px) {
    html, body {
        overflow-x: hidden; /* Убирает белую полосу/скролл сбоку */
        width: 100%;
        position: relative;
    }

    .container {
        overflow-x: hidden;
    }

    .tiger-container {
        overflow: visible; /* Позволяем тигру выйти за пределы для масштаба */
        width: 100%;
    }

    .tiger-main-img {
        /* Масштабируем тигра ОТНОСИТЕЛЬНО экрана смартфона */
        width: 150vw !important;
        max-width: none !important; /* Убираем десктопные ограничения */
        flex-shrink: 0;
    }

    /* Исправление колеса, чтобы не обрезалось */
    .section-3 {
        overflow: visible;
        padding: 0;
    }

    .wheel-placeholder {
        height: 350px;
    }

    .wheel-wrapper {
        transform: scale(0.6); /* Колесо влезет в любой телефон */
        margin-top: 0;
    }

    /* Исправление тигра с монетой внизу */
    .section-4 {
        overflow: hidden;
        margin-top: 0;
        padding: 0;
    }

    .title-medium img {
        width: 100%;
    }

    .coins-container-footer img{
        width: 100%;
        margin-top: 250px;
    }
}

/* Контейнер-ограничитель для молний */
.lightning-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px; /* Высота области, где могут быть молнии */
    overflow: hidden; /* ОБЯЗАТЕЛЬНО: обрезает всё, что выходит за края экрана */
    pointer-events: none; /* Пропускает клики сквозь себя */
    z-index: 100;
}

.corner-lightning {
    position: absolute;
    top: -70px; /* Немного приподнимаем, чтобы скрыть верхний край гифки */
    width: 350px;
    height: auto;
    pointer-events: none;
}

/* Левая молния: разворот на 180 и плотное прижатие */
.left-top {
    left: -20px; /* Сдвигаем влево, чтобы молния выходила прямо из угла */
    transform: rotate(180deg);
}

/* Правая молния: разворот на 180 + зеркальное отражение */
.right-top {
    right: -20px; /* Сдвигаем вправо */
    transform: rotate(180deg) scaleX(-1);
}

/* Базовое позиционирование молний вокруг колеса */
.wheel-lightning {
    position: absolute;
    width: 250px; /* Размер молнии */
    height: auto;
    z-index: 5;    /* Позади кнопки SPIN, но перед секторами, если нужно */
    pointer-events: none;
    opacity: 0.8;  /* Немного прозрачности для реализма */
}

/* Левая молния: касается колеса слева сверху */
.wheel-lightning-left {
    top: -50px;
    left: -186px;
    /* Разворот, чтобы молния шла по дуге колеса */
    transform: rotate(-20deg);
}

/* Правая молния: касается колеса справа снизу */
.wheel-lightning-right {
    bottom: -50px;
    right: -186px;
    /* Отзеркаливаем и поворачиваем */
    transform: rotate(160deg);
}

/* Адаптация для мобильных версий (внутри вашего @media screen and (max-width: 1024px)) */
@media screen and (max-width: 1024px) {
    .wheel-lightning {
        width: 150px; /* Уменьшаем размер молний на мобильных */
    }

    .wheel-lightning-left {
        top: -30px;
        left: -80px;
    }

    .wheel-lightning-right {
        bottom: -30px;
        right: -80px;
    }
    .corner-lightning {
        position: absolute;
        top: -20px; /* Немного приподнимаем, чтобы скрыть верхний край гифки */
        width: 100px;
        height: auto;
        pointer-events: none;
    }
}

/* Базовый фон модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

/* Контентная область (желтая карточка) */
.modal-content {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    width: 90%;
    max-width: 500px;
    padding: 40px 20px;
    border-radius: 20px;
    position: relative;
    text-align: center;
    border: 3px solid #000;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
    animation: modalShow 0.5s ease-out;
}

@keyframes modalShow {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Кнопка закрытия */
.close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #000;
    color: #FFD700;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    line-height: 35px;
    cursor: pointer;
    font-weight: bold;
    font-size: 20px;
    border: 2px solid #FFD700;
}

/* Текст внутри окна */
.modal-title {
    font-size: 32px;
    color: #331100;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.modal-subtitle {
    font-size: 18px;
    color: #331100;
    font-weight: bold;
    margin-bottom: 25px;
}

/* Кнопка в модальном окне */
.modal-btn {
    background: #B22222;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 0 #660000;
}

/* Декорации: Молния и Подарок */
.modal-lightning {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150px;
    pointer-events: none;
}

.modal-gift {
    position: absolute;
    bottom: -160px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
}

/* Адаптация под мобильные (как в mobileModal.jpg) */
@media screen and (max-width: 480px) {
    .modal-content {
        width: 85%;
        padding: 30px 15px;
    }
    .modal-title { font-size: 26px; }
    .modal-gift { width: 150px; bottom: -160px; }
}