/* ============================================================
   DescreveAI — Stylesheet
   Dark theme · Sora + IBM Plex Mono
   ============================================================ */

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

:root {
  --bg:       #0a0a0f;
  --bg2:      #13131a;
  --bg3:      #1c1c26;
  --bg4:      #22222f;
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.15);
  --accent:   #7c5cfc;
  --accent2:  #a78bfa;
  --accent3:  #4ade80;
  --text:     #f1f0ff;
  --muted:    #8b8a9b;
  --muted2:   #5a596b;
  --danger:   #f87171;
  --gold:     #fbbf24;
  --green:    #4ade80;
  --radius:   12px;
  --radius-lg:16px;
  --font:     'Sora', sans-serif;
  --mono:     'IBM Plex Mono', monospace;
  --shadow:   0 0 0 1px rgba(255,255,255,0.05);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Utilitários ─────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
em { font-style: normal; color: var(--accent2); }
strong { font-weight: 600; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ──────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
.header .container {
  display: flex; align-items: center; gap: 1.5rem;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-icon {
  width: 34px; height: 34px; background: var(--accent);
  border-radius: 9px; display: flex; align-items: center;
  justify-content: center; font-size: 16px;
}
.logo-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.logo-badge {
  font-size: 10px; background: rgba(124,92,252,0.18); color: var(--accent2);
  border: 1px solid rgba(124,92,252,0.3); border-radius: 20px;
  padding: 1px 7px; font-weight: 600;
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; background: transparent; color: var(--muted);
  font-family: var(--font); transition: all .2s;
}
.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-btn.active { background: rgba(124,92,252,0.18); color: var(--accent2); }
.cta-header {
  flex-shrink: 0; padding: 7px 16px; border-radius: 9px;
  background: var(--accent); color: #fff; border: none;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.cta-header:hover { background: #6849e8; transform: translateY(-1px); }

/* ── Main ────────────────────────────────────────────── */
.main { padding: 3rem 1.5rem 5rem; }

/* ── Pages ───────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

.page-hero { text-align: center; margin-bottom: 2.5rem; }
.page-hero h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -0.04em; margin-bottom: 0.5rem; }
.page-hero p { color: var(--muted); font-size: 1rem; max-width: 520px; margin: 0 auto; }

/* ── Layout 2 colunas ────────────────────────────────── */
.layout-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 768px) {
  .layout-two-col { grid-template-columns: 1fr; }
}

/* ── Formulário ──────────────────────────────────────── */
.form-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1rem;
}
.form-section-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px;
}
.badge-opt {
  font-size: 10px; background: rgba(74,222,128,0.1);
  color: var(--accent3); border-radius: 20px; padding: 2px 8px;
  font-weight: 500; text-transform: none; letter-spacing: 0;
}

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

.field label {
  font-size: 12px; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.req-star { color: var(--danger); }
.field-hint {
  font-size: 10px; color: var(--muted2); background: var(--bg3);
  border-radius: 4px; padding: 1px 6px;
}

.field input, .field select, .field textarea {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: 9px; padding: 9px 12px;
  font-size: 13px; font-family: var(--font); outline: none;
  transition: border-color .2s; width: 100%;
}
.field textarea { resize: vertical; min-height: 80px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted2); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field select option { background: var(--bg3); color: var(--text); }
.field input.error { border-color: var(--danger); }

/* ── Botão Gerar ─────────────────────────────────────── */
.btn-generate {
  width: 100%; padding: 13px 20px; border-radius: 11px; border: none;
  background: var(--accent); color: #fff; font-family: var(--font);
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all .2s;
}
.btn-generate:hover:not(:disabled) { background: #6849e8; transform: translateY(-1px); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-icon { font-size: 14px; }

.ad-notice {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 12px; color: var(--gold);
  background: rgba(251,191,36,0.07);
  border: 1px solid rgba(251,191,36,0.18);
  border-radius: 9px; padding: 8px 12px;
}
.ad-notice-icon { font-size: 14px; }

/* ── Resultados ──────────────────────────────────────── */
.results-side {
  position: sticky; top: 90px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  min-height: 300px;
}

.results-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 240px; gap: 12px; text-align: center;
}
.empty-icon { font-size: 2rem; opacity: 0.4; }
.results-empty p { font-size: 13px; color: var(--muted); max-width: 220px; }

/* Vídeo recompensado */
.ad-container { margin-bottom: 1rem; }
.ad-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--gold); margin-bottom: 8px; font-weight: 500;
}
.ad-placeholder {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.ad-live-box {
  background: linear-gradient(135deg, rgba(124,92,252,0.12), rgba(74,222,128,0.08));
  border-color: rgba(124,92,252,0.24);
}
.ad-mock { text-align: center; }
.ad-mock-live {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 1rem 1.1rem; text-align: left;
}
.ad-mock-logo {
  font-size: 2rem; width: 52px; height: 52px;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: rgba(124,92,252,0.18); flex-shrink: 0;
}
.ad-mock-text { font-size: 12px; color: var(--muted); }
.ad-mock-text strong {
  display: block; color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 4px;
}
.ad-mock-text small { font-size: 11px; color: var(--muted2); display: block; line-height: 1.6; }
.ad-status-note {
  font-size: 12px; color: var(--muted); text-align: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
}
@media (max-width: 480px) {
  .ad-mock-live { flex-direction: column; text-align: center; }
}

/* Header dos resultados */
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; gap: 8px;
}
.results-badge {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  background: rgba(124,92,252,0.15); color: var(--accent2);
  border-radius: 20px; border: 1px solid rgba(124,92,252,0.25);
}
.results-badge.green {
  background: rgba(74,222,128,0.12); color: var(--accent3);
  border-color: rgba(74,222,128,0.25);
}
.results-hint { font-size: 11px; color: var(--muted); text-align: right; }

/* Item de resultado */
.result-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; position: relative;
}
.result-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 5px;
  display: flex; align-items: center; gap: 8px;
}
.char-count {
  font-family: var(--mono); font-size: 11px;
  background: var(--bg4); padding: 1px 6px; border-radius: 4px; color: var(--muted);
}
.char-count.ok { color: var(--accent3); background: rgba(74,222,128,0.1); }
.char-count.warn { color: var(--gold); background: rgba(251,191,36,0.1); }

.result-value { font-size: 13px; line-height: 1.65; color: var(--text); }
.result-value.mono { font-family: var(--mono); font-size: 12px; color: var(--accent2); }

/* Truncamento / blur parcial */
.blurred-partial {
  position: relative; overflow: hidden;
  max-height: 3.5em; /* Mostra apenas ~2 linhas */
}
.blurred-partial::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 2.5em;
  background: linear-gradient(transparent, var(--bg3));
  pointer-events: none;
}

.copy-btn {
  margin-top: 8px; font-size: 11px; background: rgba(124,92,252,0.12);
  border: 1px solid rgba(124,92,252,0.25); color: var(--accent2);
  padding: 3px 10px; border-radius: 6px; cursor: pointer;
  font-family: var(--font); transition: all .2s;
}
.copy-btn:hover { background: rgba(124,92,252,0.25); }

/* Bloco bloqueado */
.locked-block {
  background: var(--bg3); border: 1px dashed var(--border2);
  border-radius: 12px; padding: 1.25rem; text-align: center; margin-top: 8px;
}
.lock-icon-big { font-size: 2rem; margin-bottom: 6px; }
.lock-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.lock-desc { font-size: 12px; color: var(--muted); margin-bottom: 1rem; }
.btn-unlock {
  padding: 10px 20px; border-radius: 9px; background: var(--accent);
  color: #fff; border: none; font-family: var(--font); font-size: 13px;
  font-weight: 600; cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-unlock:hover { background: #6849e8; transform: translateY(-1px); }
.btn-unlock:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Copiar tudo */
.btn-copy-all {
  font-size: 12px; background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.25); color: var(--accent3);
  padding: 4px 12px; border-radius: 6px; cursor: pointer;
  font-family: var(--font); transition: all .2s;
}
.btn-copy-all:hover { background: rgba(74,222,128,0.22); }

/* Upsell */
.upsell-block {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, rgba(124,92,252,0.12), rgba(74,222,128,0.07));
  border: 1px solid rgba(124,92,252,0.25); border-radius: 12px;
  padding: 1rem; margin-top: 10px;
}
.upsell-text { font-size: 12px; line-height: 1.6; color: var(--muted); }
.upsell-text strong { color: var(--text); }
.btn-upsell {
  flex-shrink: 0; padding: 8px 16px; border-radius: 8px; background: var(--accent);
  color: #fff; border: none; font-family: var(--font); font-size: 12px;
  font-weight: 600; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-upsell:hover { background: #6849e8; }

/* Loading dots */
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots span {
  width: 5px; height: 5px; background: currentColor;
  border-radius: 50%; display: inline-block;
  animation: dotblink 1.2s infinite;
}
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dotblink { 0%,80%,100%{opacity:.2} 40%{opacity:1} }

/* ── Planos ──────────────────────────────────────────── */
.plans-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 2rem;
}
@media (max-width: 768px) { .plans-grid { grid-template-columns: 1fr; } }

.plan-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; position: relative;
  transition: border-color .2s;
}
.plan-card.featured { border-color: var(--accent); }
.plan-popular {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px;
  font-weight: 600; padding: 3px 14px; border-radius: 20px; white-space: nowrap;
}
.plan-name {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px;
}
.plan-price {
  font-size: 2.25rem; font-weight: 700; letter-spacing: -0.04em;
  line-height: 1; margin-bottom: 4px;
}
.price-per { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan-desc { font-size: 12px; color: var(--muted); margin-bottom: 1.25rem; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 1.5rem; }
.feat {
  font-size: 13px; padding-left: 18px; position: relative; color: var(--text);
}
.feat::before { content: '✓'; position: absolute; left: 0; color: var(--accent3); font-weight: 600; }
.feat.off { color: var(--muted2); }
.feat.off::before { content: '×'; color: var(--muted2); }
.plan-cta {
  display: block; width: 100%; padding: 10px; border-radius: 9px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: center; border: 1px solid var(--border2);
  background: transparent; color: var(--text); transition: all .2s;
  text-decoration: none;
}
.plan-cta:hover { background: rgba(255,255,255,0.05); text-decoration: none; }
.plan-cta.featured { background: var(--accent); border-color: var(--accent); color: #fff; }
.plan-cta.featured:hover { background: #6849e8; }
.plan-margin {
  font-size: 11px; color: var(--muted2); text-align: center;
  margin-top: 10px; font-family: var(--mono);
}
.pricing-note {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; font-size: 13px; color: var(--muted); line-height: 1.8;
}

/* ── Sobre ───────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 2rem;
}
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }

.about-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem;
}
.about-num { font-family: var(--mono); font-size: 1.75rem; font-weight: 500; color: var(--accent2); margin-bottom: 6px; }
.about-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.about-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }

.tech-stack-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem;
}
.tech-stack-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1rem;
}
.tech-stack-list { display: flex; flex-direction: column; gap: 8px; }
.tech-item { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.tech-key {
  min-width: 100px; font-weight: 500; color: var(--muted);
  font-family: var(--mono); font-size: 12px;
}
.tech-val { color: var(--text); }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 1.5rem 0;
  font-size: 12px; color: var(--muted);
}
.footer .container { display: flex; gap: 10px; align-items: center; }
.footer a { color: var(--muted); transition: color .2s; }
.footer a:hover { color: var(--accent2); text-decoration: none; }

/* ── Toast de cópia ──────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--accent3); font-size: 13px; font-weight: 500;
  padding: 10px 18px; border-radius: 10px;
  transform: translateY(20px); opacity: 0;
  transition: all .3s; pointer-events: none; z-index: 9999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Responsivo extra ────────────────────────────────── */
@media (max-width: 640px) {
  .cta-header { display: none; }
  .main { padding: 2rem 1rem 4rem; }
}
