/* Ray Facts — black premium + glassmorphism, layout fluido.
   Tipografia grande estilo Apple, vidro fosco translúcido, acentos nos tons
   de sistema do iOS dark (verde/vermelho/âmbar) reservados ao veredito. */

:root {
  --bg: #050507;
  --ink: #f5f5f7;
  --ink-dim: rgba(245, 245, 247, 0.62);
  --ink-faint: rgba(245, 245, 247, 0.38);

  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-rim: rgba(255, 255, 255, 0.12);
  --glass-rim-soft: rgba(255, 255, 255, 0.07);
  --glass-blur: 28px;

  --green: #30d158;
  --red: #ff453a;
  --amber: #ffd60a;

  --radius: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  font-size: 16px;
}

* { box-sizing: border-box; }

/* O atributo hidden precisa vencer display:flex das classes dos overlays. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
    "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  padding-bottom: 4rem;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(120, 119, 255, 0.35); }

/* ── Luzes ambientes ─────────────────────────────────────────────────────── */

.ambience {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
  animation: drift 26s ease-in-out infinite alternate;
}

.glow--a { width: 60vmax; height: 60vmax; background: #5e5ce6; top: -25vmax; right: -15vmax; }
.glow--b { width: 46vmax; height: 46vmax; background: #0a84ff; bottom: -18vmax; left: -12vmax; animation-delay: -9s; opacity: 0.12; }
.glow--c { width: 30vmax; height: 30vmax; background: #ff375f; top: 45vh; right: 8vw; animation-delay: -18s; opacity: 0.07; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(5vmin, 7vmin, 0) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .live-dot, .empty__mark::after, .reveal { animation: none !important; }
}

/* ── Reveal (entrada fluida, stagger via inline style) ───────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal-up 0.9s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(4rem, 12vh, 7.5rem) 1.25rem 2rem;
  max-width: 60rem;
  margin: 0 auto;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.6rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--glass-bg);
  border: 1px solid var(--glass-rim-soft);
  border-radius: 999px;
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse 1.6s var(--ease) infinite;
  flex-shrink: 0;
}

.hero__kicker[data-status="live"] .live-dot { background: var(--green); animation: none; box-shadow: 0 0 12px rgba(48, 209, 88, 0.7); }
.hero__kicker[data-status="live"] { color: var(--ink); }
.hero__kicker[data-status="down"] .live-dot { background: var(--red); animation: none; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

.hero__title {
  margin: 0;
  font-size: clamp(3rem, 11vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.hero__line { display: block; }

.hero__line--shine {
  background: linear-gradient(100deg, #f5f5f7 20%, rgba(245, 245, 247, 0.45) 45%, #f5f5f7 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 6s var(--ease) infinite;
}

@keyframes shine {
  0%, 100% { background-position: 0% 0; }
  50% { background-position: 100% 0; }
}

.hero__sub {
  margin: 1.6rem auto 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-dim);
  font-weight: 400;
}

.hero__sub strong { color: var(--ink); font-weight: 600; }

/* Horário do debate — pill de vidro com o horário em destaque */
.hero__when {
  display: inline-flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 2rem auto 0;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-rim-soft);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  font-variant-numeric: tabular-nums;
}

.hero__when-day {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hero__when-time {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */

.empty {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(3rem, 9vh, 6rem) 1.25rem 1rem;
  max-width: 56rem;
  margin: 0 auto;
}

.empty__mark {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  position: relative;
  display: inline-block;
}

/* varredura sutil sobre o "EM BREVE" — vidro sendo polido */
.empty__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(245, 245, 247, 0.55) 50%, transparent 70%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4.5s var(--ease) infinite;
}

.empty__sub {
  margin: 1.1rem auto 0;
  max-width: 30rem;
  color: var(--ink-dim);
  line-height: 1.55;
}

.empty__sub strong { color: var(--ink); font-weight: 600; }

/* ── Muro (grid fluido) ──────────────────────────────────────────────────── */

.wall {
  position: relative;
  z-index: 1;
  max-width: 78rem;
  margin: 0 auto;
  padding: 1rem 1.25rem 0;
}

.wall__title {
  margin: 2.5rem 0 1.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.grid {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

/* ── Story card (vidro com brilho do veredito) ───────────────────────────── */

.tray__card {
  position: relative;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--glass-rim-soft);
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  background: rgba(12, 13, 18, 0.6);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
  animation: card-in 0.8s var(--ease) backwards;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.tray__card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-rim);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

.tray__card--new { animation: card-in 0.8s var(--ease) backwards; }

.story__bg {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  transition: opacity 0.6s var(--ease);
}

.tray__card:hover .story__bg { opacity: 0.26; }

.story__bg--TRUE      { background: radial-gradient(120% 70% at 50% 0%, var(--green), transparent 70%); }
.story__bg--FALSE     { background: radial-gradient(120% 70% at 50% 0%, var(--red), transparent 70%); }
.story__bg--UNCERTAIN { background: radial-gradient(120% 70% at 50% 0%, var(--amber), transparent 70%); }

/* fio de luz no topo do vidro */
.tray__card::before,
.viewer__stage .story::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  z-index: 2;
  pointer-events: none;
}

.story__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.25rem 1.25rem 1.1rem;
}

.story__ring { display: flex; gap: 5px; }

.story__ring span {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.tray__card:hover .story__ring span { background: rgba(255, 255, 255, 0.32); }

.story__quote {
  margin: 0.6rem 0 0;
  font-size: 1.08rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.story__quote::before { content: "“"; opacity: 0.5; }
.story__quote::after  { content: "”"; opacity: 0.5; }

.stamp {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.32rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stamp--TRUE      { color: var(--green); border-color: rgba(48, 209, 88, 0.45); }
.stamp--FALSE     { color: var(--red); border-color: rgba(255, 69, 58, 0.45); }
.stamp--UNCERTAIN { color: var(--amber); border-color: rgba(255, 214, 10, 0.4); }

.story__spacer { flex: 1; }

.story__conf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.story__conf i {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  position: relative;
}

.story__conf i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 33%);
  background: #fff;
  border-radius: inherit;
  opacity: 0.85;
}

.story__send {
  align-self: stretch;
  margin-top: 0.7rem;
  padding: 0.72rem 0;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-rim);
  border-radius: 16px;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.story__send:hover { transform: scale(1.025); background: rgba(255, 255, 255, 0.14); }
.story__send:active { transform: scale(0.98); }

.story__links { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.6rem; }

.story__links a,
.story__terms a {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(245, 245, 247, 0.82);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.story__links a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story__links a::before { content: "🔗 "; font-size: 0.75rem; }
.story__links a:hover, .story__terms a:hover { color: #fff; }

.story__terms { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.55rem; }

.story__terms a {
  padding: 0.32rem 0.8rem;
  font-size: 0.76rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-rim-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.story__terms a::before { content: "🔎 "; font-size: 0.72rem; }

.story__checagem {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink-dim);
  overflow-y: auto;
  min-height: 0;
}

.story__checagem p { margin: 0 0 0.5em; }
.story__checagem strong { color: var(--ink); font-weight: 600; }

/* ── Viewer (stories fullscreen) ─────────────────────────────────────────── */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgba(5, 5, 7, 0.82);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  animation: viewer-in 0.45s var(--ease);
}

@keyframes viewer-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.viewer__bars { display: flex; gap: 5px; padding: 1rem 1.25rem 0; }

.viewer__bars span {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  position: relative;
}

.viewer__bars span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.viewer__bars span.is-done::after { transform: scaleX(1); }
.viewer__bars span.is-current::after { transition: transform var(--step-ms, 6000ms) linear; }

.viewer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
}

.viewer__brand { display: inline-flex; align-items: center; gap: 0.7rem; font-size: 0.88rem; font-weight: 600; line-height: 1.25; }

.viewer__brand small { color: var(--ink-faint); font-weight: 400; font-size: 0.76rem; }

.viewer__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #5e5ce6, #0a84ff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.viewer__close {
  border: 1px solid var(--glass-rim-soft);
  background: var(--glass-bg);
  color: var(--ink);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s var(--ease);
}

.viewer__close:hover { background: var(--glass-bg-strong); }

.viewer__stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr min(92vw, 420px) 1fr;
  align-items: center;
  justify-items: center;
  padding: 0.4rem 0.6rem;
}

.viewer__stage .story {
  width: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(12, 13, 18, 0.75);
  border: 1px solid var(--glass-rim);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.viewer__tap {
  align-self: stretch;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.viewer__foot { display: flex; justify-content: center; padding: 0.9rem 1rem 1.4rem; }

.viewer__stage .story__quote {
  -webkit-line-clamp: unset;
  overflow: visible;
  font-size: 1.2rem;
}

/* ── Sheet de envio ──────────────────────────────────────────────────────── */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet__panel {
  position: relative;
  width: min(94vw, 26rem);
  margin-bottom: 1.2rem;
  padding: 1rem 1rem 0.8rem;
  border-radius: 30px;
  background: rgba(18, 19, 24, 0.82);
  border: 1px solid var(--glass-rim);
  backdrop-filter: blur(36px) saturate(160%);
  -webkit-backdrop-filter: blur(36px) saturate(160%);
  box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.55);
  animation: sheet-up 0.4s var(--ease);
}

@keyframes sheet-up {
  from { transform: translateY(36%); opacity: 0.4; }
  to   { transform: translateY(0); opacity: 1; }
}

.sheet__grip {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.sheet__title {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sheet__opt {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--glass-bg);
  border: 1px solid var(--glass-rim-soft);
  border-radius: 18px;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.sheet__opt:hover { background: var(--glass-bg-strong); transform: scale(1.01); }
.sheet__opt small { display: block; color: var(--ink-faint); font-size: 0.76rem; margin-top: 0.12rem; }
.sheet__emoji { font-size: 1.4rem; }

.sheet__cancel {
  width: 100%;
  margin: 0.3rem 0 0.4rem;
  padding: 0.65rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink-dim);
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  z-index: 70;
  max-width: 90vw;
  padding: 0.75rem 1.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  color: var(--ink);
  background: rgba(24, 25, 30, 0.85);
  border: 1px solid var(--glass-rim);
  border-radius: 999px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.4s var(--ease);
}

@keyframes toast-in {
  from { transform: translate(-50%, 16px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ── Rodapé ──────────────────────────────────────────────────────────────── */

.foot {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.foot a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px solid var(--glass-rim-soft); }
.foot a:hover { color: var(--ink-dim); }
