/* Обнуление и базовые настройки */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
    color: white;
    background-color: #12131a !important;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Экран загрузки (Прелоадер) */
.page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #12131a;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preloader-logo {
    max-width: 110px;
    height: auto;
    animation: preloaderPulse 1.5s ease-in-out infinite alternate;
}

@keyframes preloaderPulse {
    0% { transform: scale(0.96); opacity: 0.8; }
    100% { transform: scale(1.04); opacity: 1; filter: drop-shadow(0 0 15px rgba(224, 122, 95, 0.4)); }
}

.preloader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #E07A5F;
    border-radius: 50%;
    animation: preloaderSpin 0.8s linear infinite;
}

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

/* Задний фон */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    filter: blur(6px) brightness(0.35);
    transform: scale(1.05);
    z-index: 1;
}

/* Тонкий виньеточный градиент поверх фона */
.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, transparent 30%, rgba(18, 19, 26, 0.75) 100%);
    z-index: 2;
}

/* Шапка страницы */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 80px;
    background-color: #12131a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 0 80px;
    box-sizing: border-box;
}

.container {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Основная карточка формы */
.game-form {
    width: 100%;
    max-width: 490px;
    height: auto;
    min-height: fit-content;
    border-radius: 24px;
    background-color: rgba(18, 19, 26, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 55px 50px;
    box-sizing: border-box;
}



/* Заголовок с масштабируемым текстом */
.form-title {
    text-align: center;
    /* Текст масштабируется: минимум 1.1rem, максимум 1.5rem в зависимости от ширины */
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    font-weight: 700;
    margin: 0 0 25px 0;
    line-height: 1.3;
}

/* Описание (списки) */
.form-description {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    line-height: 1.5;
    margin-bottom: 25px;
}

.form-description ul {
    list-style-type: disc;
    margin: 0;
    padding-left: 40px;
}

/* Контейнер для кнопок и инпутов */
.activation-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Равномерный отступ между всеми элементами */
}

/* Общий стиль для кнопок-ссылок и обычных кнопок */
.btn-get-link,
.btn-thanks-link,
.btn-review-link,
.btn-submit,
.btn-get-link a,
.btn-review-link a {
    width: 100%;
    min-height: 54px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    color: inherit;
}

.btn-get-link {
    background-color: #E07A5F;
    color: white;
}

.btn-review-link {
    background-color: #81B29A;
    color: white;
}

.btn-thanks-link {
    background-color: white;
    color: #757575;
}

.btn-submit {
    background-color: #81B29A;
    color: white;
    font-family: inherit;
    margin-top: 10px;
}

.btn-submit:hover:not(:disabled) {
    background-color: #6a957d;
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background-color: #4a4c63;
    color: #7a7c91;
    cursor: not-allowed;
}

/* Поле ввода */
.text-input {
    width: 100%;
    height: 54px;
    border-radius: 15px;
    border: 2px solid transparent;
    text-align: center;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    color: #34364E;
    box-sizing: border-box;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

.text-input:focus {
    outline: none;
    border-color: #81B29A;
}

/* Статус проверки логина */
#login-status {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    min-height: 20px;
}

/* Стили для модального окна */
.modal-overlay {
    display: none;
    /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    /* Темный полупрозрачный фон */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #2b2b3a;
    /* Темный цвет фона окна */
    padding: 30px;
    border-radius: 25px;
    width: 90%;
    max-width: 450px;
    position: relative;
    text-align: center;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    color: white;
}

.modal-close-x {
    position: absolute;
    right: 20px;
    top: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 30px;
    cursor: pointer;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-right: 20px;
    text-align: left;
    line-height: 1.3;
}

.modal-video-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
}

.modal-video-container img {
    width: 100%;
    display: block;
}

.modal-text {
    font-size: 0.95rem;
    color: #ccc;
    text-align: left;
    line-height: 1.5;
    margin-bottom: 25px;
}

.modal-text a {
    color: #E07A5F;
    text-decoration: underline;
}

.modal-btn-ok {
    width: 100%;
    background-color: #f0f0f0;
    color: #333;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn-ok:hover {
    background-color: #ffffff;
}

/* Логотип в шапке */
.logo-top-left {
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 10;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    max-width: 90px; /* Слегка увеличили */
    height: auto;
    display: block;
}

/* Адаптивность для мобильных */
@media (max-width: 900px) {
    html, body {
        display: block;
        min-height: 100vh;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 0 20px;
    }
    .game-form {
        padding: 30px 20px;
        border-radius: 20px;
    }
}