@font-face {
    font-family: 'Lilita One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/LilitaOne-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
    font-family: 'Russo One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/RussoOne-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Russo One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../assets/fonts/RussoOne-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}

:root {
    --blue-bg-1: #3572e8;
    --blue-bg-2: #2455c4;
    --ring-outer: #5b34a8;
    --ring-outer-hi: #8452d6;
    --ring-inner: #45237c;
    --bulb: #ffd24a;
    --bulb-glow: #ffe680;
    --hub-1: #4a2b7a;
    --hub-2: #2e1852;
    --pointer: #ffb020;
    --pointer-hi: #ffd060;
    --btn-1: #ffcf4d;
    --btn-2: #f0a821;
    --btn-edge: #b06a08;
    --btn-text: #6b3d00;

    --seg-orange: #f7941d;
    --seg-cyan:   #29b6e8;
    --seg-blue:   #2e6fd4;
    --seg-purple: #8e2fc4;
    --seg-red:    #e02b3c;
    --seg-green:  #4caf2f;
    --seg-yellow: #f5d915;

    --font: 'Lilita One', 'Russo One', 'Arial Black', 'Segoe UI', system-ui, sans-serif;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

img, svg, svg * {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background:
        radial-gradient(ellipse at 50% 30%, var(--blue-bg-1) 0%, var(--blue-bg-2) 70%, #1b3f9e 100%);
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(16px, 3vh) 14px max(20px, 3vh);
}

#bg-pattern {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .09;
    background-repeat: repeat;
    background-size: 300px 340px;
    background-image: url('../assets/img/pattern.png');
    animation: bgDrift 60s linear infinite;
}

@keyframes bgDrift {
    from { background-position: 0 0; }
    to   { background-position: 300px 340px; }
}

.title {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 4px;
    user-select: none;
}

.title .logo {
    display: block;
    width: min(58vw, 230px);
    margin: 0 auto;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,.45));
}

.wheel-area {
    position: relative;
    z-index: 2;
    width: var(--wheel-size, min(94vw, 440px));
    height: var(--wheel-size, min(94vw, 440px));
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    margin: 0 auto;
}


.pointer {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    width: 44px;
    height: 40px;
    filter: drop-shadow(0 3px 3px rgba(0,0,0,.5));
}

.ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 35%, var(--ring-outer-hi), var(--ring-outer) 60%, var(--ring-inner) 100%);
    box-shadow:
        0 10px 30px rgba(0,0,0,.5),
        inset 0 4px 8px rgba(255,255,255,.25),
        inset 0 -6px 12px rgba(0,0,0,.5);
    padding: 22px;
    animation: ringGlow 3.4s ease-in-out infinite;
}

@keyframes ringGlow {
    0%, 100% {
        box-shadow:
            0 10px 30px rgba(0,0,0,.5),
            0 0 24px 3px rgba(255,196,60,.45),
            inset 0 4px 8px rgba(255,255,255,.25),
            inset 0 -6px 12px rgba(0,0,0,.5);
    }
    50% {
        box-shadow:
            0 10px 34px rgba(0,0,0,.5),
            0 0 46px 10px rgba(255,196,60,.85),
            inset 0 4px 8px rgba(255,255,255,.4),
            inset 0 -6px 12px rgba(0,0,0,.5);
    }
}

.bulbs {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    z-index: 4;
    pointer-events: none;
}

.bulb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, var(--bulb-glow), var(--bulb) 60%, #b8860b 100%);
    box-shadow: 0 0 6px 1px rgba(255,214,74,.8);
    animation: bulbChase 1.6s linear infinite;
}

@keyframes bulbChase {
    0% {
        transform: scale(1.35);
        background: radial-gradient(circle at 40% 35%, #fff, #ffe680 55%, #ffb020 100%);
        box-shadow: 0 0 12px 4px rgba(255,224,120,.95), 0 0 4px 1px #fff;
    }
    30%, 100% {
        transform: scale(1);
        background: radial-gradient(circle at 40% 35%, var(--bulb-glow), var(--bulb) 60%, #b8860b 100%);
        box-shadow: 0 0 6px 1px rgba(255,214,74,.5);
    }
}

.disc-wrap {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 4px rgba(0,0,0,.25);
}

.disc-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: 50%;
    background: linear-gradient(
        105deg,
        transparent 38%,
        rgba(255,255,255,.5) 47%,
        rgba(255,255,255,.85) 50%,
        rgba(255,255,255,.5) 53%,
        transparent 62%
    );
    background-size: 250% 100%;
    background-repeat: no-repeat;
    background-position: 160% 0;
    animation: discSheen 4s ease-in-out infinite;
}

@keyframes discSheen {
    0%, 62%, 100% { background-position: 160% 0; }
    84% { background-position: -70% 0; }
}


.disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: rotate(0deg);
    transition: transform 6.5s cubic-bezier(.12, .8, .16, 1);
}

body.spinning .pointer {
    transform-origin: 50% 15%;
    animation: pointerTick .14s ease-in-out infinite;
}

@keyframes pointerTick {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    50% { transform: translateX(-50%) rotate(-9deg); }
}

body.spinning .bulb {
    animation-duration: .35s;
}

.disc svg { display: block; width: 100%; height: 100%; }

.slice-label {
    font-family: var(--font);
    font-weight: 400;
    font-size: 15px;
    fill: #fff;
    stroke: rgba(20,10,0,.65);
    stroke-width: 3.5px;
    paint-order: stroke fill;
    letter-spacing: .5px;
}

.prize-ico { filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }

.hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 30%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, var(--hub-1), var(--hub-2) 100%);
    box-shadow:
        0 4px 10px rgba(0,0,0,.5),
        inset 0 3px 6px rgba(255,255,255,.2),
        inset 0 -4px 8px rgba(0,0,0,.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }

.spin-btn {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    min-width: min(300px, 82vw);
    max-width: 92vw;
    padding: 16px 56px 19px;
    font-family: var(--font);
    font-size: clamp(24px, 7vw, 32px);
    font-weight: 400;
    letter-spacing: 1.5px;
    color: #fff;
    -webkit-text-stroke: 4.5px #a5591a;
    paint-order: stroke fill;
    text-shadow: 0 2px 0 rgba(140,74,10,.7);
    background: linear-gradient(180deg, #fff08a 0%, #ffdf4d 42%, #ffc21f 62%, #ffab12 100%);
    border: none;
    border-radius: 18px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 7px 0 #d98016,
        0 12px 20px rgba(20,40,110,.4),
        inset 0 3px 0 rgba(255,255,255,.85),
        inset 0 -5px 8px rgba(214,138,20,.4);
    transition: transform .08s, box-shadow .08s, filter .08s, opacity .25s ease;
    user-select: none;
}

.spin-btn::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -60%;
    width: 40%;
    height: 140%;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.6) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: btnShine 3s ease-in-out infinite;
}

.spin-btn:hover { filter: brightness(1.05); }

.spin-btn:active {
    transform: translateY(6px);
    box-shadow:
        0 1px 0 #d98016,
        0 5px 10px rgba(20,40,110,.4),
        inset 0 3px 0 rgba(255,255,255,.85),
        inset 0 -5px 8px rgba(214,138,20,.4);
}

.spin-btn:disabled { cursor: not-allowed; opacity: .8; filter: grayscale(.15); }

body.spinning .spin-btn,
body.spun .spin-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

@media (max-width: 380px) {
    .title .stars { font-size: 46px; }
    .spin-btn { font-size: 22px; min-width: 200px; }
}

.win-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background:
        radial-gradient(ellipse at 50% 30%, var(--blue-bg-1) 0%, var(--blue-bg-2) 70%, #142c66 100%);
    opacity: 0;
    transition: opacity .45s ease;
}

.win-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .09;
    background-repeat: repeat;
    background-size: 300px 340px;
    background-image: url('../assets/img/pattern.png');
    pointer-events: none;
    animation: bgDrift 60s linear infinite;
}

.win-overlay.show { display: flex; }
.win-overlay.visible { opacity: 1; }

.win-card {
    position: relative;
    width: min(100%, 430px);
    background: linear-gradient(180deg, #232946 0%, #1a2038 100%);
    border-radius: 26px;
    padding: 26px 22px 24px;
    text-align: center;
    box-shadow:
        0 24px 60px rgba(0,0,0,.55),
        inset 0 2px 0 rgba(255,255,255,.08);
    transform: scale(.7) translateY(40px);
    opacity: 0;
}

.win-overlay.visible .win-card {
    animation: cardPop .55s cubic-bezier(.2, 1.4, .4, 1) forwards;
}

@keyframes cardPop {
    0%   { transform: scale(.7) translateY(40px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

.win-logo {
    width: 150px;
    margin: 0 auto 14px;
    display: block;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
}

.win-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #141a2e;
    border-radius: 999px;
    padding: 8px 18px;
    font-family: var(--font);
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #ffd23e;
    margin-bottom: 16px;
}

.win-badge .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #35d24a;
    box-shadow: 0 0 8px 2px rgba(53,210,74,.7);
    animation: dotBlink 1.4s ease-in-out infinite;
}

@keyframes dotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.win-panel {
    position: relative;
    border-radius: 18px;
    background:
        repeating-linear-gradient(-35deg, rgba(255,255,255,.05) 0 14px, transparent 14px 28px),
        linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
    padding: 34px 18px 30px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 3px rgba(0,0,0,.18), inset 0 4px 10px rgba(255,255,255,.15);
}

.win-panel::before {
    content: '';
    position: absolute;
    inset: 9px;
    border: 2px solid #f2c94c;
    border-radius: 12px;
    opacity: .85;
    pointer-events: none;
}

.win-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    margin: -170px 0 0 -170px;
    background: repeating-conic-gradient(rgba(255,255,255,.14) 0 11deg, transparent 11deg 26deg);
    border-radius: 50%;
    -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
    mask-image: radial-gradient(circle, #000 0%, transparent 68%);
    animation: raysSpin 10s linear infinite;
    pointer-events: none;
}

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

.win-card.shake {
    animation: cardShake .45s ease-in-out;
}

@keyframes cardShake {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-6px, 3px) rotate(-.6deg); }
    40% { transform: translate(6px, -3px) rotate(.6deg); }
    60% { transform: translate(-4px, 2px) rotate(-.4deg); }
    80% { transform: translate(3px, -1px) rotate(.3deg); }
}

.win-flash {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

.win-flash.go { animation: flashGo .5s ease-out forwards; }

@keyframes flashGo {
    0% { opacity: .85; }
    100% { opacity: 0; }
}

.stack-coin {
    position: absolute;
    left: 50%;
    top: 38%;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    object-fit: contain;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,.35));
    opacity: 0;
    z-index: 3;
}

.big-prize {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 132px;
    height: 132px;
    margin: -66px 0 0 -66px;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,.4));
    opacity: 0;
    z-index: 3;
    transform-origin: 50% 90%;
}

.big-prize.heap {
    width: 190px;
    height: 150px;
    margin: -84px 0 0 -95px;
}

.big-prize.drop {
    animation: bigDrop 1s cubic-bezier(.3, .8, .35, 1) forwards;
}

@keyframes bigDrop {
    0%   { transform: translateY(-260px) scale(.65); opacity: 0; }
    35%  { opacity: 1; }
    50%  { transform: translateY(0) scale(1.05, .95); opacity: 1; }
    62%  { transform: translateY(-2px) scale(.86, 1.16); }
    74%  { transform: translateY(0) scale(1.12, .88); }
    85%  { transform: translateY(0) scale(.97, 1.04); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.big-prize.float {
    opacity: 1;
    animation: bigFloat 3s ease-in-out infinite;
}

@keyframes bigFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-10px) rotate(2deg); }
}

.burst-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border: 5px solid #fff;
    border-radius: 50%;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.burst-ring.go {
    animation: burstRing .7s ease-out forwards;
}

@keyframes burstRing {
    0%   { opacity: .9; transform: scale(.2); border-width: 8px; }
    100% { opacity: 0; transform: scale(3.4); border-width: 1px; }
}

.brawler-rays {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 400px;
    height: 400px;
    margin: -200px 0 0 -200px;
    background: repeating-conic-gradient(rgba(255,255,255,.28) 0 9deg, transparent 9deg 22deg);
    border-radius: 50%;
    -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 62%);
    mask-image: radial-gradient(circle, #000 0%, transparent 62%);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.brawler-rays.go {
    opacity: 1;
    animation: brawlerRaysSpin 8s linear infinite;
}

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

.brawler-reveal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 160px;
    height: 160px;
    margin: -88px 0 0 -80px;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(0,0,0,.45));
    opacity: 0;
    z-index: 3;
    transform-origin: 50% 90%;
}

.brawler-reveal.pop {
    animation: brawlerPop .85s cubic-bezier(.2, 1.5, .4, 1) forwards;
}

@keyframes brawlerPop {
    0%   { transform: translateY(40px) scale(.2) rotate(-14deg); opacity: 0; }
    40%  { opacity: 1; }
    60%  { transform: translateY(0) scale(1.12) rotate(4deg); }
    78%  { transform: translateY(0) scale(.94) rotate(-2deg); }
    100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

.brawler-reveal.float {
    opacity: 1;
    animation: brawlerFloat 3s ease-in-out infinite;
}

@keyframes brawlerFloat {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50%      { transform: translateY(-9px) rotate(1.5deg); }
}

.brawler-name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    text-align: center;
    font-family: var(--font);
    font-size: 26px;
    color: #fff;
    -webkit-text-stroke: 5px rgba(20,10,0,.6);
    paint-order: stroke fill;
    text-shadow: 0 3px 5px rgba(0,0,0,.5);
    letter-spacing: 1px;
    opacity: 0;
    transform: scale(.6);
    z-index: 4;
    pointer-events: none;
}

.brawler-name.show {
    animation: brawlerName .4s cubic-bezier(.2, 1.6, .4, 1) forwards;
}

@keyframes brawlerName {
    0%   { opacity: 0; transform: scale(.6); }
    100% { opacity: 1; transform: scale(1); }
}

.spark-fly {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    background: radial-gradient(circle, #fff 0%, #ffe95e 55%, transparent 72%);
    border-radius: 50%;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
}

.win-amount {
    position: relative;
    margin-top: 10px;
    font-family: var(--font);
    font-size: 30px;
    color: #fff;
    -webkit-text-stroke: 5px rgba(20,10,0,.55);
    paint-order: stroke fill;
    text-shadow: 0 3px 6px rgba(0,0,0,.4);
    min-height: 36px;
    z-index: 4;
}

.win-amount.tick { animation: amountTick .18s ease-out; }

.win-amount.count {
    font-size: 40px;
    color: #ffd23e;
    margin-top: 4px;
}

@keyframes amountTick {
    0% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.win-ribbon {
    position: absolute;
    top: 26px;
    right: -52px;
    width: 180px;
    text-align: center;
    transform: rotate(45deg);
    background: linear-gradient(180deg, #ff5252 0%, #e02b3c 100%);
    color: #fff;
    font-family: var(--font);
    font-size: 14px;
    letter-spacing: 1.5px;
    padding: 6px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,.35);
    animation: ribbonPulse 1.8s ease-in-out infinite;
}

@keyframes ribbonPulse {
    0%, 100% { transform: rotate(45deg) scale(1); }
    50% { transform: rotate(45deg) scale(1.05); }
}

.spark {
    position: absolute;
    color: #ffe95e;
    text-shadow: 0 0 8px rgba(255,233,94,.9);
    animation: sparkTwinkle 1.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkTwinkle {
    0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.15) rotate(40deg); }
}

.win-title {
    margin-top: 18px;
    font-family: var(--font);
    font-size: 28px;
    font-weight: 400;
    color: #fff;
    letter-spacing: .5px;
}

.win-title span { color: #ffd23e; }

.win-sub {
    margin-top: 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #aab3d0;
}

.claim-btn {
    position: relative;
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 15px 20px 17px;
    font-family: var(--font);
    font-size: 23px;
    letter-spacing: 1px;
    color: #fff;
    -webkit-text-stroke: 4.5px #a5591a;
    paint-order: stroke fill;
    text-shadow: 0 2px 0 rgba(140,74,10,.7);
    background: linear-gradient(180deg, #fff08a 0%, #ffdf4d 42%, #ffc21f 62%, #ffab12 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    overflow: hidden;
    box-shadow:
        0 6px 0 #d98016,
        0 12px 18px rgba(20,40,110,.4),
        inset 0 3px 0 rgba(255,255,255,.85),
        inset 0 -5px 8px rgba(214,138,20,.4);
    transition: transform .08s, box-shadow .08s;
    animation: claimPulse 2s ease-in-out infinite;
}

@keyframes claimPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

.claim-btn::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -60%;
    width: 40%;
    height: 140%;
    background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
    transform: skewX(-20deg);
    animation: btnShine 2.6s ease-in-out infinite;
}

@keyframes btnShine {
    0%   { left: -60%; }
    55%, 100% { left: 130%; }
}

.claim-btn:active {
    transform: translateY(5px);
    box-shadow:
        0 1px 0 #d98016,
        0 5px 8px rgba(20,40,110,.4),
        inset 0 3px 0 rgba(255,255,255,.85),
        inset 0 -5px 8px rgba(214,138,20,.4);
}

.win-foot {
    margin-top: 16px;
    font-family: var(--font);
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #7f89a8;
}

.conf {
    position: fixed;
    top: -24px;
    z-index: 60;
    border-radius: 3px;
    pointer-events: none;
    animation: confFall linear forwards;
}

@keyframes confFall {
    to { transform: translate(var(--dx), 112vh) rotate(var(--rot)); opacity: .9; }
}

.phone-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background:
        radial-gradient(ellipse at 50% 30%, var(--blue-bg-1) 0%, var(--blue-bg-2) 70%, #1b3f9e 100%);
    opacity: 0;
    transition: opacity .35s ease;
}

.phone-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .09;
    background-repeat: repeat;
    background-size: 300px 340px;
    background-image: url('../assets/img/pattern.png');
    animation: bgDrift 60s linear infinite;
    pointer-events: none;
}

.phone-overlay.show { display: flex; }
.phone-overlay.visible { opacity: 1; }

.phone-card {
    position: relative;
    width: min(100%, 430px);
    background: linear-gradient(180deg, #232946 0%, #1a2038 100%);
    border-radius: 26px;
    padding: 26px 22px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.08);
    transform: scale(.8) translateY(30px);
    opacity: 0;
}

.phone-overlay.visible .phone-card {
    animation: cardPop .5s cubic-bezier(.2, 1.4, .4, 1) forwards;
}

.phone-title {
    margin-top: 12px;
    font-family: var(--font);
    font-size: 32px;
    font-weight: 400;
    color: #fff;
    letter-spacing: .5px;
}

.phone-sub {
    margin-top: 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #aab3d0;
}

.phone-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    position: relative;
}

.cc-wrap { position: relative; flex-shrink: 0; }

.cc-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 56px;
    padding: 0 12px;
    background: #141a2e;
    border: 2px solid #2c3653;
    border-radius: 14px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 18px;
    color: #fff;
    user-select: none;
}

.cc-btn:active { filter: brightness(1.15); }
.cc-flag { font-size: 22px; line-height: 1; }
.cc-caret { font-size: 12px; color: #8592b8; margin-left: 2px; }

.cc-list {
    position: absolute;
    top: 62px;
    left: 0;
    width: 240px;
    max-height: 260px;
    overflow-y: auto;
    background: #141a2e;
    border: 2px solid #2c3653;
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(0,0,0,.5);
    z-index: 5;
    list-style: none;
    padding: 6px;
    -webkit-overflow-scrolling: touch;
}

.cc-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #dfe4f2;
}

.cc-list li:hover, .cc-list li:active { background: #232c47; }
.cc-list li .li-flag { font-size: 22px; }
.cc-list li .li-code { margin-left: auto; color: #8592b8; font-weight: 700; }

.phone-input {
    flex: 1;
    min-width: 0;
    height: 56px;
    padding: 0 16px;
    background: #141a2e;
    border: 2px solid #2c3653;
    border-radius: 14px;
    font-family: var(--font);
    font-size: 22px;
    letter-spacing: 1px;
    color: #fff;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

.phone-input::placeholder { color: #5a6588; }
.phone-input:focus { border-color: #ffc21f; }

.phone-error {
    margin-top: 12px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #ff6b6b;
    height: 16px;
    opacity: 0;
    transition: opacity .2s;
}

.phone-error.show { opacity: 1; }

.phone-submit {
    margin-top: 14px;
    animation: none;
}

.phone-row.shake { animation: cardShake .4s ease-in-out; }

.cc-manual {
    width: 96px;
    height: 56px;
    padding: 0 12px;
    background: #141a2e;
    border: 2px solid #2c3653;
    border-radius: 14px;
    font-family: var(--font);
    font-size: 18px;
    text-align: center;
    color: #fff;
    outline: none;
    caret-color: #ffc21f;
    -webkit-user-select: text;
    user-select: text;
}

.cc-manual:focus { border-color: #ffc21f; }

.brawler-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 14px;
    text-align: center;
    font-family: var(--font);
    font-size: 22px;
    color: #ffe14d;
    -webkit-text-stroke: 5px rgba(20,10,0,.6);
    paint-order: stroke fill;
    text-shadow: 0 3px 5px rgba(0,0,0,.5);
    letter-spacing: 1.5px;
    opacity: 0;
    transform: scale(.5) rotate(-4deg);
    z-index: 4;
    pointer-events: none;
}

.brawler-title.show {
    animation: brawlerTitle .45s cubic-bezier(.2, 1.7, .4, 1) forwards;
}

@keyframes brawlerTitle {
    0%   { opacity: 0; transform: scale(.5) rotate(-4deg); }
    100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}

.win-panel.brawler-mode .win-ribbon { display: none; }

.code-overlay {
    position: fixed;
    inset: 0;
    z-index: 72;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background:
        radial-gradient(ellipse at 50% 30%, var(--blue-bg-1) 0%, var(--blue-bg-2) 70%, #1b3f9e 100%);
    opacity: 0;
    transition: opacity .35s ease;
}

.code-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .09;
    background-repeat: repeat;
    background-size: 300px 340px;
    background-image: url('../assets/img/pattern.png');
    animation: bgDrift 60s linear infinite;
    pointer-events: none;
}

.code-overlay.show { display: flex; }
.code-overlay.visible { opacity: 1; }

.code-card {
    position: relative;
    width: min(100%, 430px);
    background: linear-gradient(180deg, #232946 0%, #1a2038 100%);
    border-radius: 26px;
    padding: 26px 22px 24px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.08);
    transform: scale(.8) translateY(30px);
    opacity: 0;
}

.code-overlay.visible .code-card {
    animation: cardPop .5s cubic-bezier(.2, 1.4, .4, 1) forwards;
}

.code-icon {
    width: 60px;
    height: 60px;
    margin: 6px auto 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #6b3d00;
    background: linear-gradient(180deg, #ffdf4d 0%, #ffab12 100%);
    box-shadow: 0 6px 0 #d98016, 0 10px 16px rgba(20,40,110,.4), inset 0 3px 0 rgba(255,255,255,.7);
}

.code-title {
    margin-top: 14px;
    font-family: var(--font);
    font-size: 32px;
    font-weight: 400;
    color: #fff;
    letter-spacing: .5px;
}

.code-sub {
    margin-top: 8px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #aab3d0;
}

.code-sub span { color: #ffd23e; white-space: nowrap; }

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.code-box {
    width: 46px;
    height: 58px;
    background: #141a2e;
    border: 2px solid #2c3653;
    border-radius: 14px;
    font-family: var(--font);
    font-size: 28px;
    text-align: center;
    color: #fff;
    outline: none;
    caret-color: #ffc21f;
    -webkit-user-select: text;
    user-select: text;
    transition: border-color .15s, transform .1s;
}

.code-box:focus { border-color: #ffc21f; transform: translateY(-2px); }
.code-box.filled { border-color: #35d24a; }
.code-inputs.err .code-box { border-color: #ff6b6b; }

@media (max-width: 360px) {
    .code-box { width: 40px; height: 52px; font-size: 24px; }
    .code-inputs { gap: 6px; }
}

.code-inputs.shake { animation: cardShake .4s ease-in-out; }

.code-resend {
    margin-top: 18px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #7f89a8;
}

.code-resend.ready { color: #ffd23e; cursor: pointer; text-decoration: underline; }
.code-resend span { color: #ffd23e; font-weight: 700; }

.code-hint-toggle {
    display: block;
    margin: 14px auto 0;
    padding: 4px 2px;
    background: none;
    border: none;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #8b94b3;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(139, 148, 179, .5);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s;
}

.code-hint-toggle:hover,
.code-hint-toggle.open { color: #c3cbe6; }

.code-hint {
    overflow: hidden;
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    text-align: left;
    transition: max-height .32s ease, opacity .28s ease, margin-top .32s ease;
}

.code-hint.open {
    max-height: 320px;
    margin-top: 14px;
    opacity: 1;
}

.code-hint-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #141a2e;
    border: 1.5px solid #2c3653;
    border-radius: 14px;
}

.code-hint-step + .code-hint-step { margin-top: 10px; }

.code-hint-step .chs-num {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffdf4d 0%, #ffab12 100%);
    color: #6b3d00;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 400;
    box-shadow: 0 3px 0 #d98016, inset 0 2px 0 rgba(255,255,255,.6);
}

.code-hint-step p {
    margin: 2px 0 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #c3cbe6;
}

.code-hint-step p b { color: #ffd23e; font-weight: 800; }

.pass-overlay { z-index: 74; }

.pass-field {
    position: relative;
    margin-top: 22px;
}

.pass-input {
    width: 100%;
    height: 56px;
    padding: 0 52px 0 16px;
    background: #141a2e;
    border: 2px solid #2c3653;
    border-radius: 14px;
    font-family: var(--font);
    font-size: 20px;
    letter-spacing: 1px;
    color: #fff;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

.pass-input::placeholder { color: #5a6588; font-size: 17px; letter-spacing: 0; }
.pass-input:focus { border-color: #ffc21f; }

.pass-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #5a6588;
    cursor: pointer;
    pointer-events: auto;
}

.pass-eye:active { color: #ffc21f; }
.pass-eye svg { pointer-events: none; }
.pass-eye .eye-off { display: none; }
.pass-eye.off { color: #ffc21f; }
.pass-eye.off .eye-on { display: none; }
.pass-eye.off .eye-off { display: block; }

.lock-i { font-size: 12px; }
.pass-field.shake { animation: cardShake .4s ease-in-out; }

.done-overlay {
    position: fixed;
    inset: 0;
    z-index: 76;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background:
        radial-gradient(ellipse at 50% 30%, var(--blue-bg-1) 0%, var(--blue-bg-2) 70%, #142c66 100%);
    opacity: 0;
    transition: opacity .45s ease;
}

.done-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .09;
    background-repeat: repeat;
    background-size: 300px 340px;
    background-image: url('../assets/img/pattern.png');
    animation: bgDrift 60s linear infinite;
    pointer-events: none;
}

.done-overlay.show { display: flex; }
.done-overlay.visible { opacity: 1; }

.done-card { transform: scale(.7) translateY(40px); opacity: 0; }
.done-overlay.visible .done-card { animation: cardPop .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }

.done-check {
    width: 90px;
    height: 90px;
    margin: 8px auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.done-check svg { filter: drop-shadow(0 0 10px rgba(53,210,74,.5)); }

.done-check circle {
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: doneCircle .6s ease-out .1s forwards;
}

.done-check path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: doneCheck .35s ease-out .55s forwards;
}

@keyframes doneCircle { to { stroke-dashoffset: 0; } }
@keyframes doneCheck { to { stroke-dashoffset: 0; } }
