/* --- Общие стили и фон --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #d9383c;
    background-image: url('../img/pathern.png');
    color: white;
    font-family: 'Onest', sans-serif;
}

* {
    box-sizing: border-box;
}

.main-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 20px;
    overflow: hidden;
}

/* --- Декоративные элементы --- */
.corner-banner {
    position: absolute;
    top: 0;
    z-index: 1;
}
.banner-left { 
    left: 0; 
    width: 46vw;
}
.banner-right { 
    right: 0; 
    width: 39vw;
}

.logo-container {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
.logo {
    height: 28px;
}

.bottom-swoop {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 300px;
    line-height: 0;
}
.bottom-swoop img {
    width: 100%;
    height: auto;
}

/* --- Основной контент --- */
.content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 1600px;
    z-index: 5;
}

.text-content {
    flex-basis: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mascot-container {
    flex-basis: 50%;
    text-align: center;
    margin-bottom: -100px;
}
.beaver-mascot {
    max-width: 100%;
    height: auto;
}

/* --- Стили для картинок, заменяющих текст --- */
.title-image {
    max-width: 100%;
    height: auto;
    margin-bottom: -50px;
}

.bonus-image {
    max-width: 100%;
    height: auto;
    margin-top: -30px;
}

/* --- Скретч-карта --- */
.scratch-card-container {
  position: relative;
  width: 100%;
  max-width: 425px;
  aspect-ratio: 425 / 185;
  overflow: hidden;
}

.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  cursor: none; /* Скрываем стандартный курсор */
}

.promo-code-revealed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.promo-code-revealed img {
    display: block;
    width: 100%;
    height: 100%;
}

.coin {
  display: none;
  position: fixed;
  width: 100px;  /* под твой размер */
  height: 132px;
  pointer-events: none;
  z-index: 999;
}



/* --- Адаптивность --- */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0px;
    }
    .text-content, .mascot-container {
        flex-basis: auto;
        width: 100%;
        max-width: 700px;
    }
    .main-container { padding-bottom: 80px; }
}

@media (max-width: 576px) {
    .logo-container {
        top: 32px;
    }
    .logo { height: 24px; }
    .banner-left { 
        content: url('../img/leftmob.png'); 
        width: 292px;
    }  
    .banner-right { 
        content: url('../img/rightmob.png'); 
        width: 215px;
    }
    .main-container {
        padding: 40px 20px 20px;
        justify-content: flex-start;
    }
    /* Возвращаем адекватные отступы для мобильных */
    .title-image { margin-bottom: -25px; content: url('../img/titlemob.png'); width: 375px;}
    .bonus-image { margin-top: -20px;  max-width: 320px; }
    .mascot-container { margin-bottom: 0; }
    .scratch-card-container {
        max-width: 300px;
    }
    .bottom-swoop img {
       width: 100%;
       height: 250px;
       content: url('../img/bottommob.png')
    }
}


/* --- Новые стили для Попапа --- */

/* Оверлей (темный фон) */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none; /* Установите 'flex' в JS для показа */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

/* Общая обертка для баннера и формы, чтобы они были сгруппированы */
.popup-wrapper {
    width: 100%;
    max-width: 380px; /* Общая ширина попапа */
    display: flex;
    flex-direction: column; /* Располагаем элементы друг под другом */
    align-items: center;
}

/* Блок 1: Плашка с бонусом */
.popup-bonus-banner {
    width: 100%;
    max-width: 360px; /* Максимальная ширина, как вы просили */
    height: auto;
    display: block;
    z-index: 2; /* Будет немного поверх формы */
    /* Отрицательный отступ, чтобы плашка "наезжала" на форму */
    margin-bottom: 10px; 
}

/* Блок 2: Основной контейнер формы */
.popup-form-container {
    position: relative;
    width: 360px;
    background-image: url('../img/popbg.png');
    background-size: 100% 100%; /* Растягиваем фон на всю доступную высоту и ширину */
    background-repeat: no-repeat;
    border-radius: 12px;
    padding: 20px;
    z-index: 1;
}

/* Хедер внутри формы (для заголовка и крестика) */
.popup-header {
    display: flex;
    justify-content: center; /* Центрируем заголовок */
    align-items: center;
    width: 100%;
    margin-bottom: 36px; /* Отступ до начала полей формы */
    padding-top: 0px; /* Небольшой отступ сверху */
}

.popup-registration-title {
    height: 17px; /* Задаем высоту для картинки-заголовка */
    width: auto;
}

.popup-close-button {
    position: absolute; /* Позиционируем относительно .popup-form-container */
    top: 17px;
    right: 19px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

/* Область для вашей формы (я добавил рамку для наглядности) */
.form-content-area {
    width: 100%;
}