/* Painel da conta (site/account/). Usa os mesmos tokens do resto do site.

   Conceito: uma ficha do jogador. Quem é você e quantas gemas tem ficam numa faixa
   com filetes, sem caixa; cada servidor é uma linha com a escada de 7 dias do daily.
   Só a linha que pede ação (daily liberado) ganha fundo e a barra dourada: borda e
   preenchimento marcam objeto, e aqui o objeto é "tem dinheiro para pegar".
   Ouro só no dinheiro, verde no que já foi coletado, vermelho só na cadeia. */

.acc-page { padding-block: clamp(24px, 5vw, 56px) 96px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- caixas: só para o que é objeto (aviso, desafio) ---------- */
.acc-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}

.acc-small { color: var(--muted); font-size: 0.9rem; }

.acc-notice, .acc-captcha { max-width: 640px; margin-inline: auto; }
.acc-notice { display: grid; gap: 10px; justify-items: start; }
.acc-notice h1, .acc-notice h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.acc-notice p { color: var(--muted); }

.acc-warn {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  border-radius: 10px; padding: 10px 14px; font-size: 0.94rem;
}

/* desafio anti-robô: uma faixa fina acima da ficha */
.acc-captcha { max-width: none; margin: 0 0 22px; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.acc-captcha .acc-small { margin: 0; }

/* ---------- entrar ---------- */
.acc-login-wrap {
  display: grid; align-items: center; gap: clamp(28px, 5vw, 72px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}
@media (max-width: 900px) { .acc-login-wrap { grid-template-columns: minmax(0, 1fr); } }

.acc-login { display: grid; gap: 16px; justify-items: start; min-width: 0; }
.acc-login h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.08;
}
.acc-lede { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

.acc-facts { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.acc-facts li { padding-left: 14px; border-left: 2px solid var(--line-2); color: var(--muted); font-size: 0.92rem; }

/* ficha de exemplo ao lado do botão de entrar: mostra o que o painel faz antes de entrar */
.acc-sample {
  position: relative; min-width: 0; padding: 20px 8px 8px;
  border: 1px dashed var(--line-2); border-radius: calc(var(--radius) + 4px);
}
.acc-sample-tag {
  position: absolute; top: -11px; left: 18px; padding: 0 10px; background: var(--bg);
  color: var(--dim); font: 500 0.75rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
}
.acc-sample .acc-row { grid-template-columns: minmax(0, 1fr); pointer-events: none; }

/* ---------- ficha do jogador ---------- */
.acc-sheet {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-block: 1px solid var(--line-2);
}

.acc-who { display: flex; align-items: center; gap: 18px; padding: 28px 28px 28px 0; min-width: 0; }
.acc-who-text { display: grid; gap: 4px; min-width: 0; }
.acc-who h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.08; overflow-wrap: anywhere;
}
.acc-handle { color: var(--dim); font: 400 0.85rem var(--font-mono); }
.acc-exit { margin-left: auto; flex: none; padding: 9px 16px; font-size: 0.9rem; }

.acc-avatar { display: block; border-radius: 50%; object-fit: cover; background: var(--bg-3); border: 2px solid var(--line-2); flex: none; }
.acc-who .acc-avatar { width: 76px; height: 76px; }
.acc-row-id .acc-avatar { width: 46px; height: 46px; }
.acc-initial { display: grid; place-items: center; font: 800 1.2rem var(--font-display); color: var(--brand-hi); }
.acc-who .acc-initial { font-size: 2rem; }

/* gemas */
.acc-purse { display: grid; gap: 12px; align-content: center; padding: 28px 0 28px 32px; border-left: 1px solid var(--line); min-width: 0; }
.acc-purse-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.acc-purse-num {
  font-family: var(--font-display); font-weight: 800; line-height: 1;
  font-size: clamp(2.8rem, 6vw, 3.8rem); color: var(--gold); font-variant-numeric: tabular-nums;
}
.acc-purse-note { color: var(--muted); font-size: 0.92rem; }
.acc-purse .btn { justify-self: start; }

@media (max-width: 760px) {
  .acc-sheet { grid-template-columns: minmax(0, 1fr); }
  .acc-who { padding: 22px 0; }
  .acc-purse { padding: 20px 0 24px; border-left: 0; border-top: 1px solid var(--line); }
  .acc-purse .btn { justify-self: stretch; }
}

/* barra de espera (a recarga enchendo) */
.acc-meter { display: block; height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.acc-meter i { display: block; height: 100%; background: var(--brand-hi); transform-origin: left; transform: scaleX(var(--p, 0)); }

.acc-wait { color: var(--muted); font-size: 0.95rem; }
.acc-clock { font-family: var(--font-mono); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- servidores ---------- */
.acc-servers { margin-top: clamp(28px, 5vw, 52px); }
.acc-servers-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 28px; }
.acc-servers-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.1rem); line-height: 1.1; margin-top: 4px; }
.acc-tally { color: var(--muted); font-size: 0.95rem; }
.acc-tally b { color: var(--gold); font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.acc-servers .acc-small { margin-top: 8px; }

.acc-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 8px; }

.acc-row {
  --row-bg: var(--bg);
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 13rem);
  gap: 18px clamp(18px, 3vw, 36px);
  padding: 22px; min-width: 0;
  border: 1px solid transparent; border-top-color: var(--line); border-radius: var(--radius);
}
.acc-row:first-child { border-top-color: transparent; }

.acc-row.ready {
  --row-bg: var(--bg-2);
  background: var(--bg-2); border-color: var(--line-2);
  box-shadow: inset 3px 0 0 var(--gold);
}
.acc-row.jail {
  --row-bg: color-mix(in srgb, var(--red) 6%, var(--bg));
  background: var(--row-bg); border-color: color-mix(in srgb, var(--red) 24%, transparent);
  box-shadow: inset 3px 0 0 var(--red);
}

.acc-row-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.acc-row-id > div { display: grid; min-width: 0; }
.acc-row-id h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; overflow-wrap: anywhere; }
.acc-stats { color: var(--muted); font-size: 0.86rem; margin-top: 3px; }
.acc-stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.acc-streak { color: var(--dim); font: 400 0.78rem var(--font-mono); letter-spacing: 0.03em; margin-top: 4px; }

/* a escada de 7 dias: coletados, o de hoje e os que faltam; o 7º (bônus) é a coroa */
.acc-track {
  --crown: polygon(0 100%, 0 25%, 25% 55%, 50% 0, 75% 55%, 100% 25%, 100% 100%);
  list-style: none; margin: 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.acc-track::before, .acc-track::after {
  content: ""; position: absolute; top: 13px; left: calc(100% / 14); height: 2px; border-radius: 2px;
}
.acc-track::before { right: calc(100% / 14); background: var(--line-2); }
.acc-track::after { width: calc((100% - 100% / 7) * var(--at, 0)); background: var(--green); transform-origin: left; }

.stop { position: relative; z-index: 1; display: grid; justify-items: center; gap: 8px; }
.stop i {
  box-sizing: border-box; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--row-bg); border: 2px solid var(--line-2);
}
.stop span { color: var(--dim); font: 400 0.75rem var(--font-mono); font-variant-numeric: tabular-nums; }

.stop.done i { border-color: var(--green); background: color-mix(in srgb, var(--green) 16%, var(--row-bg)); }
.stop.done i::after {
  content: ""; width: 6px; height: 11px; border: solid var(--green); border-width: 0 2px 2px 0;
  transform: translate(0, -1px) rotate(45deg);
}
.stop.next i { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 20%, transparent); }
.stop.next i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.stop.next span { color: var(--gold); font-weight: 500; }

.stop.weekly i { border-radius: 9px; }
.stop.weekly i::after {
  content: ""; width: 14px; height: 10px; border: 0; border-radius: 0; transform: none;
  background: color-mix(in srgb, var(--gold) 50%, transparent); clip-path: var(--crown);
}
.stop.weekly.next i::after, .stop.weekly.done i::after { background: var(--gold); }
.stop.weekly.done i { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--row-bg)); }

/* a ação de cada servidor */
.acc-row-act { display: grid; gap: 8px; min-width: 0; }
.acc-go { width: 100%; padding: 12px 18px; font-weight: 700; }
.acc-note { color: var(--dim); font: 400 0.75rem var(--font-mono); text-align: center; letter-spacing: 0.02em; }
.acc-wait-box { display: grid; gap: 9px; }
/* na linha do servidor o rótulo fica em cima e o relógio embaixo: não quebra no meio da contagem */
.acc-wait-box .acc-wait { display: grid; gap: 2px; }
.acc-wait-box .acc-clock { font-size: 1.08rem; }
.acc-jail { color: var(--red); font-size: 0.92rem; line-height: 1.45; }
.acc-jail b { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .acc-row { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px 16px; }
  .acc-go { padding-block: 14px; }
}

button[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* resultado da última ação: some quando está vazio (a região continua no HTML para o leitor de tela) */
.acc-say {
  margin: 18px 0 0; padding: 12px 16px; border-radius: 10px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--bg-2);
}
.acc-say:empty { margin: 0; padding: 0; border: 0; }
.acc-say.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }
.acc-say.bad { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); }

.acc-privacy { color: var(--dim); font-size: 0.84rem; max-width: 64ch; margin-top: 40px; }
.acc-actions .btn { padding: 9px 16px; font-size: 0.9rem; }

/* ---------- movimento: a recarga e a escada enchem quando a ficha aparece (classe "in", posta pelo JS) ---------- */
@keyframes acc-fill { from { transform: scaleX(0); } }
@keyframes acc-rise { from { opacity: 0; transform: translateY(14px); } }

.in .acc-meter i { animation: acc-fill 1.1s var(--ease) 0.15s both; }
.in .acc-track::after { animation: acc-fill 0.9s var(--ease) 0.25s both; }
.in .acc-row { animation: acc-rise 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }

@media (prefers-reduced-motion: reduce) {
  .in .acc-meter i, .in .acc-track::after, .in .acc-row { animation: none; }
}
