/* ============================================================
   styles.css — identidade da Sala de Troféus.
   Uma sala de museu: parede vinho com papel de parede adamascado, moldura de
   latão, a vitrine creme onde o jogo acontece e placas com letra serifada.
   Letras: Playfair Display (títulos e números), Source Sans 3 (texto e rótulos).
   A barra do Zeb Studio fica acima de tudo.
   ============================================================ */
:root {
  --wall: #2a0d14;
  --wall-2: #3a1119;
  --wine: #6b1d2b;
  --wine-dark: #3a1119;
  --wine-light: #8d2f40;
  --brass: #c99a3f;
  --brass-dark: #8f6a24;
  --gold-light: #f0d595;
  --red: #b3261e;
  --ink: #2a1a12;
  --ink-soft: #4d3a2c;
  --muted: #8a735a;
  --plaque: #fbf5e6;
  --paper: #f2e7cf;
  --vitrine: #f6efdf;
  --green: #2f7d4f;
  --f-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-label: 'Source Sans 3', system-ui, sans-serif;
  --f-body: 'Source Sans 3', system-ui, sans-serif;
  --f-mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* as variáveis que o jogo (trophies.css) usa */
  --tr-ink: var(--ink);
  --tr-card: var(--plaque);
  --tr-paper: var(--paper);
  --tr-grass: var(--wine);
  --tr-grass-d: var(--wine-dark);
  --tr-grass-l: var(--wine-light);
  --tr-gold: var(--brass);
  --tr-yellow: var(--gold-light);
  --tr-red: var(--red);
  --tr-muted: var(--muted);
  --tr-chalk: var(--plaque);
  --tr-shadow: rgba(42, 13, 20, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--f-body); font-size: 16px; line-height: 1.5; color: var(--plaque);
  background-color: var(--wall);
  /* papel de parede adamascado, bem discreto */
  background-image:
    radial-gradient(circle at 50% 50%, rgba(201, 154, 63, 0.07) 0 9px, transparent 10px),
    radial-gradient(circle at 0 0, rgba(201, 154, 63, 0.05) 0 5px, transparent 6px),
    radial-gradient(circle at 100% 100%, rgba(201, 154, 63, 0.05) 0 5px, transparent 6px),
    linear-gradient(180deg, var(--wall-2), var(--wall) 420px);
  background-size: 56px 56px, 56px 56px, 56px 56px, 100% 100%;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.muted { color: var(--muted); }

/* ---------- topo do jogo (abaixo da barra do estúdio) ---------- */
.tr-top { padding: 1.6rem 1rem 1.2rem; }
.tr-top-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.tr-brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.tr-brand img { width: 58px; height: 58px; flex: none; }
.tr-brand-name { display: block; font-family: var(--f-display); font-weight: 900; font-size: clamp(2rem, 6vw, 3rem); line-height: 1; color: var(--gold-light); letter-spacing: 0.005em; text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.tr-brand-sub { display: block; font-family: var(--f-display); font-style: italic; font-weight: 700; font-size: 1.02rem; color: rgba(251, 245, 230, 0.75); margin-top: 0.3rem; }
.tr-top-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- a vitrine (onde o jogo acontece) ---------- */
.tr-main { padding: 0 1rem 3rem; }
.tr-vitrine {
  position: relative; max-width: 1100px; margin: 0 auto; min-height: 55vh; color: var(--ink);
  background: radial-gradient(ellipse at 50% 0, #fffaf0, var(--vitrine) 60%);
  border: 3px solid var(--brass); border-radius: 6px;
  outline: 1px solid rgba(201, 154, 63, 0.55); outline-offset: 6px;
  box-shadow: 0 0 0 9px var(--wall-2), 0 0 0 10px rgba(201, 154, 63, 0.55), 0 30px 70px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(143, 106, 36, 0.12);
  padding: 1.2rem 1rem 1.6rem;
}
/* a plaquinha de latão no alto da moldura */
.tr-vitrine::before {
  content: 'Acervo'; position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  font-family: var(--f-label); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--wall); background: linear-gradient(180deg, #f3d999, var(--brass)); border: 1px solid var(--brass-dark);
  border-radius: 3px; padding: 0.15rem 0.9rem 0.15rem 1.2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.35);
}
@media (max-width: 700px) {
  .tr-top { padding-top: 1.1rem; }
  .tr-brand img { width: 44px; height: 44px; }
  .tr-main { padding: 0 0.6rem 2rem; }
  .tr-vitrine { padding: 1rem 0.3rem 1.2rem; box-shadow: 0 0 0 5px var(--wall-2), 0 0 0 6px rgba(201, 154, 63, 0.55), 0 20px 40px rgba(0, 0, 0, 0.45); outline-offset: 3px; }
}

/* aviso para quem joga sem conta */
.tr-guest { max-width: 960px; margin: 0.2rem auto 0.8rem; background: var(--plaque); border: 1px solid var(--brass); border-radius: 6px; padding: 0.55rem 0.9rem; font-size: 0.95rem; color: var(--ink-soft); text-align: center; }
.tr-guest a { color: var(--wine); font-weight: 700; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font-family: var(--f-label); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.55rem 1.05rem; border: 1.5px solid var(--brass-dark); border-radius: 4px;
  background: linear-gradient(180deg, #fffaf0, var(--paper)); color: var(--ink);
  box-shadow: 0 2px 0 var(--brass-dark), 0 6px 14px var(--tr-shadow); cursor: pointer; text-decoration: none;
  transition: transform 0.08s, box-shadow 0.08s, filter 0.08s;
}
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--brass-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(180deg, var(--wine-light), var(--wine)); color: var(--gold-light); border-color: var(--wine-dark); box-shadow: 0 2px 0 var(--wine-dark), 0 6px 14px var(--tr-shadow); }
.btn-red { background: linear-gradient(180deg, #fffaf0, #f4dcd6); }
.btn-sm { font-size: 0.82rem; padding: 0.35rem 0.7rem; }
.btn-ghost { background: transparent; color: var(--gold-light); border-color: rgba(240, 213, 149, 0.6); box-shadow: none; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

/* ranking: amigos | geral, e as linhas de resultado */
.tr-seg { display: inline-flex; border: 1.5px solid var(--brass-dark); border-radius: 4px; overflow: hidden; margin: 0 0 0.7rem; }
.tr-seg button { border: 0; background: var(--plaque); color: var(--ink); padding: 0.35rem 0.9rem; font-family: var(--f-label); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.tr-seg button + button { border-left: 1.5px solid var(--brass-dark); }
.tr-seg button[aria-pressed="true"] { background: var(--wine); color: var(--gold-light); }
.tr-saveline { margin: 0.6rem auto 0; max-width: 520px; font-size: 0.95rem; color: var(--ink-soft); }
.tr-saveline a { color: var(--wine); font-weight: 700; }
.tr-saveline-new { color: var(--green); font-weight: 700; }
.tr-board-mine { margin-top: 0.6rem; font-size: 0.92rem; color: var(--ink-soft); }
img.tr-board-av { object-fit: cover; }

/* ---------- avisos (toast) ---------- */
.tr-toast { visibility: hidden; position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 140%); z-index: 10000; max-width: min(92vw, 520px); background: var(--wall); color: var(--gold-light); border: 1.5px solid var(--brass); border-radius: 6px; padding: 0.7rem 1rem; box-shadow: 0 10px 30px rgba(0,0,0,0.35); transition: transform 0.25s ease; font-weight: 600; }
.tr-toast.show { visibility: visible; transform: translate(-50%, 0); }
.tr-toast.error { background: var(--red); color: #fff; }
.tr-toast.success { background: var(--green); color: #fff; }

/* ---------- chuva de papel dourado ao concluir ---------- */
.tr-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9000; overflow: hidden; }
.tr-confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; animation: trFall linear forwards; }
@keyframes trFall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- rodapé ---------- */
.site-foot { color: rgba(251, 245, 230, 0.78); padding: 2rem 1rem 1.5rem; --zs-rodape-cor: rgba(251, 245, 230, 0.78); --zs-rodape-destaque: var(--gold-light); }
.foot-inner { max-width: 1100px; margin: 0 auto; }
.foot-jogo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--f-display); font-style: italic; font-weight: 700; color: var(--gold-light); }
.foot-jogo img { height: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 700px) { .tr-vitrine .tr-root { padding-left: 0.35rem; padding-right: 0.35rem; } }
