/* Cartas Arcade — acabamento visual. Carrega depois de minigames.css e só ajusta aparência. */

/* ---------- Página ---------- */
.arcade-heading { margin: 4px 0 20px; gap: 24px; }
.arcade-heading h1 { font-family: var(--display, 'Cinzel', serif); font-weight: 700; letter-spacing: .01em; line-height: 1.1; font-size: clamp(30px, 3.8vw, 46px); margin: 8px 0 10px; }
.arcade-heading h1 em { color: var(--accent-hover, #ffd58a); }
.arcade-heading p { margin: 0; font-size: 14px; line-height: 1.6; }
.arcade-reward { border-radius: 20px; padding: 18px 24px; border-color: color-mix(in srgb, var(--gold, #f0b85c) 45%, transparent); background: linear-gradient(140deg, color-mix(in srgb, var(--gold, #f0b85c) 16%, transparent), transparent 70%), var(--glass, #15162f); box-shadow: var(--lift, none); }
.arcade-reward strong { font-family: var(--display, serif); font-weight: 700; font-size: clamp(32px, 3.4vw, 42px); letter-spacing: .02em; color: var(--gold-strong, #ffd98a); margin: 4px 0 6px; }
.arcade-rules { border-color: var(--edge, #7a9aa52b); gap: 8px; border: 0; padding: 0; margin: 14px 0 22px; }
.arcade-rules span { padding: 8px 13px; border-radius: 99px; border: 1px solid var(--edge, #7a9aa52b); background: rgba(255, 255, 255, .035); }
.arcade-card { border-color: var(--edge, #7a9aa538); border-radius: 26px; background: var(--glass, #0b1b2a); box-shadow: var(--lift, 0 16px 40px #0002); transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .3s; }
.arcade-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--arcade-color) 55%, transparent); box-shadow: 0 28px 60px -30px #000, 0 0 40px -18px var(--arcade-color); }
.arcade-art { height: 210px; }
.arcade-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.arcade-art .arcade-index { z-index: 1; font-family: var(--display, serif); color: rgba(255, 255, 255, .16); text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.arcade-card h2 { font-family: var(--display, serif); font-weight: 600; letter-spacing: .04em; }
.arcade-tiers li[data-tier="0"] span { color: var(--muted, #9aa); }
.arcade-tiers li[data-tier="2"] span { color: #8fe3b0; }
.arcade-tiers li[data-tier="4"] strong { color: #ffe9b0; text-shadow: 0 0 12px rgba(255, 210, 120, .6); }

/* ---------- Janela do jogo ---------- */
.arcade-dialog { width: min(620px, calc(100% - 20px)); padding: 22px; border-radius: 26px; border: 1px solid var(--edge-strong, #6ecbb565); border-top-color: rgba(255, 224, 170, .4);
  background: radial-gradient(ellipse 80% 40% at 80% -10%, color-mix(in srgb, var(--violet, #a996ff) 22%, transparent), transparent 60%), linear-gradient(180deg, #171a3c 0%, #0c1024 100%); }
.arcade-dialog::backdrop { background: rgba(4, 5, 16, .86); }
.arcade-game-head h2 { font-family: var(--display, serif); font-weight: 600; letter-spacing: .05em; font-size: 24px; }
.arcade-hud { gap: 10px; }
.arcade-hud div { border-radius: 16px; border-color: var(--edge, #c4e6ff18); background: rgba(255, 255, 255, .04); padding: 10px 14px; }
.arcade-hud span { letter-spacing: 1.4px; text-transform: uppercase; font-size: 9.5px; font-weight: 700; }
.arcade-hud b { font-family: var(--display, serif); font-weight: 600; font-size: 26px; }
.arcade-hud div:last-child { border-color: color-mix(in srgb, var(--gold, #f0b85c) 40%, transparent); background: color-mix(in srgb, var(--gold, #f0b85c) 9%, transparent); }
.arcade-hud div:last-child b { color: var(--gold-strong, #ffd98a); }
.arcade-board-wrap { max-width: min(100%, calc(62dvh * var(--ar, 1)), 560px); border-radius: 20px; border: 1px solid rgba(255, 255, 255, .12); background: #071320;
  box-shadow: 0 24px 60px -30px #000, inset 0 0 0 1px rgba(255, 255, 255, .04); }
.arcade-board-wrap canvas { width: 100%; height: auto; max-height: none; }
.arcade-overlay { background: rgba(8, 10, 28, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.arcade-overlay strong { font-family: var(--display, serif); font-weight: 700; font-size: 30px; letter-spacing: .04em; text-shadow: 0 4px 20px rgba(0, 0, 0, .6); }
.arcade-overlay p { color: #dfe6f5; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.arcade-progress progress { height: 8px; border-radius: 99px; overflow: hidden; appearance: none; -webkit-appearance: none; background: rgba(255, 255, 255, .08); border: 0; }
.arcade-progress progress::-webkit-progress-bar { background: rgba(255, 255, 255, .08); border-radius: 99px; }
.arcade-progress progress::-webkit-progress-value { background: linear-gradient(90deg, #e09a3a, #ffe0a0); border-radius: 99px; box-shadow: 0 0 12px rgba(240, 184, 92, .6); transition: width .3s; }
.arcade-progress progress::-moz-progress-bar { background: linear-gradient(90deg, #e09a3a, #ffe0a0); border-radius: 99px; }
.arcade-dpad { grid-template-columns: repeat(3, 56px); gap: 6px; }
.arcade-dpad button { min-height: 52px; border-radius: 16px; border-color: var(--edge-strong, #65e8bb55); background: rgba(255, 255, 255, .06); color: var(--text, #fff); }
.arcade-dpad button:active { background: color-mix(in srgb, var(--accent, #65e8bb) 30%, transparent); transform: scale(.95); }
.arcade-flap { min-height: 52px; min-width: 160px; }
.arcade-result { border-top-color: color-mix(in srgb, var(--gold, #f0b85c) 35%, transparent); }
.arcade-result h3 { font-family: var(--display, serif); font-weight: 600; letter-spacing: .03em; }
.arcade-payout > span { border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1px solid var(--edge, transparent); }
.arcade-payout > strong { font-family: var(--display, serif); color: var(--gold-strong, #ffd98a); text-shadow: 0 0 24px rgba(240, 184, 92, .45); }
@media (max-width: 700px) {
  .arcade-dialog { padding: 14px; border-radius: 22px; }
  .arcade-board-wrap { max-width: min(100%, calc(46dvh * var(--ar, 1))); }
  .arcade-hud b { font-size: 22px; }
  .arcade-art { height: 180px; }
}

/* ---------- Prévia viva nos cartões ---------- */
.arcade-art { height: 250px; padding: 14px; background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--arcade-color) 22%, transparent), transparent 66%), linear-gradient(125deg, #0b1b2a, #111a30); }
.arcade-art canvas { position: relative; inset: auto; width: auto; height: 100%; max-width: 100%; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 18px 40px -18px #000, 0 0 44px -14px var(--arcade-color); }

/* ---------- Resultado: cartão por cima do jogo, sempre na tela ---------- */
.arcade-dialog.is-over { overflow: hidden; }
.arcade-dialog.is-over .arcade-result { position: absolute; inset: 0; z-index: 5; margin: 0; padding: 18px; border: 0; display: grid; place-items: center; overflow-y: auto;
  background: rgba(6, 8, 24, .62); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: arcade-result-in .35s cubic-bezier(.2, .8, .2, 1); }
.arcade-result-card { width: min(100%, 400px); padding: 26px 24px 22px; text-align: center; border-radius: 24px; border: 1px solid var(--edge-strong, rgba(172, 162, 255, .3)); border-top-color: rgba(255, 224, 170, .5);
  background: linear-gradient(180deg, #1d2048 0%, #10122c 100%); box-shadow: 0 30px 80px -20px #000, 0 0 60px -20px var(--tier-glow, rgba(240, 184, 92, .5)); animation: arcade-card-in .5s cubic-bezier(.2, .9, .25, 1.15); }
.arcade-result[data-tier="0"] { --tier-c: #b7bdd0; --tier-glow: rgba(183, 189, 208, .35); }
.arcade-result[data-tier="1"] { --tier-c: #8fe3b0; --tier-glow: rgba(143, 227, 176, .45); }
.arcade-result[data-tier="2"] { --tier-c: #90dcf8; --tier-glow: rgba(144, 220, 248, .5); }
.arcade-result[data-tier="3"] { --tier-c: #d7b1ff; --tier-glow: rgba(215, 177, 255, .55); }
.arcade-result[data-tier="4"] { --tier-c: #ffe0a0; --tier-glow: rgba(255, 214, 130, .7); }
.arcade-result-card > .eyebrow { display: block; font-size: 10px; letter-spacing: 2.4px; color: var(--muted, #9aa); }
.arcade-result-card h3 { margin: 8px 0 2px; font-size: 34px; letter-spacing: .04em; color: var(--tier-c, #fff); text-shadow: 0 0 26px var(--tier-glow, transparent); }
.arcade-result-score { margin: 0; font-size: 13px; color: var(--soft, #cfd); }
.arcade-result-score b { font-size: 20px; color: #fff; margin-right: 3px; }
.arcade-result-tiers { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 16px 0 4px; padding: 0; }
.arcade-result-tiers li { display: grid; gap: 5px; font-size: 9px; color: var(--faint, #667); }
.arcade-result-tiers i { display: block; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.arcade-result-tiers li.on { color: var(--soft, #cfd); }
.arcade-result-tiers li.on i { background: var(--tier-c, #ffd98a); box-shadow: 0 0 10px var(--tier-glow, transparent); }
.arcade-result-card .arcade-payout { justify-content: center; padding: 14px 0 4px; }
.arcade-result-card .arcade-payout > strong { margin: 10px 0 0; font-size: 44px; line-height: 1; }
.arcade-result-next { margin: 8px 0 0; font-size: 12px; color: var(--muted, #9aa); }
.arcade-result-card [data-arcade-claim-status] { margin: 10px 0 0; min-height: 20px; }
.arcade-result-actions { display: flex; gap: 10px; margin-top: 16px; }
.arcade-result-actions button { flex: 1; width: auto; min-height: 46px; }
@keyframes arcade-result-in { from { opacity: 0; } }
@keyframes arcade-card-in { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@media (max-width: 700px) {
  .arcade-art { height: 220px; }
  .arcade-result-card { padding: 22px 18px 18px; }
  .arcade-result-card h3 { font-size: 28px; }
  .arcade-result-card .arcade-payout > strong { font-size: 38px; }
}

/* ---------- Banner de XP & Nível + Termo Diário ---------- */
.arcade-page .arcade-grid {
  grid-template-columns: repeat(auto-fit, minmax(295px, 1fr));
}
.arcade-xp-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: 22px;
  background:
    radial-gradient(460px 180px at 8% 0%, rgba(181, 146, 255, .2), transparent 65%),
    radial-gradient(420px 180px at 92% 100%, rgba(101, 232, 187, .16), transparent 65%),
    linear-gradient(155deg, rgba(22, 24, 48, .92), rgba(12, 14, 29, .95));
  border: 1px solid rgba(240, 184, 92, .26);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.arcade-xp-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 420px;
  min-width: 0;
}
.arcade-xp-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 16px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  color: #ffe8a3;
  background: linear-gradient(135deg, rgba(240, 184, 92, .24), rgba(181, 146, 255, .2));
  border: 1.5px solid rgba(240, 184, 92, .52);
  box-shadow: 0 8px 22px rgba(240, 184, 92, .16);
}
.arcade-xp-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.arcade-xp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.arcade-xp-head strong {
  font-family: var(--mono);
  font-size: 14px;
  color: #fff6dc;
}
.arcade-xp-head span {
  color: var(--muted);
  font-size: 12px;
}
.arcade-xp-track {
  height: 10px;
  border-radius: 99px;
  background: rgba(8, 10, 22, .78);
  border: 1px solid rgba(255, 255, 255, .1);
  overflow: hidden;
}
.arcade-xp-track i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #65e8bb 0%, #f7c873 52%, #b592ff 100%);
  box-shadow: 0 0 14px rgba(247, 200, 115, .5);
  transition: width .35s ease;
}
.arcade-xp-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--soft);
}
.arcade-xp-right {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.arcade-xp-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(9, 11, 24, .65);
  border: 1px solid rgba(255, 255, 255, .09);
  min-width: 170px;
}
.arcade-xp-pill span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.arcade-xp-pill strong {
  font-family: var(--mono);
  font-size: 14px;
  color: #65e8bb;
}
.arcade-xp-pill small {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Modal do Termo ---------- */
.arcade-dialog.termo-dialog {
  width: min(520px, calc(100vw - 20px));
  padding: 14px 18px 14px;
  outline: none;
}
.termo-dialog .arcade-game-head {
  margin-bottom: 10px;
}
.termo-dialog .arcade-game-head h2 {
  font-size: 20px;
  margin-top: 2px;
}
.termo-dialog .termo-hud {
  gap: 8px;
  margin-bottom: 8px;
}
.termo-dialog .termo-hud div {
  padding: 7px 10px;
  border-radius: 12px;
}
.termo-dialog .termo-hud b {
  font-size: clamp(14px, 2vw, 19px);
  line-height: 1.15;
  margin-top: 2px;
  white-space: nowrap;
}
.termo-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 2px 0 0;
}
.termo-grid {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  width: min(270px, max(195px, calc((100dvh - 335px) * 5 / 6)), 82vw);
  margin: 0 auto;
}
.termo-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.termo-tile {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 9px;
  border: 2px solid rgba(181, 146, 255, .24);
  background: rgba(14, 16, 34, .78);
  color: #f8f5ff;
  font-family: var(--display);
  font-size: clamp(16px, 3.6vw, 23px);
  font-weight: 800;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  user-select: none;
  transition: transform .12s ease, border-color .15s ease, background .2s ease, box-shadow .15s ease;
}
.termo-row.is-current .termo-tile {
  border-color: rgba(181, 146, 255, .44);
  background: rgba(24, 22, 52, .88);
}
.termo-row.is-current .termo-tile.is-cursor {
  border-color: #f7c873;
  box-shadow: 0 0 0 3px rgba(247, 200, 115, .24), inset 0 -4px 0 rgba(247, 200, 115, .75);
  transform: translateY(-1px);
}
.termo-tile.has-letter {
  border-color: rgba(181, 146, 255, .72);
}
.termo-tile[data-mark="2"] {
  background: linear-gradient(160deg, #27a87a, #1b7e5a);
  border-color: #65e8bb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(39, 168, 122, .32);
}
.termo-tile[data-mark="1"] {
  background: linear-gradient(160deg, #cf8f2a, #9e6814);
  border-color: #f7c873;
  color: #fff9eb;
  box-shadow: 0 4px 14px rgba(207, 143, 42, .28);
}
.termo-tile[data-mark="0"] {
  background: rgba(26, 27, 46, .72);
  border-color: rgba(255, 255, 255, .1);
  color: rgba(226, 224, 245, .48);
}
.termo-tile.is-flipping {
  animation: termoFlip .45s ease backwards;
}
@keyframes termoFlip {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(0.08); }
  100% { transform: scaleY(1); }
}
.termo-row.is-shake {
  animation: termoShake .34s ease;
}
@keyframes termoShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}
.termo-msg {
  margin: 0;
  min-height: 20px;
  font-size: 13px;
  color: var(--soft);
  text-align: center;
}
.termo-msg[data-tone="warn"] {
  color: #f7c873;
  font-weight: 600;
}
.termo-kb {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 470px;
}
.termo-kb-row {
  display: flex;
  justify-content: center;
  gap: 4px;
}
.termo-key {
  flex: 1 1 0;
  min-width: 26px;
  height: 36px;
  padding: 0 5px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(26, 29, 54, .9);
  color: #f4f2ff;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.termo-key:hover:not(:disabled) {
  border-color: rgba(181, 146, 255, .6);
  transform: translateY(-1px);
}
.termo-key.is-wide {
  flex: 1.55 1 0;
  font-size: 12px;
}
.termo-key.is-enter {
  background: linear-gradient(135deg, rgba(181, 146, 255, .34), rgba(101, 232, 187, .26));
  border-color: rgba(181, 146, 255, .58);
  color: #fff;
}
.termo-key[data-mark="2"] {
  background: #249b70;
  border-color: #65e8bb;
  color: #fff;
}
.termo-key[data-mark="1"] {
  background: #c48523;
  border-color: #f7c873;
  color: #fff;
}
.termo-key[data-mark="0"] {
  background: rgba(16, 17, 30, .65);
  border-color: rgba(255, 255, 255, .06);
  color: rgba(210, 210, 230, .36);
}
.termo-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.termo-result-sub {
  margin: 4px 0 12px;
  font-size: 13.5px;
  color: var(--soft);
}
