@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Onest';
    src: url('../font/Onest-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

body {
    font-family: "Onest", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    max-width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: #000000;
}

/* Видео-фон со снегом */
.snowBackground {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
}

.screenFirst {
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 72px;
    overflow: hidden;
    box-sizing: border-box;
}

.heading {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    align-self: stretch;
    z-index: 2;
}

.wheelDesc {
    color: rgba(255, 255, 255, 0.80);
    max-width: 732px;
    text-align: center;
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.startButton {
    all: unset;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 3;
}

.startButton:hover {
    transform: scale(1.05);
    filter: blur(1px);
}

.wheelImage {
    position: absolute;
    bottom: -50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

.wheelBackground {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.screenSecond {
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 72px;
    overflow: hidden;
    box-sizing: border-box;
}

.headingSecond {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    align-self: stretch;
    z-index: 2;
}

.prizeHeading {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    align-self: stretch;
    z-index: 2;
}

.foodImage {
    width: 276px;
    margin-bottom: -42px;
}

.countryHeadingImage {
    height: 122px;
    width: auto;
    margin-top: -42px;
}

.wheelImage.Second {
    position: absolute;
    width: calc(100vw - 220px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

.buttons {
    display: flex;
    width: 480px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
}

.takePrize,
.spinAgain {
    all: unset;
    display: flex;
    padding: 32px 48px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border-radius: 999px;
    background: #FFF;
    color: #000;
    text-align: center;
    font-size: 18px;
    font-style: normal;
    font-weight: 800;
    line-height: normal;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spinAgain {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.80);
}

.takePrize:hover {
    opacity: 0.8;
}

.spinAgain:hover {
    background: rgba(255, 255, 255, 0.30);
}

/* ===========================
   КОНТЕНТ ПРИЗОВ
   =========================== */

.prizeContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.prizeContent.hidden {
    display: none;
}

/* Видео плейсхолдер */
.videoPlaceholder {
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.videoPlaceholderInner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.playIcon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
}

.videoPlaceholder iframe,
.videoPlaceholder video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

/* Видео обёртка */
.videoWrapper {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 9/16;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.prizeVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

/* Специальные изображения (без country header) */
.specialContent .specialImage {
    width: 320px;
    margin-bottom: 0;
}

.specialContent .specialDesc {
    max-width: 600px;
}

/* ===========================
   АНИМАЦИИ
   =========================== */

/* Бесконечное вращение колеса */
@keyframes wheelSpin {
    from {
        transform: translateX(-50%) rotate(0deg);
    }

    to {
        transform: translateX(-50%) rotate(360deg);
    }
}

@keyframes wheelSpinCentered {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Плавное появление */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Плавное исчезновение */
@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Появление снизу */
@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Состояния экранов */
.screenFirst {
    position: absolute;
    top: 0;
    left: 0;
}

.screenSecond {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

.screenSecond.active {
    opacity: 1;
    pointer-events: auto;
}

.screenFirst.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Вращение колеса на первом экране */
.wheelImage.spinning {
    animation: wheelSpin 20s linear infinite;
}

/* Вращение колеса на втором экране */
.wheelImage.Second.spinning {
    animation: wheelSpinCentered 25s linear infinite;
}

/* Анимация исчезновения элементов первого экрана */
.heading.fade-out,
.startButton.fade-out {
    animation: fadeOut 0.6s ease forwards;
}

/* Stagger-анимации для второго экрана */
.screenSecond .foodImage,
.screenSecond .specialImage {
    opacity: 0;
}

.screenSecond .countryHeadingImage {
    opacity: 0;
}

.screenSecond .headingSecond .wheelDesc,
.screenSecond .headingSecond .prizeDesc {
    opacity: 0;
}

.screenSecond .buttons {
    opacity: 0;
}

.screenSecond .videoPlaceholder {
    opacity: 0;
}

.screenSecond.active .foodImage,
.screenSecond.active .specialImage {
    animation: slideUpFadeIn 0.7s ease forwards;
    animation-delay: 0.1s;
}

.screenSecond.active .countryHeadingImage {
    animation: slideUpFadeIn 0.7s ease forwards;
    animation-delay: 0.25s;
}

.screenSecond.active .headingSecond .wheelDesc,
.screenSecond.active .headingSecond .prizeDesc {
    animation: slideUpFadeIn 0.7s ease forwards;
    animation-delay: 0.4s;
}

.screenSecond.active .videoPlaceholder,
.screenSecond.active .videoWrapper {
    animation: slideUpFadeIn 0.7s ease forwards;
    animation-delay: 0.4s;
}

.screenSecond .videoWrapper {
    opacity: 0;
}

.screenSecond.active .buttons {
    animation: slideUpFadeIn 0.7s ease forwards;
    animation-delay: 0.55s;
}

/* Плавный переход экранов */
.screenFirst,
.screenSecond {
    transition: opacity 0.8s ease;
}

/* ===========================
   АДАПТИВНОСТЬ
   =========================== */

@media (max-width: 1920px) {
    .wheelImage {
        width: 1200px;
    }
}

@media (max-width: 1440px) {
    .wheelImage {
        width: 900px;
    }

    .startWheelButton {
        max-width: 128px;
    }
}

@media (max-width: 1024px) {

    .screenFirst,
    .screenSecond {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .wheelDesc {
        max-width: 90%;
        font-size: 16px;
        padding: 0 24px;
    }

    .wheelImage {
        width: calc(100vw - 200px);
    }

    .wheelImage.Second {
        width: calc(100vw - 100px);
    }

    .foodImage {
        width: 220px;
        margin-bottom: -32px;
    }

    .countryHeadingImage {
        height: 100px;
        margin-top: -32px;
    }

    .buttons {
        width: 90%;
        max-width: 400px;
    }

    .takePrize,
    .spinAgain {
        padding: 24px 36px;
        font-size: 16px;
    }
}

/* Маленькие мобильные */
@media (max-width: 450px) {

    .screenFirst,
    .screenSecond {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .screenSecond {
        justify-content: center;
        gap: 24px;
    }

    .headingImage {
        max-width: 90%;
        height: auto;
    }

    .wheelImage {
        width: calc(200vw);
    }

    .wheelImage.spinning {
        width: calc(200vw);
    }

    .wheelDesc {
        font-size: 13px;
        padding: 0 16px;
    }

    .foodImage {
        width: 150px;
        margin-bottom: -24px;
    }

    .countryHeadingImage {
        height: 64px;
        margin-top: -24px;
    }

    .takePrize,
    .spinAgain {
        padding: 16px 20px;
        font-size: 13px;
    }

    .videoWrapper {
        max-width: calc(100vw - 64px);
        aspect-ratio: 16/9;
    }
}