@font-face {
    font-family: 'SemiBold';
    src: url('./Montserrat-SemiBold.woff2') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.cta-install {
    margin-left: auto;
    margin-right: auto;
    margin-top: 2svh;
    background: #40c35a;
    border: 0.2svh solid #55d16c;
    color: #0f2a14;
    border-radius: 1.4svh;
    padding: 1.2svh 3svh;
    font-size: 3svh;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    width: fit-content;
}


html {
    overflow: hidden;
    position: relative;
}

body {
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 100vw;
    height: 100svh;
    background-color: #716c69;
    font-family: 'SemiBold', sans-serif;
}

body * {
    box-sizing: border-box;
}

.main-content {
    height: 100%;
    width: 100%;
}

#confetti {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    z-index: 9999 !important;
    pointer-events: none;
}

.top-panel {
    height: 10svh;
    background: #313131;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1svh 5svh;
}

.logo {
    height: 50%;
    z-index: 300;
    position: relative;
}

.balance-top {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5svh;
    background: #555555;
    color: white;
    font-size: 3.5svh;
    padding: 1svh 2svh;
    border-radius: 2svh;
    width: 25svh;
    user-select: none;
}

.currency-symbol {
    font-weight: 800;
    line-height: 1;
}

.panel {
    background: #2f3134;
    border-top: 0.2svh solid #4f5154;
    height: 20svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2svh;
    font-size: 2.4svh;
}

.panel * {
    white-space: nowrap;
}

.panel-shell {
    width: 100%;
    height: 100%;
    border: 0.2svh solid #4f5154;
    border-radius: 1.2svh;
    background: #3a3c3f;
    display: flex;
    align-items: stretch;
    gap: 1.2svh;
    padding: 0.9svh 1.2svh;
}

.panel button {
    padding: 0;
    outline: none;
    border: 0.2svh solid #4f5154;
    border-radius: 1svh;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
}

#playButton {
    margin-left: auto;
    width: 34svh;
    height: 100%;
    border-radius: 1.2svh;
    background: #40c35a;
    border-color: #55d16c;
    font-size: 7svh;
    font-weight: 700;
    color: #f3fff6;
    text-shadow: 0 0.12svh 0 rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-transform: none;
}

#playButton:active {
    scale: 0.9;
}

.panel-hidden-action {
    display: none !important;
}

.bet-container {
    color: #f5f6f7;
    display: flex;
    flex-direction: column;
    gap: 1svh;
    font-size: 2.3svh;
    padding: 0.8svh;
    background: #4b4d50;
    border-radius: 1svh;
    min-width: 30svh;
    height: 100%;
    justify-content: center;
}

.bet-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #5a5c5f;
    padding: 0.55svh 0.8svh;
    border-radius: 1svh;
    width: 100%;
    font-weight: 600;
}

.min-max {
    font-size: 0.8em;
    background: #6a6c6f;
    padding: 0.4svh 0.8svh;
    border-radius: 0.7svh;
}

.bet-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8em;
    width: 100%;
    gap: 0.6svh;
}

.bet-option {
    flex: 1;
    background: #5a5c5f;
    padding: 0.6svh 0.7svh;
    border-radius: 0.8svh;
    border: 0.2svh solid transparent;
    font-weight: 700;
    text-align: center;
    transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.bet-option.active {
    background: #7a7c7f;
    border-color: #9a9c9f;
    transform: translateY(-0.15svh);
}

.bet-option:disabled,
.difficulty-option:disabled {
    cursor: default;
    pointer-events: none;
    opacity: 1;
    padding: 1svh 0;
}

.panel-center {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9svh;
    min-width: 0;
}

.panel-headings {
    display: flex;
    justify-content: space-between;
    color: #ededed;
    font-size: 0.8em;
    padding: 0 0.3svh;
}

.difficulty-track {
    --difficulty-accent: #6a8fad;
    height: 5.2svh;
    background: #5a5c5f;
    border-radius: 1svh;
    padding: 0.4svh;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4svh;
    box-shadow: inset 0 0 0 0.28svh color-mix(in srgb, var(--difficulty-accent) 42%, transparent);
    transition: box-shadow 0.25s ease;
}

.difficulty-option {
    border: none;
    border-radius: 0.8svh;
    background: transparent;
    color: #f1f1f1;
    font-family: inherit;
    font-size: 0.72em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5svh;
    padding: 0.2svh 0.2svh;
    transition: transform 0.12s ease, background 0.12s ease;
    text-transform: none;
}

.difficulty-option.active {
    background: var(--difficulty-accent, #7a7c7f);
    color: #fff;
    min-height: 4.2svh;
    transform: translateY(-0.25svh);
    z-index: 2;
    box-shadow: 0 0.2svh 0.8svh color-mix(in srgb, var(--difficulty-accent) 55%, transparent);
}

.panel-headings span:last-child {
    color: var(--difficulty-accent, #f5ae31);
    transition: color 0.25s ease;
}

.panel-center.difficulty-pulse {
    animation: difficulty-pulse 0.32s ease;
}

@keyframes difficulty-pulse {
    0% {
        transform: scale(1);
    }
    45% {
        transform: scale(1.03);
    }
    100% {
        transform: scale(1);
    }
}

body[data-difficulty="easy"] .scene-wrap {
    box-shadow: inset 0 0 3svh rgba(76, 175, 106, 0.12);
}

body[data-difficulty="medium"] .scene-wrap {
    box-shadow: inset 0 0 2.5svh rgba(106, 143, 173, 0.1);
}

body[data-difficulty="hard"] .scene-wrap {
    box-shadow: inset 0 0 3svh rgba(224, 149, 53, 0.16);
}

body[data-difficulty="extreme"] .scene-wrap {
    box-shadow: inset 0 0 3.5svh rgba(224, 78, 78, 0.22);
}

body[data-difficulty="extreme"] .car {
    filter: saturate(1.15) brightness(1.05);
}

.scene-wrap {
    position: relative;
    height: 70svh;
    overflow: hidden;
}

.scene {
    display: flex;
    height: 100%;
    width: fit-content;
    overflow: hidden;
}

.segment {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url("../images/wall-cropped.webp");
    background-position: center center;
    background-size: 100% 102%;
    background-repeat: no-repeat;
    width: 30svh;
    padding-bottom: 8svh;
}

.exit {
    background-image: url("../images/wall-exit.webp");
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 60svh;
}

.segment:nth-of-type(1) {
    background-image: url("../images/wall-enter.webp");
}

.circle-container {
    width: 15svh;
    aspect-ratio: 1/1;
    background-image: url("../images/circle.webp");
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    margin-top: 12svh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
    transform: scale(1);
    opacity: 1;
}


.segment.active .circle-container:not(.bonus-circle) {
    background-image: url("../images/circle-gold.webp");
}

.segment-top {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.blocker {
    opacity: 0;
    width: 75%;
    transform: translate(0%, -140%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: relative;
    z-index: 100;
    margin-top: 2svh;
}

.segment.active .blocker {
    opacity: 1;
    transform: translate(0, 0);
}

.multiplier {
    line-height: 1;
    color: #e6e6e6;
    text-shadow: #46433f 0px 0.5svh;
    font-size: 3.6svh;
    text-align: center;
    transition: opacity 0.3s ease;
}

.segment.active .multiplier {
    opacity: 0;
}


.chicken-container {
    position: absolute;
    top: 54%;
    left: 0svh;
    width: 36svh;
    aspect-ratio: 225/256;
    transform: translateY(-50%);
    z-index: 100;
    background-image: url("../images/chicken/idle.gif");
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    transition: opacity 0.2s ease, left 0.5s ease-out;
    transition: opacity 0.2s ease, left 0.5s ease-out;
}

.chicken-container.jump {
    background-image: url("../images/chicken/jump.gif");
}

.chicken-container.win {
    background-image: url("../images/chicken/win.gif");
}

.chicken-container.preload {

    opacity: 0;
}

.chicken-container.hide {
    opacity: 0;
}



.car {
    position: absolute;
    width: 50%;
    z-index: 8;
    top: -30svh;
    left: 50%;
    transform: translateX(-50%);
    transition: top 3s linear;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1000;
    backdrop-filter: blur(2px);
    background: #000000a9;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.2);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.win-screen {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2svh;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

body.win-screen-visible .win-screen {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.win-screen__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 12, 20, 0.52);
    backdrop-filter: blur(14px);
}

.win-screen__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(92vw, 54svh);
    pointer-events: none;
    transform: scale(0.88);
    opacity: 0;
    transition:
        transform 0.7s cubic-bezier(0.22, 1.15, 0.36, 1),
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

body.win-screen-visible .win-screen__panel {
    transform: scale(1);
    opacity: 1;
}

body.win-screen-visible .win-screen__title,
body.win-screen-visible .win-screen__amount {
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.12s,
        transform 0.6s cubic-bezier(0.22, 1.1, 0.36, 1) 0.1s;
}

.win-screen__copy .win-screen__title {
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.35s ease-out,
        transform 0.4s ease-out;
}

.win-screen__copy .win-screen__amount {
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.4s ease-out 0.05s,
        transform 0.45s cubic-bezier(0.22, 1.05, 0.36, 1) 0.05s;
}

.win-screen__shine {
    position: absolute;
    left: 50%;
    top: 38%;
    width: min(130vw, 130svh);
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: winShineSpin 32s linear infinite;
}

@keyframes winShineSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.win-screen__table-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(88vw, 50svh);
    pointer-events: none;
}

.win-screen__table {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.win-screen__copy {
    position: absolute;
    left: 50%;
    bottom: 15%;
    transform: translateX(-50%);
    width: 88%;
    text-align: center;
    pointer-events: none;
}

.win-screen__title {
    margin: 0 0 0.6svh;
    font-weight: 900;
    letter-spacing: 0.28svh;
    text-transform: uppercase;
    color: #FAD23D;
    font-size: clamp(1.75rem, 3.8svh, 2.85rem);
    text-shadow:
        0 0.12svh 0 #b87418,
        0 0.22svh 0 #8a5610,
        0 0 1.2svh rgba(255, 220, 120, 0.65),
        0 0.4svh 0.75svh rgba(0, 0, 0, 0.5);
}

.win-screen__amount {
    margin: 0;
    font-weight: 900;
    letter-spacing: 0.1svh;
    color: #FAD23D;
    font-size: clamp(2.25rem, 5.8svh, 4rem);
    text-shadow:
        0 0.15svh 0 #985908,
        0 0.25svh 0 #6d3f06,
        0 0 1svh rgba(255, 236, 140, 0.55),
        0 0.55svh 1svh rgba(0, 0, 0, 0.55);
}

.endcard-screen {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    background: rgba(10, 12, 18, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.65s cubic-bezier(0.4, 0, 0.2, 1),
        backdrop-filter 0.65s ease;
}

.endcard-screen.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.endcard--screen {
    max-height: 100%;
}

.endcard {
    width: 100vw;
    height: 100svh;
    min-height: 100dvh;
    background: center / cover no-repeat url("../images/endcard/bg-desktop.webp");
}

.endcard-inner {
    box-sizing: border-box;
    width: 100%;
    max-width: min(96vw, 110svh);
    margin: 0 auto;
    padding:
        calc(1.2svh + env(safe-area-inset-top, 0)) calc(3vw + env(safe-area-inset-right, 0)) calc(0.5svh + env(safe-area-inset-bottom, 0)) calc(3vw + env(safe-area-inset-left, 0));
    display: flex;
    flex-direction: column;
    gap: min(2.2svh, 2.8vw);
    min-height: min(100dvh, 100svh);
}

.endcard-screen .endcard-logo,
.endcard-screen .endcard-chicken,
.endcard-screen .endcard-amount,
.endcard-screen .endcard-fs {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition:
        opacity 0.56s cubic-bezier(0.33, 1, 0.32, 1),
        transform 0.65s cubic-bezier(0.22, 1.1, 0.36, 1);
}

.endcard-screen.is-visible .endcard-logo {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.08s;
}

.endcard-screen.is-visible .endcard-chicken {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.15s;
}

.endcard-screen.is-visible .endcard-amount {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.23s;
}

.endcard-screen.is-visible .endcard-fs {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.3s;
}

.endcard-logo {
    width: min(32svh, 52vw);
    max-width: min(52vw, 72vw);
    height: auto;
    align-self: center;
    display: block;
}

.endcard-layout {
    flex: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: min(2.4svh, 4vw) min(3vw, 5svh);
    padding-top: min(1.5svh, 2.5vw);
    margin-top: auto;
    padding-bottom: min(3.5svh, 8vw);
}

.endcard-chicken {
    flex: 1 1 min(28svh, 42vw);
    width: min(40svh, 44vw);
    max-width: min(82vw, 48svh);
    height: auto;
    display: block;
    filter: drop-shadow(0 2.2svh 0 rgba(0, 0, 0, 0.35));
}

.endcard-copy {
    flex: 1 1 min(26svh, 40vw);
    width: min(42vw, 48svh);
    max-width: min(92vw, 52svh);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: min(1.4svh, 1.6vw);
}

.endcard-amount {
    font-size: 9svh;
    line-height: 1;
    font-weight: 1000;
    color: #FAD23D;
    text-shadow:
        0 0.12svh 0 #b87418,
        0 0.22svh 0 #8a5610,
        0 0 1.2svh rgba(255, 220, 120, 0.65),
        0 0.4svh 0.75svh rgba(0, 0, 0, 0.5);
    letter-spacing: 0.01em;
}

.endcard-currency {
    margin-right: 0.25em;
}

.endcard-fs {
    font-size: 3.5vw;
    font-weight: 1000;
    color: #FAD23D;
    text-shadow:
        0 0.12svh 0 #b87418,
        0 0.22svh 0 #8a5610,
        0 0 1.2svh rgba(255, 220, 120, 0.65),
        0 0.4svh 0.75svh rgba(0, 0, 0, 0.5);
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
}

.endcard-play {
    width: 40vw;
    height: clamp(5.8svh, 7.2svh, 8.8svh);
    border-radius: 1svh;
    background: #40c35a;
    border: 0.25svh solid #55d16c;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f3fff6;
    font-weight: 1000;
    font-size: clamp(2.6svh, 3.8vw, 4.8svh);
    text-shadow: 0 0.12svh 0 rgba(0, 0, 0, 0.35);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transform: translate3d(0, 16px, 0);
    opacity: 0;
    box-shadow: 0 0.8svh 0 rgba(0, 0, 0, 0.25), inset 0 0.25svh 0 rgba(255, 255, 255, 0.22);
    transition:
        opacity 0.5s cubic-bezier(0.33, 1, 0.32, 1),
        transform 0.58s cubic-bezier(0.22, 1.1, 0.36, 1),
        filter 0.25s ease,
        box-shadow 0.35s ease;
}

.endcard-screen.is-visible .endcard-play {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition-delay: 0.36s, 0.36s, 0s, 0s;
    animation: endcard-cta-pulse 2.15s ease-in-out 0.95s infinite;
}

.endcard-play:active {
    filter: brightness(0.9);
    animation-play-state: paused;
}

@keyframes endcard-cta-pulse {

    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: brightness(1);
        box-shadow:
            0 0.8svh 0 rgba(0, 0, 0, 0.26),
            inset 0 0.26svh 0 rgba(255, 255, 255, 0.24),
            0 0 0 0 rgba(85, 209, 108, 0.4);
    }

    50% {
        transform: translate3d(0, 0, 0) scale(1.06);
        filter: brightness(1.1);
        box-shadow:
            0 0.72svh 0 rgba(0, 0, 0, 0.2),
            inset 0 0.28svh 0 rgba(255, 255, 255, 0.32),
            0 0 min(2.8svh, 30px) min(0.6svh, 10px) rgba(85, 209, 108, 0.65);
    }
}

@media (prefers-reduced-motion: reduce) {

    .win-screen,
    .win-screen__panel,
    .endcard-screen,
    .endcard-screen .endcard-logo,
    .endcard-screen .endcard-chicken,
    .endcard-screen .endcard-amount,
    .endcard-screen .endcard-fs,
    .endcard-screen .endcard-play {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    body.win-screen-visible .win-screen__title,
    body.win-screen-visible .win-screen__amount,
    .win-screen__copy .win-screen__title,
    .win-screen__copy .win-screen__amount {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }

    .endcard-screen.is-visible .endcard-play {
        animation: none !important;
    }

    .endcard-screen .endcard-logo,
    .endcard-screen .endcard-chicken,
    .endcard-screen .endcard-amount,
    .endcard-screen .endcard-fs,
    .endcard-screen .endcard-play {
        opacity: 1 !important;
        transform: none !important;
    }

    body.win-screen-visible .win-screen__title,
    body.win-screen-visible .win-screen__amount {
        opacity: 1 !important;
        transform: none !important;
    }

    .win-screen__copy .win-screen__title,
    .win-screen__copy .win-screen__amount {
        opacity: 1 !important;
        transform: none !important;
    }
}

.title-start {
    font-size: 4.5svh;
    color: white;
    cursor: pointer;
}

#modal2 {
    background: none;
    backdrop-filter: blur(0);
    pointer-events: none;
    align-items: start;
    padding-top: 10svh;
}

#modal2 .modal-content {
    background-image: url('../images/win.webp');
    background-size: 100% 100%;
    width: 60svh;
    min-width: 60svh;
    aspect-ratio: 596/254;
}

.title-modal {
    position: absolute;
    top: 30.5%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 6svh;
    color: black;
    text-shadow: .2svh .2svh .1svh rgb(65, 65, 65);
}

.winGame {
    position: absolute;
    top: 64.5%;
    left: 52%;
    transform: translate(-50%, -50%);
    font-size: 6svh;
    text-wrap: nowrap;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1svh;

    img {
        width: 4.5svh;
    }
}

@media (max-aspect-ratio: 923/945) {
    .scene-wrap {
        height: 64svh;
    }

    .segment {
        width: 20svh;
    }

    .chicken-container {
        left: -3svh;
        width: 31svh;
        top: 52%;
    }

    .circle-container {
        margin-top: 5svh;
    }

    .blocker {
        margin-top: 10svh;
    }

    .car {
        width: 80%;
    }

    .circle-container {
        width: 12svh;
    }

    .multiplier {
        font-size: 4svh;
    }

    .panel {
        height: auto;
        min-height: 24svh;
        padding: 0.9svh;
        margin-top: auto;
        flex-shrink: 0;
    }

    .panel-shell {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8svh;
        padding: 0.9svh;
        border-radius: 1.1svh;
    }

    .bet-container {
        min-width: 100%;
        font-size: 1.9svh;
        height: auto;
    }

    .bet-top {
        padding: 0.5svh 0.9svh;
    }

    .bet-bottom {
        gap: 0.5svh;
    }

    .panel-center {
        height: auto;
        gap: 0.6svh;
    }

    .panel-headings {
        display: none;
    }

    .difficulty-track {
        height: auto;
        background: transparent;
        padding: 0;
        display: block;
    }

    .difficulty-option {
        display: none;
    }

    .difficulty-option.active {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 4.8svh;
        padding: 0 1.2svh;
        border-radius: 0.8svh;
        background: #5a5c5f;
        transform: none;
    }

    #playButton {
        width: 100%;
        height: 5.6svh;
        font-size: 4.8svh;
        border-radius: 0.9svh;
    }

    .top-panel {
        gap: 5vw;
        padding: 0 2vw;
    }

    .logo {
        width: 35%;
        height: auto;
    }

    .win-screen {
        padding: 2svh max(2vw, env(safe-area-inset-right, 0)) 2svh max(2vw, env(safe-area-inset-left, 0));
    }

    .win-screen__panel {
        width: min(90vw, 50svh);
    }

    .win-screen__table-wrap {
        max-width: min(88vw, 48svh);
    }

    .win-screen__copy {
        bottom: 17%;
    }

    .endcard {
        background-image: url("../images/endcard/bg-desktop.webp");
    }

    .endcard-inner {
        max-width: min(96vw, 100svh);
    }

    .endcard-layout {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: end;
        justify-content: center;
    }

    .endcard-chicken {
        flex: 1 1 min(26svh, 40vw);
        width: min(38svh, 44vw);
        max-width: min(48vw, 46svh);
    }

    .endcard-copy {
        flex: 1 1 min(24svh, 38vw);
        width: min(44vw, 46svh);
        max-width: min(52vw, 50svh);
    }

    .endcard-amount {
        font-size: 12vw;
    }

    .endcard-fs {
        font-size: 5vw;
    }

    .endcard-play {
        width: min(68vw, 42svh);
        height: clamp(5.6svh, 7svh, 8.2svh);
        font-size: clamp(2.5svh, 3.5vw, 4.5svh);
    }
}

@media (max-aspect-ratio:9/16) {
    .endcard {
        background-image: url("../images/endcard/bg-mobile.webp");
    }

    #modal2 .modal-content {
        width: 45svh;
        min-width: 45svh;
    }

    .title-modal {
        font-size: 4.5svh;
    }

    .winGame {
        top: 65.5%;
        font-size: 5svh;

        img {
            width: 4svh;
        }
    }

    .win-screen {
        padding: max(1.5svh, env(safe-area-inset-top, 0)) max(2vw, env(safe-area-inset-right, 0)) max(2svh, env(safe-area-inset-bottom, 0)) max(2vw, env(safe-area-inset-left, 0));
    }

    .win-screen__panel {
        width: min(94vw, 58svh);
    }

    .win-screen__shine {
        top: 40%;
        width: min(130vw, 115svh);
    }

    .win-screen__table-wrap {
        max-width: min(92vw, 54svh);
    }

    .win-screen__copy {
        bottom: min(18%, calc(14% + 2vw));
        width: 90%;
    }

    .win-screen__title {
        margin-bottom: min(0.6svh, 1.2vw);
        font-size: 7vw;
        letter-spacing: min(0.28svh, 0.6vw);
        text-shadow:
            0 min(0.12svh, 0.25vw) 0 #b87418,
            0 min(0.22svh, 0.45vw) 0 #8a5610,
            0 0 min(1.2svh, 2.5vw) rgba(255, 220, 120, 0.65),
            0 min(0.4svh, 0.85vw) min(0.75svh, 1.5vw) rgba(0, 0, 0, 0.5);
    }

    .win-screen__amount {
        font-size: 7vw;
        letter-spacing: min(0.1svh, 0.25vw);
        text-shadow:
            0 min(0.15svh, 0.35vw) 0 #985908,
            0 min(0.25svh, 0.5vw) 0 #6d3f06,
            0 0 min(1svh, 2.2vw) rgba(255, 236, 140, 0.55),
            0 min(0.55svh, 1.1vw) min(1svh, 2vw) rgba(0, 0, 0, 0.55);
    }

    .endcard-inner {
        max-width: 100%;
        gap: min(1.8svh, 2.5vw);
        padding-bottom: max(0.5svh, env(safe-area-inset-bottom, 0));
    }

    .endcard-logo {
        width: min(28svh, 72vw);
        max-width: 72vw;
    }

    .endcard-layout {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        gap: min(1.6svh, 2.5vw);
        padding-bottom: min(4svh, 8vw);
    }

    .endcard-chicken {
        flex: 0 1 auto;
        width: min(34svh, 82vw);
        max-width: 82vw;
    }

    .endcard-copy {
        flex: 0 1 auto;
        width: 92vw;
        max-width: 92vw;
    }

    .endcard-amount {
        font-size: 18vw;
    }

    .endcard-fs {
        font-size: 6.5vw;
    }

    .endcard-play {
        width: 60vw;
        height: clamp(5.4svh, 6.6svh, 7.6svh);
        font-size: 8vw;
    }
}


@media (min-aspect-ratio: 1/1) {
    .win-screen {
        padding: 2svh max(3vw, env(safe-area-inset-right, 0)) 2svh max(3vw, env(safe-area-inset-left, 0));
    }

    .win-screen__panel {
        width: min(78vw, 58svh);
    }

    .win-screen__shine {
        top: 36%;
        width: min(120vw, 120svh);
    }

    .win-screen__table-wrap {
        max-width: min(72vw, 52svh);
    }

    .win-screen__copy {
        bottom: 17%;
        width: 86%;
    }

    .win-screen__title {
        font-size: 4.5svh;
        letter-spacing: min(0.22svh, 0.45vw);
    }

    .win-screen__amount {
        font-size: 4.5svh;
    }

    .endcard-inner {
        max-width: min(94vw, 90svh);
    }

    .endcard-layout {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: min(3svh, 4vw);
        align-items: center;
    }

    .endcard-logo {
        width: min(34svh, 42vw);
        max-width: min(44vw, 40svh);
    }

    .endcard-chicken {
        flex: 0 1 auto;
        width: min(44svh, 42vw);
        max-width: min(48vw, 50svh);
    }

    .endcard-copy {
        flex: 0 1 auto;
        width: min(42vw, 52svh);
        max-width: min(48vw, 54svh);
    }

    .endcard-amount {
        font-size: 9svh;
    }

    .endcard-fs {
        font-size: 5svh;
    }

    .endcard-play {
        width: min(36vw, 48svh);
        height: clamp(6svh, 8svh, 9svh);
        font-size: clamp(3svh, min(3.5vw, 4svh), 5.5svh);
    }
}

/* Loading screen */
body.is-loading {
    overflow: hidden;
}

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100svh;
    min-height: 100dvh;
    background: center / cover no-repeat url("../images/endcard/bg-desktop.webp");
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

@media (max-aspect-ratio: 9 / 16) {
    .loading-screen {
        background-image: url("../images/endcard/bg-mobile.webp");
    }
}

.loading-screen.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen__logo {
    width: min(38vh, 70vw);
    height: auto;
    object-fit: contain;
    margin: auto 0;
}

.loading-screen__bottom {
    width: min(80vw, 40vh);
    padding-bottom: 6vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2vh;
}

.loading-screen__text {
    margin: 0;
    color: #fff;
    font-family: 'SemiBold', system-ui, sans-serif;
    font-size: 2vh;
    letter-spacing: 0.25em;
    text-indent: 0.25em;
}

.loading-screen__bar {
    width: 100%;
    height: 0.8vh;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1vh;
    overflow: hidden;
}

.loading-screen__bar-fill {
    height: 100%;
    width: 0%;
    background: #40c35a;
    border-radius: 1vh;
    transition: width 0.2s linear;
}