/* ============================================================
   VERSATTE CARDS — conta online e multiplayer
   Listas e troca em superfícies claras; espera, contagem e a
   animação da troca em palco escuro (tokens invertidos em styles.css).
   ============================================================ */

/* ---------- entrar / criar conta ---------- */
.auth .au-tabs { margin-top: 4px; }
.auth .su-form label > span { display: block; }
.auth .su-form input[type="password"] { width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 500 16px var(--f-body); outline: none; }
.auth .su-form input[type="password"]:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(234,91,12,.14); }
.auth .check a { color: var(--orange-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.au-err { min-height: 18px; margin: 0; color: var(--bad); font-size: 13px; font-weight: 500; text-align: center; }
.au-err a { color: var(--orange-text); font-weight: 600; text-decoration: underline; }
.au-off { display: grid; justify-items: center; gap: 2px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.au-srv { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.au-off .link-btn { color: var(--text); text-decoration-color: var(--orange); }
.dot-ok, .dot-off { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22A35A; box-shadow: 0 0 0 3px rgba(34,163,90,.18); }
.dot-off { background: #D14B3F; box-shadow: 0 0 0 3px rgba(209,75,63,.16); }
.terms ul { padding-left: 18px; display: grid; gap: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.terms b { color: var(--text); }
.terms .btn { margin-top: 14px; }
.pf-acc { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 16px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.pf-acc span { display: inline-flex; align-items: center; gap: 6px; }
.dbg-info.warn { color: var(--gold); }

/* ---------- topo: botão multiplayer ---------- */
.chip-icon.online { position: relative; color: var(--blue); background: #E3ECF6; border-color: rgba(31,92,153,.28); }
.chip-icon .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--orange); color: var(--orange-ink); font: 800 10.5px/18px var(--f-body); font-style: normal; box-shadow: 0 0 0 2px var(--surface); }

/* ---------- notificações ---------- */
.mp-note { position: fixed; z-index: 95; left: 50%; top: calc(72px + var(--st)); width: min(calc(100vw - 24px), 440px); translate: -50% -20px; opacity: 0;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: 20px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: inset 4px 0 0 var(--blue), 0 18px 40px -16px rgba(12,11,10,.5);
  transition: opacity .3s, translate .3s cubic-bezier(.2,1.3,.4,1); }
.mp-note.in { opacity: 1; translate: -50% 0; }
.mp-note span { flex: 1; font-size: 13.5px; }
.mp-x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.mp-x svg { width: 16px; height: 16px; }

/* ---------- tela online ---------- */
.mp-tabs { margin: 12px 0 12px; }
.mp-tabs button { position: relative; }
.tbadge { display: inline-block; margin-left: 5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--orange); color: var(--orange-ink); font: 800 11px/18px var(--f-body); font-style: normal; }
.mp-search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 18px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.mp-search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(234,91,12,.14); }
.mp-search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.mp-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 500 16px var(--f-body); outline: none; }
.mp-search input::placeholder { color: var(--dim); }
.mp-players { display: grid; gap: 8px; margin-top: 10px; }
.pl { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--panel-shadow); }
.pl-av { position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 900 20px var(--f-caps); background: var(--bg-2); color: var(--ink); border: 2px solid var(--line); }
.pl-av.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pl-av.on::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: #22A35A; border: 2px solid var(--surface); }
.pl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-txt small { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.inv { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--panel-shadow); }
.inv.new { border-color: rgba(234,91,12,.45); }
.inv.dim { opacity: .75; }
.inv-ico { font-size: 22px; flex: none; }
.inv > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inv > div b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv > div small { font-size: 12px; color: var(--muted); }
.inv .btn { flex: none; }
.mp-empty { font-size: 13px; padding: 2px 4px 6px; }
.chal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.chal-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; text-align: left; background: var(--panel); border: 1px solid var(--line); }
.chal-opt:not(:disabled):active { transform: scale(.98); }
.chal-opt:disabled { opacity: .45; }
.chal-opt > span { font-size: 28px; }
.chal-opt > div { flex: 1; display: flex; flex-direction: column; }
.chal-opt small { color: var(--muted); font-size: 12.5px; }
.chal-opt > svg { width: 18px; height: 18px; color: var(--orange-text); }
.ot-intro { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; padding: 8px 16px 8px 4px; border-radius: var(--r-md); background: radial-gradient(120% 160% at 0% 50%, rgba(31,92,153,.16), transparent 65%), var(--panel); border: 1px solid rgba(31,92,153,.3); box-shadow: var(--panel-shadow); --tc: #33b5ff; }
.ot-3d { width: 86px; height: 112px; flex: none; }
.ot-intro > div:last-child { display: flex; flex-direction: column; gap: 4px; }
.ot-intro b { font: 900 20px/1 var(--f-caps); text-transform: uppercase; }
.ot-intro small { color: var(--muted); font-size: 12px; }
.ot-intro span { font-size: 12.5px; }

/* ---------- troca (tela clara) ---------- */
.trd { max-width: 480px; margin: 0 auto; padding: calc(60px + var(--st)) 16px calc(30px + var(--sb)); }
.trd h2 { font: 900 34px/.95 var(--f-caps); text-transform: uppercase; }
.tr-table { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; margin-top: 12px; }
.tr-side { min-height: 150px; padding: 10px; border-radius: 20px; background: var(--panel); border: 1.5px dashed var(--line-strong); transition: border-color .3s, box-shadow .3s; }
.tr-side.them { border-color: rgba(31,92,153,.4); }
.tr-side.ok { border-style: solid; border-color: var(--ok); box-shadow: 0 0 0 3px rgba(27,122,62,.12); }
.tr-h { display: block; font: 700 11px var(--f-body); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; }
.tr-side.ok .tr-h { color: var(--ok); }
.tr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tr-cards .muted { grid-column: 1 / -1; font-size: 12px; text-align: center; padding: 20px 4px; }
.tr-card { position: relative; animation: pop .35s cubic-bezier(.2,1.5,.4,1); }
.tr-swap { align-self: center; font-size: 26px; color: var(--orange); animation: pulse 1.6s infinite; }
.tr-status { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.tr-status b { color: var(--ok); }
.tr-err { margin-top: 8px; text-align: center; color: var(--bad); font-size: 13px; }
.tr-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 12px; }
.tr-mine .tr-pick { position: relative; }
.tr-pick.used .card { opacity: .8; }
.tr-pick:disabled { opacity: .35; }
.tr-in { position: absolute; left: 50%; bottom: -7px; translate: -50% 0; z-index: 2; padding: 1px 7px; border-radius: 99px; background: var(--orange); color: var(--orange-ink); font: 800 9.5px var(--f-body); white-space: nowrap; }

/* ---------- animação especial da troca (palco escuro) ---------- */
.overlay.trade-anim-ov { background: var(--night); overflow: hidden; display: grid; place-items: center; }
.ta { position: relative; width: 100%; height: 100%; max-width: 520px; display: grid; place-items: center; }
.ta-bg { position: absolute; inset: -30%; background: conic-gradient(from 0deg, #10233a, #3a1a08, #1F5C99, #5a2408, #10233a); filter: blur(40px); opacity: .6; animation: rot 8s linear infinite; }
.trade-anim-ov.s2 .ta-bg { animation-duration: 1.4s; opacity: .9; }
.ta-rings { position: absolute; left: 50%; top: 46%; translate: -50% -50%; }
.ta-rings i { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; translate: -50% -50%; border-radius: 50%; border: 2px solid rgba(255,122,46,.65); box-shadow: 0 0 20px rgba(255,122,46,.5), inset 0 0 20px rgba(127,208,255,.35); opacity: 0; }
.trade-anim-ov.s2 .ta-rings i { animation: taring 1.2s ease-out infinite; }
.trade-anim-ov.s2 .ta-rings i:nth-child(2) { animation-delay: .4s; }
.trade-anim-ov.s2 .ta-rings i:nth-child(3) { animation-delay: .8s; }
@keyframes taring { 0% { opacity: .9; width: 40px; height: 40px; } 100% { opacity: 0; width: 360px; height: 360px; } }
.ta-title { position: absolute; top: calc(40px + var(--st)); font: 900 36px var(--f-caps); text-transform: uppercase; letter-spacing: .1em; background: linear-gradient(90deg, #7fd0ff, #fff, #FFC940, #FF7A2E, #fff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 1.6s linear infinite; }
.trade-anim-ov.s4 .ta-title { opacity: 0; }
.ta-stage { position: absolute; left: 50%; top: 46%; width: 10px; height: 10px; translate: -50% -50%; }
.ta-top, .ta-bottom { position: absolute; left: 50%; translate: -50% 0; width: 110px; height: 154px; }
.ta-top { top: -280px; } .ta-bottom { top: 130px; }
.ta-card { position: absolute; inset: 0; transform: rotate(calc((var(--i) - 1) * 8deg)) translateX(calc((var(--i) - 1) * 14px)); transition: transform .8s cubic-bezier(.5,0,.3,1), opacity .4s, filter .4s; }
.ta-card .card { --cw: 110px; }
.trade-anim-ov.s1 .ta-card.from-top { transform: translateY(205px) scale(.85) rotate(calc(var(--i) * 30deg)); }
.trade-anim-ov.s1 .ta-card.from-bottom { transform: translateY(-205px) scale(.85) rotate(calc(var(--i) * -30deg)); }
.trade-anim-ov.s2 .ta-card { opacity: 0; filter: brightness(4) blur(6px); }
.ta-orb { position: absolute; left: -30px; top: -30px; width: 70px; height: 70px; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.ta-orb.a { background: radial-gradient(circle, #fff 0 20%, #7fd0ff 45%, transparent 70%); box-shadow: 0 0 40px 10px rgba(127,208,255,.8); }
.ta-orb.b { background: radial-gradient(circle, #fff 0 20%, #FF7A2E 45%, transparent 70%); box-shadow: 0 0 40px 10px rgba(255,122,46,.8); }
.trade-anim-ov.s2 .ta-orb { opacity: 1; }
.trade-anim-ov.s2 .ta-orb.a { animation: orbA 1.7s cubic-bezier(.4,0,.6,1) forwards; }
.trade-anim-ov.s2 .ta-orb.b { animation: orbB 1.7s cubic-bezier(.4,0,.6,1) forwards; }
@keyframes orbA { 0% { transform: translate(0, -70px); } 25% { transform: translate(70px, 0) scale(1.1); } 50% { transform: translate(0, 70px); } 75% { transform: translate(-60px, 0) scale(1.2); } 100% { transform: translate(0, 0) scale(.3); } }
@keyframes orbB { 0% { transform: translate(0, 70px); } 25% { transform: translate(-70px, 0) scale(1.1); } 50% { transform: translate(0, -70px); } 75% { transform: translate(60px, 0) scale(1.2); } 100% { transform: translate(0, 0) scale(.3); } }
.trade-anim-ov.s3::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, #fff, rgba(255,255,255,.6) 30%, transparent 70%); animation: flash .7s ease-out forwards; pointer-events: none; }
.trade-anim-ov.s3 .ta-orb { opacity: 0; }
.ta-result { position: relative; z-index: 2; width: 100%; padding: 0 20px; display: grid; justify-items: center; gap: 10px; text-align: center; opacity: 0; transform: scale(.8); pointer-events: none; transition: opacity .5s, transform .6s cubic-bezier(.2,1.4,.4,1); }
.trade-anim-ov.s4 .ta-result { opacity: 1; transform: none; pointer-events: auto; }
.ta-result h2 { font: 900 44px/.95 var(--f-caps); text-transform: uppercase; background: linear-gradient(180deg, #fff, #FF7A2E); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(234,91,12,.6)); }
.ta-result p { color: var(--muted); }
.ta-result p b { color: var(--text); }
.ta-got { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 10px; }
.ta-new { position: relative; width: 112px; animation: cardpop .8s cubic-bezier(.2,1.4,.4,1) backwards; }
.ta-new:nth-child(2) { animation-delay: .12s; } .ta-new:nth-child(3) { animation-delay: .24s; }
.ta-new .card { --cw: 112px; }

/* ---------- torneio online (tela clara) ---------- */
.cup { max-width: 480px; margin: 0 auto; padding: calc(60px + var(--st)) 16px calc(30px + var(--sb)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cup-head { display: flex; align-items: center; gap: 10px; }
.cup-mini { width: 70px; height: 92px; flex: none; --tc: #33b5ff; }
.cup-head span { font: 700 11px var(--f-body); text-transform: uppercase; letter-spacing: .14em; color: var(--blue); }
.cup-head h2 { font: 900 30px/1 var(--f-caps); text-transform: uppercase; }
.cup-round { display: grid; gap: 8px; justify-items: center; padding: 16px; border-radius: var(--r-md); text-align: center; background: radial-gradient(90% 70% at 50% 0%, rgba(31,92,153,.12), transparent 70%), var(--panel); border: 1px solid rgba(31,92,153,.3); box-shadow: var(--panel-shadow); }
.cup-round > span { font: 900 26px var(--f-caps); text-transform: uppercase; }
.cup-round small { color: var(--muted); font-size: 12px; }
.cup-round .btn { width: 100%; }
.cup-champ { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: var(--r-md); background: radial-gradient(70% 70% at 50% 40%, rgba(31,92,153,.18), transparent 70%); --tc: #33b5ff; }
.cup-3d { width: 180px; height: 220px; }
.cup-champ b { font: 900 30px var(--f-caps); text-transform: uppercase; text-align: center; }
.cupnew { display: grid; gap: 12px; }
.cup-list { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; }
.cup-p { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); cursor: pointer; }
.cup-p:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cup-p input { width: 20px; height: 20px; accent-color: var(--orange); flex: none; }
.cup-p span { display: flex; flex-direction: column; }
.cup-p small { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }

.sheet-wrap.busy .chal-opt { pointer-events: none; opacity: .7; }
.chal-opt small .spinner, .inv .spinner { display: inline-block; vertical-align: middle; width: 13px; height: 13px; border-color: var(--line-strong); border-top-color: var(--orange); }
.pk-loading { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; align-content: center; gap: 22px; background: radial-gradient(60% 40% at 50% 46%, rgba(234,91,12,.16), transparent 70%); }
.pk-loading .pack3d { animation: float 1.2s ease-in-out infinite; }
.pk-loading span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.pk-loading .spinner { display: inline-block; border-color: rgba(255,255,255,.2); border-top-color: var(--orange-hi); }

/* ---------- partida online ao vivo: configuração, espera, contagem ---------- */
.cfg { display: grid; gap: 6px; padding: 14px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); }
.cfg-h { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-text); margin-top: 2px; }
.cfg small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.cfg-sum { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--loan-soft); border: 1px solid rgba(31,92,153,.25); }
.cfg-sum span { font-size: 12px; color: var(--muted); }
.cfg-sum b { font-size: 15px; }
.lur { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 16px; border-radius: 18px; text-align: left; background: var(--panel); border: 1px solid var(--line); color: var(--text); }
.lur > span { font-size: 22px; }
.lur > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lur small { color: var(--muted); font-size: 12.5px; }
.lur > svg { width: 18px; height: 18px; color: var(--orange-text); }
.cup-round .lur { margin-bottom: 8px; }
.cup-cfg { display: block; color: var(--muted); margin: 2px 0 8px; }
.dot-live { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #E5392F; box-shadow: 0 0 0 3px rgba(229,57,47,.2); animation: livePulse 1s ease-in-out infinite alternate; vertical-align: 1px; }
@keyframes livePulse { to { opacity: .35; } }

.overlay.wait-ov, .overlay.countdown-ov { background: radial-gradient(70% 50% at 50% 40%, rgba(31,92,153,.32), transparent 70%), radial-gradient(60% 40% at 50% 110%, rgba(234,91,12,.2), transparent 70%), var(--night); display: grid; place-items: center; padding: 24px 16px; }
.wa { width: min(360px, 100%); display: grid; justify-items: center; gap: 10px; text-align: center; }
.wa h2 { margin: 4px 0 0; font: 900 32px/1 var(--f-caps); text-transform: uppercase; }
.wa p { margin: 0; color: var(--muted); }
.wa .pill { margin-bottom: 8px; }
.wa-ball { font-size: 54px; animation: waBounce 1s cubic-bezier(.3,0,.5,1) infinite alternate; }
@keyframes waBounce { from { transform: translateY(0) rotate(0); } to { transform: translateY(-18px) rotate(180deg); } }
.cd { display: grid; justify-items: center; gap: 14px; text-align: center; }
.cd-vs { display: flex; align-items: center; gap: 12px; font: 900 24px var(--f-caps); text-transform: uppercase; }
.cd-vs i { font: 400 30px/.8 var(--f-script); color: var(--orange-hi); }
.cd-n { font: 900 112px/1 var(--f-caps); color: var(--orange-hi); text-shadow: 0 0 30px rgba(234,91,12,.55); }
.cd-n.pop { animation: cdPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes cdPop { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
.cd small { color: var(--muted); }
.sp-wait .sp-bar { height: 4px; border-radius: 4px; background: var(--track); overflow: hidden; }
.sp-wait .sp-bar i { display: block; width: 35%; height: 100%; border-radius: 4px; background: var(--orange-hi); animation: spBar 1.2s ease-in-out infinite; }
@keyframes spBar { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
