
@font-face {
    font-family: 'Onest';
    src: url('fonts/Onest-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Onest';
    src: url('fonts/Onest-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Onest';
    src: url('fonts/Onest-Medium.ttf') format('ttf');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}




* {
    box-sizing: border-box;
    font-family: Onest;
}



body {
    margin: 0;
    background: #444444;
    color: #fff;
}


/* 1. Задний фон (Overlay) */
.twilight_popup_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

}

/* 2. Контейнер самого попапа (Строго 520x450) */
.twilight_popup_container {
    position: relative;
    width: 520px;
    height: 450px;
    background-color: #2e2e2e;
    
    border-radius: 30px;
    /* Большой радиус скругления углов */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Кнопка закрытия (крестик) */
.twilight_popup_close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background-color: #46464699;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s;
}

.twilight_popup_close:hover {
    background-color: rgba(255, 255, 255, 0.25);
}


/* Изображение внутри попапа */
.twilight_popup_image {
    width: 100%;
    height: 370px;
    /* Оптимальная высота, чтобы оставить место под текст и кнопки */
    object-fit: cover;
    display: block;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
    /* -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%); */
}

/* Блок с текстом и кнопками */
.twilight_popup_content {
    padding: 0 20px 20px 20px;
    text-align: center;
    margin-top: -50px;
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Выравнивание элементов по нижней границе карточки */
    box-sizing: border-box;
}

/* Заголовок-вопрос */
.twilight_popup_title {
    font-family: 'Onest', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 25px;
}

/* Контейнер для кнопок действий */
.twilight_popup_buttons {
    display: flex;
    gap: 8px;
}

/* Компактные кнопки точного размера */
.twilight_btn {
    font-family: 'Onest', sans-serif;
    font-size: 16px;
    font-weight: 700;

    flex: 1;
    width: 236px;
    height: 52px;
    border-radius: 15px;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s;


}

.twilight_btn:hover {
    opacity: 0.8;
}


.twilight_btn_cyan {
    background-color: #00d9f6;
    color: #000000;
}


.twilight_btn_dark {
    background-color: #000000;
    color: #ffffff;
}

@media (max-width: 550px) {

    .twilight_popup_container {
        width: calc(100% - 40px);
        height: auto;
    }
}