/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ───────────────────────────────────────────── */
:root {
  --bg:          #07070f;
  --bg-2:        #0b0b18;
  --surface:     #0e0e1c;
  --surface-2:   #131328;
  --border:      #1c1c38;
  --border-2:    #26264a;

  --lime:        #c8ff00;
  --hot:         #ff2d6b;
  --cyan:        #00ffd5;
  --violet:      #a78bfa;
  --gold:        #ffbb00;
  --orange:      #ff6f00;

  --text:        #ecedff;
  --muted:       #56567a;
  --subtle:      #1e1e38;

  --r:           10px;
  --gap:         24px;
}

/* ── Base ─────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  /* dot grid texture */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 32px 32px;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* ambient top glow */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  height: 55vh;
  background: radial-gradient(ellipse, rgba(200,255,0,0.045) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-pulse 8s ease-in-out infinite;
}

@keyframes ambient-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── Cursor glow ──────────────────────────────────────── */
#cursor-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(200,255,0,0.04) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  top: -280px;
  left: -280px;
  will-change: top, left;
  transition: top 0.35s ease-out, left 0.35s ease-out;
}

/* ── Shell ────────────────────────────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: var(--gap) var(--gap) 100px;
}

.hidden { display: none !important; }

/* ── Site navigation bar ─────────────────────────────────── */
.site-nav {
  background: rgba(7, 7, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Gradient accent line at the bottom of the nav */
.site-nav::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(200,255,0,0.55) 25%,
    rgba(0,255,213,0.55) 75%,
    transparent 100%
  );
}

.site-nav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gap);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-mark {
  display: flex;
  align-items: center;
}

.nav-logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: stretch;
  height: 100%;
}

.nav-link {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover:not(:disabled):not(.nav-link--active) {
  color: var(--text);
}

/* Active: lime text + lime underline pill */
.nav-link--active {
  color: var(--lime);
}

.nav-link--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--lime);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 8px rgba(200,255,0,0.5);
}

.nav-link:disabled {
  color: rgba(86,86,122,0.35);
  cursor: default;
}

@media (max-width: 480px) {
  .site-nav-inner { padding: 0 12px; }
  .nav-logo-name  { font-size: 0.95rem; }
  .nav-link       { padding: 0 10px; font-size: 0.56rem; letter-spacing: 0.08em; }
}

/* ── Hero ─────────────────────────────────────────────── */
.hero-block {
  padding: 52px 0 40px;
  text-align: center;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.6rem, 8.5vw, 6rem);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero-line--plain {
  color: var(--text);
}

.hero-line--accent {
  background: linear-gradient(100deg, var(--lime) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(200,255,0,0.22));
}

.hero-sub {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── Form card ────────────────────────────────────────── */
.form-card {
  background: linear-gradient(170deg, rgba(200,255,0,0.025) 0%, var(--surface) 25%);
  border: 1px solid var(--border-2);
  border-top: 2px solid var(--lime);
  border-radius: var(--r);
  padding: 36px;
  margin-bottom: var(--gap);
  box-shadow: 0 0 60px rgba(200,255,0,0.04);
}

.field { margin-bottom: 24px; }

/* ── Form blocks ──────────────────────────────────────── */
.form-block + .form-block {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.form-block-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.form-block-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--lime);
  flex-shrink: 0;
  line-height: 1;
}

.form-block-hint {
  margin-top: 10px;
  margin-bottom: 20px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8888aa;
  margin-bottom: 10px;
}

.required { color: var(--lime); }
.optional {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-family: 'Inter', sans-serif;
}

input[type="url"],
input[type="text"],
textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(200,255,0,0.08);
}

input.input--error,
textarea.input--error {
  border-color: var(--hot);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 0.55;
}

select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2356567a' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

select:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(200,255,0,0.08);
}

select.select--error {
  border-color: var(--hot);
}

select.select--placeholder {
  color: var(--muted);
  opacity: 0.7;
}

select option {
  background: var(--surface-2);
  color: var(--text);
  opacity: 1;
}

.select-hint {
  margin-top: 6px;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  min-height: 1.1em;
  color: transparent;
  transition: color 0.15s;
}

.select-hint:empty {
  min-height: 0;
  margin-top: 0;
}

.select-hint--error { color: var(--hot); }

.field--lang-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 520px) {
  .field--lang-row { grid-template-columns: 1fr; }
}

#submit-btn {
  width: 100%;
  margin-top: 8px;
  background: var(--lime);
  color: #07070f;
  border: none;
  border-radius: 8px;
  padding: 17px 28px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.15s;
}

#submit-btn:hover:not(:disabled) {
  background: #d4ff1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(200,255,0,0.32), 0 2px 8px rgba(0,0,0,0.4);
}

#submit-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(200,255,0,0.2);
}

#submit-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

#submit-btn:hover:not(:disabled) .btn-arrow {
  transform: translateX(5px);
}

/* ── Quota bar ───────────────────────────────────────── */
.quota-bar {
  margin: 14px 0 0;
  text-align: center;
  line-height: 1.4;
}

.quota-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted, #8888aa);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quota-count {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #e0e0f0);
}

.quota-bar--warn .quota-count {
  color: #f0a500;
}

.quota-bar--esgotado .quota-count {
  color: #e05252;
}

/* ── Loading ──────────────────────────────────────────── */
.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  gap: 36px;
  text-align: center;
  padding: 60px 0;
}

.loader-rings {
  position: relative;
  width: 80px;
  height: 80px;
}

.ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ring--outer {
  border-top-color: var(--lime);
  border-right-color: var(--lime);
  animation: spin-cw 1.1s cubic-bezier(0.5,0,0.5,1) infinite;
}

.ring--inner {
  inset: 14px;
  border-bottom-color: var(--hot);
  border-left-color: var(--hot);
  animation: spin-ccw 0.75s linear infinite;
}

.ring--pulse {
  inset: -6px;
  border: 1px solid rgba(200,255,0,0.1);
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes spin-cw  { to { transform: rotate(360deg);  } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }
@keyframes pulse-ring {
  0%, 100% { transform: scale(1);   opacity: 0.4; }
  50%       { transform: scale(1.1); opacity: 0; }
}

.loading-vibe {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.06em;
  color: var(--text);
  min-height: 2.8rem;
  animation: fade-up 0.35s ease-out;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.loading-hint {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ── Error ────────────────────────────────────────────── */
.error-card {
  background: var(--surface);
  border: 1px solid rgba(255,45,107,0.3);
  border-radius: var(--r);
  padding: 32px;
  margin-bottom: var(--gap);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 0 40px rgba(255,45,107,0.07);
}

.error-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,45,107,0.12);
  color: var(--hot);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.error-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hot);
}

.error-detail {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

#retry-btn {
  background: transparent;
  color: var(--hot);
  border: 1px solid rgba(255,45,107,0.5);
  border-radius: 8px;
  padding: 10px 24px;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

#retry-btn:hover {
  background: var(--hot);
  color: #fff;
  border-color: var(--hot);
}

/* ── Result header ────────────────────────────────────── */
.result-header {
  background: linear-gradient(170deg, rgba(200,255,0,0.025) 0%, var(--surface) 25%);
  border: 1px solid var(--border-2);
  border-top: 2px solid var(--lime);
  border-radius: var(--r);
  padding: 32px;
  margin-bottom: var(--gap);
  box-shadow: 0 0 50px rgba(200,255,0,0.04);
}

.result-header-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-vod-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-vod-eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--muted);
  flex-shrink: 0;
}

.result-vod-link {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--lime);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: color 0.15s, filter 0.2s;
}

.result-vod-link:hover {
  color: #d8ff33;
  filter: drop-shadow(0 0 20px rgba(200,255,0,0.35));
}

.link-arrow {
  width: 22px;
  height: 22px;
  opacity: 0.55;
  flex-shrink: 0;
}

.result-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  padding: 5px 12px;
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.meta-chip strong {
  color: var(--text);
  font-weight: 700;
}

.meta-chip--brand {
  border-color: rgba(255,45,107,0.3);
  background: rgba(255,45,107,0.07);
  color: var(--hot);
}

.meta-chip--brand strong { color: var(--hot); }

.meta-chip--context {
  max-width: 520px;
  white-space: normal;
  line-height: 1.4;
}

/* ── Highlight grid ───────────────────────────────────── */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: var(--gap);
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid;
  border-radius: var(--r);
  padding: 26px 22px 22px;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

/* color-tinted corner glow on hover via ::before */
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 15% 0%,
    rgba(var(--glow-rgb, 100,100,100), 0.07) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  border-radius: inherit;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 0 28px rgba(var(--glow-rgb, 100,100,100), 0.16),
    0 8px 28px rgba(0,0,0,0.35);
}

.stat-card:hover::before { opacity: 1; }

.stat-card--muted {
  opacity: 0.35;
  pointer-events: none;
}

.stat-number {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.stat-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-sub {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ── Raw JSON ─────────────────────────────────────────── */
.raw-details {
  margin-bottom: var(--gap);
}

.raw-details summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  padding: 12px 0;
  user-select: none;
  transition: color 0.15s;
}

.raw-details summary::before {
  content: '▶';
  font-size: 0.5rem;
  transition: transform 0.2s;
  display: inline-block;
}

.raw-details[open] summary::before { transform: rotate(90deg); }
.raw-details summary:hover { color: var(--text); }

.raw-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-top: 4px;
}

pre#json-dump {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.73rem;
  line-height: 1.55;
  color: var(--cyan);
  overflow-x: auto;
  white-space: pre;
  max-height: 480px;
  overflow-y: auto;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 680px) {
  .shell { padding: 0 16px 60px; }

  .hero-block { padding: 32px 0 24px; }
  .hero-title { font-size: clamp(3rem, 11vw, 4.5rem); }

  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-number { font-size: 2.6rem; }
  .result-vod-link { font-size: 2.2rem; }
  .form-card, .result-header { padding: 22px; }
}

@media (max-width: 400px) {
  .stat-number { font-size: 2.1rem; }
  .highlight-grid { gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   FASE 3 — Análise de IA
   ═══════════════════════════════════════════════════════════ */

/* ── AI error warning ─────────────────────────────────────── */
.ai-error-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: var(--gap);
}

.ai-error-icon {
  font-size: 1.5rem;
  color: var(--gold);
  flex-shrink: 0;
  line-height: 1;
}

.ai-error-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.ai-error-detail {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Wrapper + section header ─────────────────────────────── */
.analysis-wrap {
  margin-bottom: var(--gap);
}

.analysis-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.analysis-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.analysis-model {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Analysis block (card unit) ───────────────────────────── */
.ablock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 30px;
  margin-bottom: 12px;
}

.ablock--brand {
  border-top: 2px solid var(--hot);
  background: linear-gradient(170deg, rgba(255,45,107,0.025) 0%, var(--surface) 22%);
}

/* ── Block eyebrow label ──────────────────────────────────── */
.ablock-eye {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ablock-eye::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.ablock-eye--brand { color: var(--hot); }

/* ── Summary ──────────────────────────────────────────────── */
.summary-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  border-left: 2px solid var(--lime);
  padding-left: 18px;
}

/* ── Topics list ──────────────────────────────────────────── */
.topics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topic-item { }

.topic-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.topic-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.topic-intensity {
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  flex-shrink: 0;
  line-height: 1.6;
}
.topic-intensity--alta  { background: rgba(200,255,0,0.12);   color: var(--lime); }
.topic-intensity--media { background: rgba(255,187,0,0.12);   color: #ffbb00; }
.topic-intensity--baixa { background: rgba(167,139,250,0.12); color: #a78bfa; }

.topic-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ── Chip row (topics + associations) ────────────────────── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.achip {
  display: inline-flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.81rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.4;
}

.achip--brand {
  border-color: rgba(255,45,107,0.3);
  background: rgba(255,45,107,0.08);
  color: var(--hot);
}

/* ── Sentiment ────────────────────────────────────────────── */
.sent-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  border-radius: 5px;
  padding: 4px 14px 2px;
  margin-bottom: 16px;
}

.sent-badge--sm {
  font-size: 0.95rem;
  padding: 3px 10px 1px;
  margin-bottom: 14px;
}

.sent--pos {
  background: rgba(200,255,0,0.1);
  color: var(--lime);
  border: 1px solid rgba(200,255,0,0.28);
}

.sent--neg {
  background: rgba(255,45,107,0.1);
  color: var(--hot);
  border: 1px solid rgba(255,45,107,0.28);
}

.sent--neu {
  background: rgba(86,86,122,0.18);
  color: var(--muted);
  border: 1px solid var(--border-2);
}

.sent--mix {
  background: rgba(167,139,250,0.1);
  color: var(--violet);
  border: 1px solid rgba(167,139,250,0.28);
}

.sent-desc {
  font-size: 0.91rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 14px;
}

.sent-caveat {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  border-left: 2px solid var(--border-2);
  padding-left: 14px;
  display: flex;
  gap: 8px;
}

/* ── Key moments ──────────────────────────────────────────── */
.moments-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.moment-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 2px solid var(--cyan);
  border-radius: 8px;
  padding: 14px 18px;
  transition: border-left-color 0.2s;
}

.moment-item:hover { border-left-color: var(--lime); }

.moment-min {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--cyan);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 66px;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.moment-min:hover { color: var(--lime); }

.moment-desc {
  font-size: 0.87rem;
  line-height: 1.65;
  color: var(--text);
  padding-top: 4px;
}

/* ── Notable quotes ───────────────────────────────────────── */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quote-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s;
}

.quote-card:hover { border-color: var(--border-2); }

/* decorative quotation mark */
.quote-card::before {
  content: '"';
  position: absolute;
  top: -14px;
  left: 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 5.5rem;
  line-height: 1;
  color: var(--subtle);
  pointer-events: none;
  user-select: none;
}

.quote-text {
  font-size: 0.87rem;
  line-height: 1.7;
  color: var(--text);
  padding-top: 26px;
  position: relative;
  z-index: 1;
  word-break: break-word;
}

.quote-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  font-family: 'Syne', sans-serif;
}

.quote-user {
  color: var(--lime);
  font-weight: 700;
}

.quote-sep { color: var(--muted); }

.quote-time {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.quote-time:hover { color: var(--cyan); }

/* ── Brand analysis ───────────────────────────────────────── */
.brand-summary {
  font-size: 0.91rem;
  line-height: 1.75;
  color: var(--text);
  margin: 14px 0;
}

/* ── Recurrent questions ──────────────────────────────────── */
.questions-list {
  list-style: none;
  counter-reset: questions;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-item {
  counter-increment: questions;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--text);
}

.question-item::before {
  content: counter(questions, decimal-leading-zero);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 22px;
  line-height: 1.4;
}

/* ── Responsive (fase 3) ──────────────────────────────────── */
@media (max-width: 680px) {
  .quotes-grid { grid-template-columns: 1fr; }
  .ablock { padding: 20px; }
}

/* ═══════════════════════════════════════════════════════════
   FASE 4 — Gráficos e Rankings
   ═══════════════════════════════════════════════════════════ */

/* ── Section header ───────────────────────────────────────── */
.charts-wrap  { margin-bottom: var(--gap); }

.charts-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.charts-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* ── Chart block (card) ───────────────────────────────────── */
.cblock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px 30px;
  margin-bottom: 12px;
}

.cblock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cblock-eye {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.cblock-eye::before {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* for blocks without cblock-top wrapper */
.cblock > .cblock-eye { margin-bottom: 20px; }

.eye-note {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: inherit;
  margin-left: 2px;
}

.peak-badge {
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--lime);
  background: rgba(200,255,0,0.07);
  border: 1px solid rgba(200,255,0,0.2);
  border-radius: 4px;
  padding: 4px 10px;
  white-space: nowrap;
}

/* ── Activity chart canvas ────────────────────────────────── */
.chart-container {
  position: relative;
  height: 220px;
}

/* ── Emotes + Users 2-col grid ───────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

/* ── Shared bar animation ─────────────────────────────────── */
.bar-fill {
  height: 100%;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: bar-grow 0.75s cubic-bezier(0.25, 0, 0, 1) forwards;
}

@keyframes bar-grow { to { transform: scaleX(1); } }

.bar-fill--emote {
  background: linear-gradient(90deg, var(--cyan), rgba(0,255,213,0.4));
}

.bar-fill--user {
  background: linear-gradient(90deg, var(--lime), rgba(200,255,0,0.35));
}

.bar-track {
  flex: 1;
  background: var(--bg-2);
  border-radius: 2px;
  height: 4px;
  overflow: hidden;
  min-width: 0;
}

.bar-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  flex-shrink: 0;
  width: 46px;
  text-align: right;
}

/* ── Emotes list ──────────────────────────────────────────── */
.emotes-list { display: flex; flex-direction: column; }

/* ── Card footer note — used by emotes and topics legends ─── */
.card-note {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 10px;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.7;
}
.card-note--warn {
  color: var(--gold);
  border-top-color: rgba(255,187,0,0.2);
}

.emote-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.emote-item:last-child { border-bottom: none; }

.emote-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.emote-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
  image-rendering: pixelated;
}

.emote-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 20px;
  flex-shrink: 0;
  line-height: 1.6;
}
.emote-badge--nativo   { background: rgba(168,85,247,0.18); color: #c084fc; }
.emote-badge--terceiro { background: rgba(34,197,94,0.15);  color: #4ade80; }

.emote-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
  width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Users ranking ────────────────────────────────────────── */
.users-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.user-item:last-child { border-bottom: none; }

.user-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.user-item--top .user-rank {
  color: var(--lime);
  font-size: 1.15rem;
}

.user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item--top .user-name  {
  color: var(--lime);
  font-weight: 600;
}

.user-item--top .bar-fill--user {
  background: linear-gradient(90deg, var(--lime), var(--cyan));
  filter: drop-shadow(0 0 4px rgba(200,255,0,0.3));
}

/* ── No-data fallback ─────────────────────────────────────── */
.no-data-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  padding: 8px 0;
}

/* ── Responsive (fase 4) ──────────────────────────────────── */
@media (max-width: 680px) {
  .charts-grid    { grid-template-columns: 1fr; }
  .chart-container { height: 180px; }
  .cblock         { padding: 20px; }
  .emote-name     { width: 55px; }
}

/* ═══════════════════════════════════════════════════════════
   FASE 5 — Word cloud, form notice, polish
   ═══════════════════════════════════════════════════════════ */

/* ── Form notice ──────────────────────────────────────────── */
.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0,255,213,0.04);
  border: 1px solid rgba(0,255,213,0.1);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.notice-icon {
  font-size: 1rem;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.8;
}

.notice-body {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.65;
}

.notice-body strong {
  display: block;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.notice-body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notice-body li { display: flex; gap: 6px; }

.notice-body li::before {
  content: '→';
  color: var(--cyan);
  opacity: 0.6;
  flex-shrink: 0;
}

.notice-body strong + ul strong {
  display: inline;
  color: var(--text);
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-size: inherit;
  margin-bottom: 0;
}

/* ── Word cloud block ─────────────────────────────────────── */
.cblock--wc { margin-bottom: 12px; }

/* ── PDF / Print button ───────────────────────────────────── */
.dash-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.dash-action-btn--pdf:hover {
  color: var(--lime);
  border-color: var(--lime);
}

.dash-action-btn--chat:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ═══════════════════════════════════════════════════════════
   PRINT — dark theme preserved (digital PDF use)
   ═══════════════════════════════════════════════════════════ */
@media print {
  /* Force background colours and images to print */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body { background: var(--bg); }

  /* Hide non-report chrome */
  #cursor-glow,
  .site-nav,
  #hero-block,
  #input-section,
  #loading-section,
  #error-section,
  .raw-details,
  .dash-actions  { display: none !important; }

  /* Ensure result is always visible */
  #result-section { display: block !important; }

  .shell { padding: 20px; max-width: none; }

  /* Avoid bad page breaks inside cards */
  .stat-card,
  .ablock,
  .cblock { break-inside: avoid; page-break-inside: avoid; }

  /* Links — no underline */
  a { text-decoration: none; }

  /* Canvas (charts, word cloud) */
  canvas { max-width: 100% !important; }
}

.wc-wrap {
  width: 100%;
  height: 340px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-2);
  /* subtle inner border so canvas edge doesn't float */
  box-shadow: inset 0 0 0 1px var(--border);
}

.wc-wrap canvas { display: block; }

/* ── Polish: result-section top spacing ───────────────────── */
#result-section { padding-top: 8px; }

/* ── Polish: loading scroll-to-top on submit ──────────────── */
/* (handled in JS, no CSS needed) */

/* ── Polish: responsive word cloud ───────────────────────── */
@media (max-width: 680px) {
  .wc-wrap          { height: 260px; }
  .form-notice      { flex-direction: column; gap: 8px; }
}

/* ── Polish: compact quotes list ─────────────────────────── */
.quotes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.quote-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
  line-height: 1.55;
}

.quote-item:last-child { border-bottom: none; }

.quote-item .quote-user {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.quote-item .quote-time {
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: color 0.15s;
}

.quote-item .quote-time:hover { color: var(--cyan); }

.quote-item .quote-sep {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.5;
}

.quote-item .quote-text {
  color: var(--text);
  word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   FASE 6C — Recorte de tempo
   ═══════════════════════════════════════════════════════════ */

/* ── Time range row ───────────────────────────────────────── */
.time-range-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.time-field { flex: 1; min-width: 0; }

.time-range-sep {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--muted);
  padding-top: 12px;
  flex-shrink: 0;
  line-height: 1;
}

.time-preview {
  margin-top: 6px;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  min-height: 1.1em;
  color: transparent;
  transition: color 0.15s;
}

.time-preview:empty {
  min-height: 0;
  margin-top: 0;
}

.time-preview--ok    { color: var(--cyan); }
.time-preview--error { color: var(--hot); }

.field-hint {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Recorte chip ─────────────────────────────────────────── */
.meta-chip--janela {
  border-color: rgba(0,255,213,0.3);
  background: rgba(0,255,213,0.07);
  color: var(--cyan);
}
.meta-chip--janela strong { color: var(--cyan); }

@media (max-width: 680px) {
  .time-range-row { flex-direction: column; gap: 8px; }
  .time-range-sep { display: none; }
}

/* ── History ──────────────────────────────────────────────── */

#history-section { padding-top: 8px; }

.history-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
  gap: 16px;
}

.history-empty-msg,
.history-fetch-error {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 10px;
  display: flex;
  align-items: stretch;
  transition: border-color 0.15s;
  overflow: hidden;
}

.history-item--concluida:hover { border-color: var(--border-2); }

.history-item--loading { opacity: 0.55; pointer-events: none; }

.hitem-main {
  position: relative;
  flex: 1;
  padding: 18px 85px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.history-item--concluida .hitem-main { cursor: pointer; }

.hitem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hitem-title {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hitem-title--muted {
  color: var(--muted);
  font-style: italic;
  font-weight: 600;
}

.hitem-badge {
  position: absolute;
  top: 16px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Syne', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.hitem-badge::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.hitem-badge--concluida  { background: rgba(0,255,180,0.08);  color: #00ffb4; border: 1px solid rgba(0,255,180,0.2); }
.hitem-badge--processando{ background: rgba(255,187,0,0.08);  color: var(--gold); border: 1px solid rgba(255,187,0,0.2); }
.hitem-badge--erro       { background: rgba(255,45,107,0.08); color: var(--hot);  border: 1px solid rgba(255,45,107,0.2); }

.hitem-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.hitem-vod {
  color: var(--cyan);
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
}
.hitem-vod:hover { text-decoration: underline; }

.hitem-sep   { color: var(--border-2); }
.hitem-canal { font-size: 0.72rem; font-weight: 600; color: var(--text); }
.hitem-date  { font-size: 0.72rem; }
.hitem-date strong { color: var(--text); font-weight: 600; }

.hitem-chip {
  font-size: 0.65rem;
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--muted);
}
.hitem-chip strong { color: var(--text); font-weight: 700; }
.hitem-main > .hitem-chip { position: absolute; bottom: 16px; right: 20px; }

.hitem-detail {
  font-size: 0.78rem;
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  color: transparent;
  transition: max-height 0.2s ease, padding 0.2s ease, margin-top 0.2s ease, color 0.15s ease;
}

.hitem-detail--info,
.hitem-detail--error {
  max-height: 120px;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
}

.hitem-detail--info  { background: rgba(167,139,250,0.07); color: var(--violet); border: 1px solid rgba(167,139,250,0.18); }
.hitem-detail--error { background: rgba(255,45,107,0.06);  color: var(--hot);    border: 1px solid rgba(255,45,107,0.18); }

.hitem-actions {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}

.hitem-delete {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.hitem-delete:hover { color: var(--hot); background: rgba(255,45,107,0.1); }

/* ── Delete modal ─────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,7,15,0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-box {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 28px 32px;
  max-width: 400px;
  width: 100%;
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.modal-body {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 24px;
}
.modal-body strong { color: var(--text); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 9px 20px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.modal-btn--cancel {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border-2);
}
.modal-btn--cancel:hover { color: var(--text); border-color: var(--muted); }

.modal-btn--confirm {
  background: rgba(255,45,107,0.1);
  color: var(--hot);
  border: 1px solid rgba(255,45,107,0.35);
}
.modal-btn--confirm:hover { background: var(--hot); color: #fff; border-color: var(--hot); }

/* ── Nav sign-out button ───────────────────────────────── */
.nav-signout {
  background: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: var(--muted);
  font-family: 'Syne', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-signout:hover { color: var(--text); border-color: rgba(255,255,255,0.28); }

/* ── Auth lang globe (fixed bottom-right) ─────────────── */
.auth-lang-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1002;
}

.auth-lang-widget .lang-dropdown {
  top: auto;
  bottom: calc(100% + 6px);
}

/* ── Auth screens ──────────────────────────────────────── */
.auth-screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #0a0b10;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* animated chat background */
.auth-chatflow {
  position: absolute;
  inset: -40px;
  display: flex;
  gap: 48px;
  justify-content: center;
  opacity: 0.30;
  filter: blur(0.3px);
  pointer-events: none;
  transform: rotate(-4deg) scale(1.15);
}
.auth-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 230px;
  will-change: transform;
}
.auth-msg { font-size: 14px; line-height: 1.3; white-space: nowrap; font-family: 'Syne', sans-serif; }
.auth-msg b { font-weight: 700; }
.auth-msg span { color: #838796; }
@keyframes auth-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* vignette + grain */
.auth-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 65% at 50% 50%,
    rgba(10,11,16,.97) 0%, rgba(10,11,16,.88) 32%, rgba(10,11,16,.45) 62%, rgba(10,11,16,.15) 100%);
}
.auth-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(rgba(255,255,255,.6) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

/* center stack */
.auth-center {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
}

/* logo mark + glow */
.auth-markwrap { position: relative; margin-bottom: 22px; }
.auth-glow {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,255,0,.22) 0%, transparent 70%);
  animation: auth-pulse 4s ease-in-out infinite;
}
@keyframes auth-pulse {
  0%,100% { opacity: .6; transform: scale(1); }
  50%      { opacity:  1; transform: scale(1.08); }
}
.auth-mark { display: block; width: 72px; height: 72px; position: relative; }

/* wordmark */
.auth-wordmark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 60px;
  line-height: .9;
  letter-spacing: .14em;
  padding-left: .14em;
}
.auth-wm-vod   { color: #eef0f4; }
.auth-wm-scope { color: #c8ff00; }

/* tagline (login only) */
.auth-tagline { margin-top: 14px; font-size: 15px; color: #838796; font-weight: 500; letter-spacing: .01em; }
.auth-tagline b { color: #00ffd5; font-weight: 600; }

/* card */
.auth-card {
  margin-top: 40px;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, rgba(27,31,43,.78), rgba(20,23,31,.78));
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  padding: 30px 28px 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.auth-card--pending { margin-top: 34px; }

/* google button */
.auth-gbtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 11px;
  padding: 13px 18px;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.auth-gbtn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255,255,255,.14); }
.auth-gbtn svg  { width: 19px; height: 19px; flex-shrink: 0; }

.auth-restrict { margin-top: 14px; font-size: 12.5px; color: #838796; letter-spacing: .02em; }
.auth-restrict b { color: #aeb2c0; font-weight: 600; }

/* pending state */
.auth-pending-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #eef0f4;
  margin: 2px 0 22px;
  white-space: nowrap;
}
.auth-backbtn {
  width: 100%;
  background: transparent;
  color: #838796;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 11px;
  padding: 12px 18px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.auth-backbtn:hover { color: #eef0f4; border-color: rgba(255,255,255,.28); }

@media (max-width: 480px) {
  .auth-wordmark { font-size: 44px; }
  .auth-mark     { width: 56px; height: 56px; }
}

/* ── Nav right group (globe + logout) ─────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Language selector ────────────────────────────────── */
.lang-selector {
  position: relative;
}

.lang-globe {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color .15s;
  line-height: 0;
}

.lang-globe:hover,
.lang-globe[aria-expanded="true"] {
  color: var(--text);
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  padding: 4px;
  min-width: 136px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.lang-dropdown[hidden] { display: none; }

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: color .15s, background .15s;
}

.lang-option:hover {
  background: var(--subtle);
  color: var(--text);
}

.lang-option--active {
  color: var(--lime);
}

.lang-option--active::after {
  content: '✓';
  font-size: 10px;
  color: var(--lime);
  margin-left: 6px;
}
