/* Páginas públicas internas: Resultados (tela 13), Sorteio (tela 20) e 404 (tela 26).
   Segue o canvas "Sats Lottu — Identidade visual". Valores em tokens.css. */
@import url("tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
.pg-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
.pg-body main { flex: 1; }
.pg-body .mono { font-family: var(--font-mono); }
.pg-body a { color: var(--yellow); }
.pg-body a:hover { color: var(--yellow-2); }
.pg-body button { font-family: var(--font-body); }
.pg-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- topo ---------- */
.pg-top { position: relative; z-index: 5; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.pg-top-inner { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.pg-logo img { height: 30px; width: auto; display: block; }
.pg-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line-strong); }
.pg-nav a { padding: 10px 16px; border-radius: var(--r-pill); color: var(--muted) !important; font-size: 14px; text-decoration: none; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.pg-nav a:hover { color: var(--text) !important; }
.pg-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text) !important; font-weight: 500; }
.pg-back { color: var(--muted) !important; font-size: 14px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.pg-back:hover { color: var(--text) !important; }

.pg-btn {
  height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--yellow);
  color: var(--amber-ink) !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.pg-btn:hover { transform: translateY(-2px); background: var(--yellow-2); }
.pg-btn:active { background: var(--brasa); }

.pg-btn-ghost {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--panel-2);
  color: var(--text);
  font: 500 14px var(--font-body);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pg-btn-ghost:hover { border-color: var(--yellow-edge); transform: translateY(-2px); }

.pg-seg { display: flex; gap: 4px; padding: 5px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--line-strong); }
.pg-seg button { height: 42px; padding: 0 20px; border: 0; border-radius: var(--r-pill); cursor: pointer; font: 500 14px var(--font-body); background: transparent; color: var(--muted); }
.pg-seg button.is-on { background: var(--yellow); color: var(--amber-ink); font-weight: 700; }

.pg-tag {
  align-self: flex-start;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--verify-soft);
  border: 1px solid var(--verify-edge);
  color: var(--verify);
}
[data-game="virada"] .pg-tag { background: var(--virada-soft); border-color: var(--virada-edge); color: var(--virada); }

.pg-glow {
  position: absolute;
  left: -10%;
  top: -60px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 0, 0.13) 0%, rgba(255, 194, 0, 0) 65%);
  animation: sl-drift 15s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- rodapé ---------- */
.pg-foot { border-top: 1px solid var(--panel-2); }
.pg-foot-inner { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: 13px; color: var(--quiet); }
.pg-foot a { color: var(--muted) !important; }

/* =========================== RESULTADOS =========================== */
.rs-hero { position: relative; overflow: hidden; }
.rs-hero-inner { position: relative; padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 28px; }
.rs-title-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.rs-title-row h1 { margin: 0; font-size: clamp(36px, 4.6vw, 56px); font-weight: 800; letter-spacing: -0.035em; }

.rs-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.rs-featured {
  flex: 2 1 560px;
  min-width: 0;
  border-radius: 32px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: sl-fade-up 0.5s var(--ease) both;
}
.rs-featured[hidden] { display: none; }
.rs-featured-empty { align-items: center; justify-content: center; padding: 48px; color: var(--muted); }
.rs-bar { height: 4px; background: var(--verify); }
[data-game="virada"] .rs-bar { background: var(--virada); }
.rs-featured-body { padding: 32px; display: flex; flex-direction: column; gap: 26px; }
.rs-featured-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.rs-featured-id { display: flex; flex-direction: column; gap: 6px; }
.rs-featured-id h2 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.rs-date { font-size: 15px; color: var(--quiet); }

.rs-status {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  background: var(--yellow-soft);
  border: 1px solid var(--yellow-edge);
  color: var(--yellow);
}
.rs-status.is-win { background: var(--verify-soft); border-color: var(--verify-edge); color: var(--verify); }
.rs-status-lg { padding: 8px 16px; font-size: 14px; }

.rs-reveal { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 10px 0; min-height: 96px; }
.rs-ball {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 26px var(--font-mono);
  border: 2px dashed rgba(255, 194, 0, 0.4);
  color: rgba(255, 194, 0, 0.5);
  background: rgba(255, 194, 0, 0.05);
}
.rs-ball.is-on {
  border: 0;
  background: var(--yellow);
  color: var(--amber-ink);
  box-shadow: 0 12px 30px rgba(255, 194, 0, 0.35);
  animation: rs-pop 0.55s var(--ease) both;
}
@keyframes rs-pop {
  0% { transform: scale(0.3) rotate(-90deg); opacity: 0; }
  70% { transform: scale(1.12) rotate(8deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.rs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rs-fact { border-radius: 18px; background: var(--panel-2); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; text-decoration: none; }
.rs-fact span { font-size: 12px; color: var(--quiet); }
.rs-fact b { font-size: 18px; font-weight: 700; color: var(--text); }
.rs-fact .rs-hash { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-fact-link { background: var(--yellow-soft); border: 1px solid var(--yellow-edge); transition: transform 0.2s var(--ease); }
.rs-fact-link span { color: var(--muted); }
.rs-fact-link b { font-size: 15px; color: var(--yellow); }
.rs-fact-link:hover { transform: translateY(-2px); }
.rs-fact-link[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
.rs-featured-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--quiet); }

.rs-side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.rs-prizes { border-radius: 28px; background: var(--panel); border: 1px solid var(--line-strong); padding: 26px; display: flex; flex-direction: column; gap: 14px; animation: sl-fade-up 0.5s var(--ease) 0.08s both; }
.rs-prizes h3 { margin: 0; font-size: 16px; font-weight: 700; }
.rs-tier { display: grid; grid-template-columns: 1fr auto; gap: 4px; padding: 12px 0; border-top: 1px solid var(--line-strong); }
.rs-tier-name { font-weight: 500; }
.rs-tier-name span { color: var(--quiet); font-weight: 400; }
.rs-tier b { font-weight: 700; text-align: right; }
.rs-tier small { font-size: 13px; color: var(--quiet); }
.rs-tier .rs-tier-unit { font-size: 12px; text-align: right; }
.rs-extras { display: flex; flex-direction: column; gap: 10px; }
.rs-extra { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.rs-extra b { color: var(--text); font-weight: 500; }

.rs-next { border-radius: 28px; background: var(--yellow); color: var(--amber-ink); padding: 26px; display: flex; flex-direction: column; gap: 10px; animation: sl-fade-up 0.5s var(--ease) 0.16s both; }
.rs-next-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; }
.rs-next-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-ink); animation: sl-blink 1.2s ease-in-out infinite; }
.rs-next b { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.rs-next-when { font-size: 14px; color: #3a3200; }
.rs-next-cta {
  margin-top: 6px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--amber-ink);
  color: var(--text) !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}
.rs-next-cta:hover { transform: translateY(-2px); }

.rs-history { padding-top: 24px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 22px; }
.rs-history-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.rs-history-head > div { display: flex; flex-direction: column; gap: 6px; }
.rs-history-head h2 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.rs-history-head > div > span { font-size: 15px; color: var(--quiet); }
.rs-search { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.rs-search input {
  width: 200px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font: 700 16px var(--font-mono);
  padding: 0 16px;
  outline: none;
}
.rs-search input:focus { border-color: var(--yellow-edge); }

.rs-rows { display: flex; flex-direction: column; gap: 14px; }
.rs-row {
  width: 100%;
  border-radius: 22px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  text-align: left;
  animation: sl-fade-up 0.35s var(--ease) both;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.rs-row:hover { transform: translateX(4px); border-color: rgba(255, 194, 0, 0.45); }
.rs-row.is-on { background: rgba(255, 194, 0, 0.06); border-color: rgba(255, 194, 0, 0.5); }
.rs-row-info { display: flex; flex-direction: column; gap: 4px; min-width: 140px; }
.rs-row-info strong { font-size: 17px; font-weight: 700; }
.rs-row-info small { font-size: 13px; color: var(--quiet); }
.rs-row-balls { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-row-balls span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 14px var(--font-mono);
  border: 1.5px solid rgba(255, 194, 0, 0.45);
  color: var(--yellow);
}
.rs-row-balls span.is-hit { background: var(--yellow); color: var(--amber-ink); border-color: var(--yellow); }
.rs-row-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; min-width: 150px; }
.rs-row-side b { font-weight: 700; }
.rs-empty { margin: 0; border-radius: 20px; border: 1px dashed var(--line-strong); padding: 28px; text-align: center; color: var(--quiet); }
.rs-more { align-self: center; height: 50px; padding: 0 26px; font-size: 15px; }

@media (max-width: 760px) {
  .pg-top-inner { gap: 12px; }
  .pg-nav { order: 3; width: 100%; justify-content: center; }
  .pg-nav a { padding: 8px 12px; font-size: 13px; }
  .rs-hero-inner { padding-top: 32px; }
  .rs-featured-body { padding: 22px; }
  .rs-ball { width: 52px; height: 52px; font-size: 19px; }
  .rs-reveal { gap: 10px; min-height: 64px; }
  .rs-row-side { align-items: flex-start; min-width: 0; }
  .rs-search, .rs-search input { width: 100%; }
  .rs-history-head h2 { font-size: 28px; }
  .rs-row-balls span { width: 36px; height: 36px; font-size: 13px; }
}

/* =========================== SORTEIO (contest.html) =========================== */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ct-top { display: grid; grid-template-columns: 1fr auto 1fr; }
.ct-top .pg-btn { justify-self: end; }
.ct-page { position: relative; overflow: hidden; }
.ct-glow {
  position: absolute;
  left: 0;
  right: 0;
  top: -120px;
  width: min(640px, 100%);
  height: 640px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 0, 0.12) 0%, rgba(255, 194, 0, 0) 62%);
  animation: sl-drift 15s ease-in-out infinite;
  pointer-events: none;
}
.ct-shell { position: relative; max-width: 1048px; padding-top: 56px; padding-bottom: 96px; }
.ct-state { padding: 40px; border-radius: 24px; border: 1px dashed var(--line-strong); text-align: center; color: var(--muted); }
.ct-state[hidden] { display: none; }
.ct-content { display: flex; flex-direction: column; gap: 30px; animation: sl-fade-up 0.5s var(--ease) both; }
.ct-content[hidden] { display: none; }
.ct-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.ct-hero .pg-tag { align-self: center; padding: 7px 12px; font-size: 12px; }
.ct-hero h1 { margin: 10px 0 8px; font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.ct-prize-label { font-size: 17px; color: var(--muted); }
.ct-prize { font-size: clamp(40px, 5.6vw, 66px); font-weight: 700; color: var(--yellow); letter-spacing: -0.02em; line-height: 1.1; }

.ct-countdown[hidden] { display: none; }
.ct-clock { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.ct-clock[hidden] { display: none; }
.ct-clock > div {
  width: 150px;
  height: 112px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ct-clock b { font-size: 40px; font-weight: 700; color: var(--yellow); line-height: 1; display: inline-block; }
.ct-clock small { font-size: 13px; color: var(--quiet); }

.ct-result { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ct-result[hidden] { display: none; }
.ct-balls { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.ct-balls span {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 26px var(--font-mono);
  background: var(--yellow);
  color: var(--amber-ink);
  box-shadow: 0 12px 30px rgba(255, 194, 0, 0.3);
}
.ct-balls span.pending {
  background: rgba(255, 194, 0, 0.05);
  border: 2px dashed rgba(255, 194, 0, 0.4);
  color: rgba(255, 194, 0, 0.5);
  box-shadow: none;
  animation: sl-blink 2.4s ease-in-out infinite;
}
.ct-status[hidden] { display: none; }
.ct-sync { margin: 0; display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.ct-sync[hidden] { display: none; }
.ct-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--yellow); animation: sl-spin 0.9s linear infinite; }

.ct-facts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ct-fact { border-radius: 16px; border: 1px solid var(--line-strong); background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ct-fact span { font-size: 12px; color: var(--quiet); }
.ct-fact b { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-fact .ct-hash { font-family: var(--font-mono); font-size: 14px; }

.ct-bottom { width: 100%; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; }
.ct-card { border-radius: 28px; border: 1px solid var(--line-strong); background: var(--panel); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.ct-card h2 { margin: 0; font-size: 18px; font-weight: 700; }
.ct-table-head, .ct-table .prize-row { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; }
.ct-table-head { font-size: 12px; color: var(--quiet); padding-bottom: 10px; border-bottom: 1px solid var(--line-strong); }
.ct-table-head span:not(:first-child), .ct-table .prize-row span:not(:first-child) { text-align: right; min-width: 90px; }
.ct-table .prize-row { padding: 14px 0; border-bottom: 1px solid var(--line-strong); font-size: 16px; }
.ct-table .prize-row:last-child { border-bottom: 0; }
.ct-table .prize-row span:nth-child(2) { color: var(--quiet); }
.ct-table .prize-row span:nth-child(3) { font-weight: 700; }
.ct-extras { display: flex; flex-direction: column; gap: 10px; }
.ct-extras > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.ct-extras strong { color: var(--text); font-weight: 500; }
.ct-note { font-size: 12px; color: var(--quiet); }

@media (max-width: 760px) {
  .ct-top { grid-template-columns: 1fr auto; }
  .ct-top .pg-back { order: 3; grid-column: 1 / -1; }
  .ct-shell { padding-top: 32px; }
  .ct-clock { gap: 8px; }
  .ct-clock > div { width: calc(25% - 6px); height: 84px; }
  .ct-clock b { font-size: 28px; }
  .ct-balls { gap: 8px; }
  .ct-balls span { width: 48px; height: 48px; font-size: 17px; }
  .ct-facts, .ct-bottom { grid-template-columns: minmax(0, 1fr); }
  .ct-table-head, .ct-table .prize-row { gap: 12px; font-size: 14px; }
  .ct-table-head span:not(:first-child), .ct-table .prize-row span:not(:first-child) { min-width: 0; }
}


/* =========================== 404 (tela 26) =========================== */
.nf-body { position: relative; overflow: hidden; }
.nf-glow {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  width: min(700px, 100%);
  height: 700px;
  margin: -350px auto 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 0, 0.12) 0%, rgba(255, 194, 0, 0) 65%);
  animation: sl-drift 12s ease-in-out infinite;
  pointer-events: none;
}
.nf-top { position: relative; padding-top: 18px; padding-bottom: 18px; }
.nf-main { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 40px 24px 80px; text-align: center; }
.nf-balls { display: flex; gap: 16px; align-items: center; }
.nf-four { width: 110px; height: 110px; border-radius: 50%; border: 3px dashed rgba(255, 194, 0, 0.5); color: var(--yellow); display: grid; place-items: center; font: 700 44px var(--font-mono); }
.nf-logo { width: 130px; height: 130px; border-radius: 50%; background: var(--yellow); color: var(--amber-ink); display: grid; place-items: center; animation: nf-float 4s ease-in-out infinite; }
.nf-logo img { height: 70px; width: auto; display: block; }
@keyframes nf-float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-18px) rotate(6deg); } }
.nf-main h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.nf-main p { margin: 0; max-width: 460px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.nf-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.nf-btn { height: 54px; padding: 0 28px; }
.nf-btn-2 { display: inline-flex; align-items: center; padding: 0 24px; border-radius: var(--r-pill); background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text) !important; text-decoration: none; transition: border-color 0.2s var(--ease); }
.nf-btn-2:hover { border-color: var(--yellow-edge); }
@media (max-width: 480px) {
  .nf-four { width: 76px; height: 76px; font-size: 30px; }
  .nf-logo { width: 92px; height: 92px; }
  .nf-logo img { height: 50px; }
}

/* ---------- trevos dos jogos ---------- */
.pg-tag:has(.sl-trevo) { display: inline-flex; align-items: center; gap: 6px; }
.pg-tag .sl-trevo { opacity: 0.85; }
[data-game-tab] .sl-trevo { margin-right: 7px; }
.rs-status, [data-result-status] { display: inline-flex; align-items: center; }
.rs-featured { --px-bg: var(--panel); }
.rs-featured > .px-layer { opacity: 0.3; height: 120px !important; }
.nf-body > .px-layer { position: fixed; }
/* acompanhar o sorteio */
.rs-next-live { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 999px; border: 1.5px solid rgba(4, 4, 33, 0.35); color: var(--amber-ink); font-weight: 700; text-decoration: none; }
.rs-next-live:hover { background: rgba(4, 4, 33, 0.08); }
.rs-next-live[hidden], .rs-f-page[hidden] { display: none; }
.rs-f-page { font-size: 13px; font-weight: 700; color: var(--yellow); text-decoration: none; }
.rs-f-page:hover { text-decoration: underline; }
.rs-next .rs-next-live { color: #040421; }
.rs-next .rs-next-live .rs-next-dot { background: #040421; }
