/* Arena PUZZLE WIN: tela da partida (canvas), intro da demo e resultado. */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap");
:root { color-scheme: dark; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body.arena { overflow: hidden; color: #fff; font-family: "Nunito", ui-rounded, system-ui, sans-serif; -webkit-font-smoothing: antialiased; background: radial-gradient(120% 70% at 50% 0%, #15466b 0, #0b2440 45%, #061222 100%); touch-action: none; overscroll-behavior: none; }
body.arena::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(rgb(94 234 212 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(94 234 212 / .05) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(circle at 50% 30%, #000, transparent 75%); }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.ar { position: relative; height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; padding: 0 0 env(safe-area-inset-bottom); }
.ar-top { flex: 0 0 auto; padding: 12px 14px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgb(255 255 255 / 0.08); background: rgb(4 14 28 / 0.55); }
.ar-btn { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgb(94 234 212 / 0.22); border-radius: 15px; background: rgb(18 58 92 / 0.7); color: #fff; font-size: 22px; cursor: pointer; }
.ar-btn[aria-pressed="false"] { opacity: .5; }
.ar-brand { display: grid; justify-items: center; gap: 4px; }
.ar-brand .wm { --wm-size: 24px; }
.ar-brand small { color: #5eead4; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.ar-stats { flex: 0 0 auto; padding: 12px 14px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; }
.ar-card { min-height: 58px; padding: 9px 13px; display: grid; align-content: center; gap: 2px; border: 1px solid rgb(94 234 212 / 0.16); border-radius: 16px; background: linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.03)); }
.ar-card small { color: #8fb3c9; font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.ar-card b { font-size: 20px; font-weight: 900; line-height: 1.1; }
.ar-card--wide b { color: #ffc93c; }
.ar-card.is-hot { border-color: rgb(255 77 109 / .7); background: rgb(255 77 109 / .14); animation: ar-hot 1s ease-in-out infinite; }
.ar-card.is-hot b { color: #ff8095; }
@keyframes ar-hot { 50% { box-shadow: 0 0 22px rgb(255 77 109 / .35); } }

.ar-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.ar-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ar-pop { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 2; }
.ar-pop small, .ar-pop b, .ar-pop em { display: block; }
.ar-pop b { font-size: clamp(3rem, 15vw, 4.4rem); font-weight: 900; letter-spacing: -.03em; color: #fff; text-shadow: 0 0 30px rgb(46 230 192 / 0.9), 0 6px 20px rgb(0 0 30 / 0.6); }
.ar-pop small { color: #ffc93c; font-size: 13px; font-weight: 900; letter-spacing: .22em; text-shadow: 0 2px 10px rgb(0 0 30 / 0.7); }
.ar-pop em { margin: 6px auto 0; width: max-content; padding: 4px 14px; border-radius: 999px; background: linear-gradient(90deg, #2ee6c0, #b6ee2b); color: #06231c; font-size: 13px; font-style: normal; font-weight: 900; }
.ar-pop.is-on { animation: ar-boom 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes ar-boom { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(-8deg); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.22) rotate(-4deg); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 100% { opacity: 0; transform: translate(-50%, -64%) scale(1.12) rotate(-4deg); } }
.ar-meta { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; justify-items: center; gap: 8px; background: radial-gradient(circle at 50% 45%, rgb(10 70 70 / 0.8), rgb(4 12 30 / 0.75)); text-align: center; pointer-events: none; animation: ar-meta 2.6s ease both; }
.ar-meta small { color: #b6ee2b; font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.ar-meta b { max-width: 300px; font-size: clamp(2.2rem, 10vw, 3rem); line-height: 1.05; font-weight: 900; text-shadow: 0 0 26px rgb(46 230 192 / 0.6); }
@keyframes ar-meta { 0% { opacity: 0; transform: scale(.85); } 12% { opacity: 1; transform: scale(1.03); } 80% { opacity: 1; } 100% { opacity: 0; } }

.ar-bottom { flex: 0 0 auto; padding: 10px 14px 12px; border-top: 1px solid rgb(255 255 255 / 0.08); background: rgb(4 14 28 / 0.6); text-align: center; }
.ar-bar { height: 6px; border-radius: 99px; background: rgb(255 255 255 / 0.1); overflow: hidden; }
.ar-bar i { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff4d6d, #ffb020 35%, #b6ee2b 65%, #2ee6c0); transition: width .35s ease; }
.ar-msg { margin: 8px 0 0; min-height: 17px; color: #7ff0dc; font-size: 12px; font-weight: 700; }
.ar-cash { margin-top: 8px; width: 100%; min-height: 62px; padding: 0 14px 0 20px; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgb(255 255 255 / 0.14); border-radius: 18px; background: linear-gradient(135deg, rgb(20 70 110 / 0.8), rgb(16 40 80 / 0.8)); color: rgb(255 255 255 / 0.5); font: inherit; font-size: 15px; font-weight: 900; letter-spacing: .06em; cursor: not-allowed; }
.ar-cash b { padding: 9px 14px; border-radius: 12px; background: rgb(0 10 25 / 0.5); font-size: 15px; }
.ar-cash:not(:disabled) { color: #1d0c00; cursor: pointer; border-color: transparent; background: linear-gradient(135deg, #ffc93c, #ff8a1f); box-shadow: 0 12px 30px rgb(255 160 40 / 0.35); animation: ar-glow 1.4s ease-in-out infinite; }
.ar-cash:not(:disabled) b { background: rgb(60 20 0 / .2); }
@keyframes ar-glow { 50% { box-shadow: 0 12px 44px rgb(255 190 60 / 0.6); } }
.ar-cash--go { justify-content: center; background: linear-gradient(90deg, #2ee6c0, #b6ee2b) !important; color: #06231c !important; cursor: pointer; animation: none !important; box-shadow: 0 12px 30px rgb(46 230 192 / .3) !important; }
.ar-foot { margin-top: 10px; display: flex; justify-content: center; gap: 18px; color: #7d9bb2; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.ar-foot b { color: #fff; font-size: 11px; }
.ar-foot .is-hot b { color: #ff6b81; }
.ar-note { margin: 8px 0 0; color: #93acc0; font-size: 11px; font-weight: 600; }

.ar-dialog { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgb(2 8 18 / 0.8); backdrop-filter: blur(8px); }
.ar-dialog > div { width: min(380px, 100%); padding: 26px 22px; border: 1px solid rgb(94 234 212 / 0.2); border-radius: 26px; background: linear-gradient(180deg, #123a5c, #081a2e); text-align: center; }
.ar-dialog small { color: #5eead4; font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.ar-dialog h2 { margin: 8px 0 0; font-size: 1.7rem; font-weight: 900; }
.ar-dialog p { margin: 10px 0 0; color: #c3d6e4; font-size: 14px; line-height: 1.5; font-weight: 600; }
.ar-link { margin-top: 16px; padding: 10px; border: 0; background: none; color: #ff8095; font: inherit; font-size: 12px; font-weight: 900; letter-spacing: .1em; cursor: pointer; }

/* ── Intro da demo ─────────────────────────────────────── */
.ar-intro { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.ar-intro__card { width: min(420px, 100%); padding: 28px 22px 22px; display: grid; justify-items: center; gap: 12px; border: 1px solid rgb(94 234 212 / .2); border-radius: 30px; background: linear-gradient(180deg, rgb(21 70 107 / .85), rgb(6 18 34 / .92)); box-shadow: 0 30px 80px rgb(0 0 0 / .45); text-align: center; animation: ar-rin .5s ease; }
.ar-intro__ic { width: 108px; height: 108px; filter: drop-shadow(0 14px 30px rgb(46 230 192 / .35)); animation: ar-float 3s ease-in-out infinite; }
@keyframes ar-float { 50% { transform: translateY(-8px) rotate(-3deg); } }
.ar-intro .wm { --wm-size: 36px; }
.ar-intro__tag { padding: 5px 14px; border-radius: 999px; background: rgb(255 201 60 / .15); color: #ffc93c; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.ar-how { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; text-align: left; counter-reset: h; }
.ar-how li { position: relative; padding: 10px 12px 10px 46px; border-radius: 14px; background: rgb(255 255 255 / .05); color: #c3d6e4; font-size: 13px; line-height: 1.4; font-weight: 600; counter-increment: h; }
.ar-how li::before { content: counter(h); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(135deg, #2ee6c0, #3a8dff); color: #04121f; font-weight: 900; }
.ar-how b { color: #fff; } .ar-how em { color: #ffc93c; font-style: normal; font-weight: 900; }
.ar-intro .ar-cash { margin-top: 6px; }
.ar-intro__note { margin: 0; color: #7d9bb2; font-size: 12px; font-weight: 600; }

.app-toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border: 1px solid rgb(94 234 212 / .25); border-radius: 14px; background: rgb(8 26 46 / 0.96); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 12px 30px rgb(0 0 20 / 0.5); }

/* ── Resultado ────────────────────────────────────────── */
.ar-result { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; background: linear-gradient(180deg, #f2fffb 0, #eef6ff 50%, #e8f0fb 100%); color: #0b2440; overflow-y: auto; animation: ar-rin .4s ease; }
@keyframes ar-rin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.ar-result[data-lose] { background: linear-gradient(180deg, #f1f4f9 0, #e8edf5 60%, #e2e8f1 100%); }
.ar-result__x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #2a3d55; color: #fff; font-size: 20px; cursor: pointer; }
.ar-result__in { flex: 1; padding: 26px 20px 0; text-align: center; }
.ar-result__mascot { width: 96px; height: 96px; margin: 6px auto 0; display: grid; place-items: center; }
.ar-result__mascot img { width: 92px; height: 92px; filter: drop-shadow(0 12px 24px rgb(20 120 140 / .3)); }
.ar-result[data-lose] .ar-result__mascot img { filter: grayscale(.6) drop-shadow(0 12px 24px rgb(0 0 0 / .15)); }
.ar-result__tag { margin: 8px 0 0; color: #0f9e86; font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.ar-result h1 { margin: 4px 0 0; color: #0b2440; font-size: clamp(2rem, 9vw, 2.6rem); line-height: 1.02; font-weight: 900; letter-spacing: -.02em; }
.ar-result__sub { margin: 10px auto 0; max-width: 330px; color: #3d5670; font-size: 15px; line-height: 1.45; font-weight: 600; }
.ar-result__value { margin: 18px 0 0; padding: 18px 16px 14px; border: 1px solid #cfe0ee; border-radius: 26px; background: linear-gradient(180deg, #fff, #f3f8fd); }
.ar-result__value small { color: #5a7590; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.ar-result__value b { display: block; margin-top: 4px; color: #0ea45a; font-size: clamp(2.8rem, 15vw, 4rem); line-height: 1; font-weight: 900; letter-spacing: -.03em; }
.ar-result[data-lose] .ar-result__value b { color: #5a6f86; }
.ar-result__stats { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ar-result__stats > div { padding: 12px 6px; border: 1px solid #d5e3ee; border-radius: 16px; background: #fbfdff; }
.ar-result__stats small { display: block; color: #6a84a0; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.ar-result__stats b { display: block; margin-top: 4px; color: #0b2440; font-size: 18px; font-weight: 900; }
.ar-gem { color: #ffb020; font-size: 15px; }
.ar-result__note { margin: 16px 0 0; color: #6a84a0; font-size: 12px; font-weight: 600; }
.ar-result__actions { flex: 0 0 auto; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); text-align: center; }
.ar-again { min-height: 64px; padding: 0 14px 0 24px; display: flex; align-items: center; justify-content: space-between; border-radius: 20px; background: linear-gradient(90deg, #ffc93c, #ff8a1f); color: #2a1200; font-size: 16px; font-weight: 900; letter-spacing: .08em; box-shadow: 0 12px 30px rgb(255 150 40 / 0.3); }
.ar-again__ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #0b2440; color: #fff; font-size: 20px; }
.ar-portal { margin-top: 16px; display: block; color: #1f6f8b; font-size: 13px; font-weight: 900; letter-spacing: .12em; }
.ar-confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }

@media (max-height: 700px) { .ar-card { min-height: 50px; } .ar-note { display: none; } .ar-cash { min-height: 54px; } }
