:root {
  --bg: #0A0A0F;
  --surface: #111118;
  --surface2: #16161F;
  --border: #1E1E2E;
  --border2: #252535;
  --purple: #7C3AED;
  --purple-light: #A78BFA;
  --purple-glow: rgba(124,58,237,0.15);
  --cyan: #06B6D4;
  --white: #F1F0FF;
  --text: #C4C2D4;
  --muted: #5A5875;
  --red: #EF4444;
  --red-bg: rgba(239,68,68,0.08);
  --amber: #F59E0B;
  --amber-bg: rgba(245,158,11,0.08);
  --green: #10B981;
  --green-bg: rgba(16,185,129,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--white); min-height: 100vh; overflow-x: hidden; }

/* NAV */
nav { padding: 18px 40px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; row-gap: 10px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--white); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 32px; height: 32px; background: var(--purple); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-badge { background: var(--purple-glow); border: 1px solid rgba(124,58,237,0.3); border-radius: 100px; padding: 5px 14px; font-size: 12px; color: var(--purple-light); font-weight: 600; }
.upgrade-btn { padding: 8px 20px; background: var(--purple); border: none; border-radius: 8px; color: white; font-size: 13px; font-weight: 700; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; text-decoration: none; display: inline-block; }

/* HERO */
.hero { text-align: center; padding: 72px 24px 56px; }
.hero-tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 100px; padding: 6px 16px; font-size: 12px; color: var(--purple-light); font-weight: 600; margin-bottom: 24px; }
.ai-dot { width: 6px; height: 6px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.hero h1 { font-size: clamp(30px, 5vw, 58px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; max-width: 720px; margin: 0 auto 18px; }
.hero h1 span { background: linear-gradient(135deg, var(--purple-light), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: 17px; color: var(--text); line-height: 1.65; max-width: 520px; margin: 0 auto 16px; }
.hero-sub { font-size: 13px; color: var(--muted); }

/* UPLOAD ZONE */
.upload-zone { max-width: 860px; margin: 0 auto; padding: 0 24px; }

.drop-zone { border: 2px dashed var(--border2); border-radius: 20px; padding: 48px 40px; text-align: center; transition: all 0.3s; cursor: pointer; background: var(--surface); position: relative; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--purple); background: var(--purple-glow); }
.drop-icon { font-size: 48px; margin-bottom: 16px; }
.drop-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.drop-sub { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.drop-types { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.type-chip { padding: 4px 12px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.or-divider { display: flex; align-items: center; gap: 16px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* PASTE AREA */
.paste-area { width: 100%; min-height: 160px; padding: 16px; background: var(--surface2); border: 1.5px solid var(--border2); border-radius: 14px; color: var(--white); font-size: 14px; font-family: 'Plus Jakarta Sans', sans-serif; resize: vertical; line-height: 1.6; transition: border-color 0.2s; }
.paste-area:focus { outline: none; border-color: var(--purple); }
.paste-area::placeholder { color: var(--muted); }

.scan-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--purple), #6D28D9); color: white; font-size: 16px; font-weight: 800; border: none; border-radius: 14px; cursor: pointer; margin-top: 14px; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.3px; transition: opacity 0.2s; position: relative; overflow: hidden; }
.scan-btn:hover { opacity: 0.9; }
.scan-btn::after { content: '→'; margin-left: 8px; }

/* LOADING */
.loading { display: none; text-align: center; padding: 40px; }
.loading.show { display: block; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border2); border-top-color: var(--purple); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text); font-size: 15px; }
.loading-steps { margin-top: 16px; }
.loading-step { font-size: 13px; color: var(--muted); padding: 4px 0; opacity: 0; transition: opacity 0.3s; }
.loading-step.show { opacity: 1; color: var(--purple-light); }

/* RESULTS */
.results { max-width: 860px; margin: 32px auto 0; padding: 0 24px 80px; display: none; }
.results.show { display: block; }

/* SCORE BAR */
.score-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px 32px; margin-bottom: 24px; display: flex; align-items: center; gap: 28px; }
.score-circle { width: 88px; height: 88px; border-radius: 50%; border: 4px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.score-circle .score-n { font-size: 30px; font-weight: 800; }
.score-circle .score-l { font-size: 10px; font-weight: 600; margin-top: 1px; opacity: 0.7; }
.score-meta h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.score-meta p { font-size: 14px; color: var(--text); line-height: 1.5; }
.score-counts { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.count-chip { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 6px; }
.chip-red { background: var(--red-bg); color: var(--red); }
.chip-amber { background: var(--amber-bg); color: var(--amber); }
.chip-green { background: var(--green-bg); color: var(--green); }

/* FLAGS */
.flags-section h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.flag-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 14px; overflow: hidden; }
.flag-header { padding: 16px 20px; display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.flag-sev { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.sev-high { background: var(--red-bg); }
.sev-med { background: var(--amber-bg); }
.sev-low { background: var(--green-bg); }
.flag-info { flex: 1; }
.flag-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.flag-excerpt { font-size: 13px; color: var(--text); line-height: 1.5; font-style: italic; border-left: 3px solid var(--border2); padding-left: 12px; margin-top: 8px; }
.flag-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 4px; flex-shrink: 0; }
.badge-high { background: var(--red-bg); color: var(--red); }
.badge-med { background: var(--amber-bg); color: var(--amber); }
.badge-low { background: var(--green-bg); color: var(--green); }
.flag-body { padding: 0 20px 20px 62px; display: none; }
.flag-body.open { display: block; }
.flag-explanation { font-size: 14px; color: var(--text); line-height: 1.65; margin-bottom: 14px; }
.flag-suggestion { background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; padding: 14px; }
.flag-suggestion-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--purple-light); margin-bottom: 8px; }
.flag-suggestion-text { font-size: 13px; color: var(--text); line-height: 1.6; }

/* SUMMARY */
.summary-card { background: var(--surface2); border: 1px solid var(--border2); border-radius: 16px; padding: 24px; margin-top: 28px; }
.summary-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; color: var(--purple-light); }
.summary-points { display: flex; flex-direction: column; gap: 10px; }
.summary-pt { display: flex; gap: 10px; font-size: 14px; color: var(--text); }
.summary-pt::before { content: '→'; color: var(--purple-light); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

/* UPGRADE */
.upgrade-card { background: linear-gradient(135deg, #3B0764, #1E1B4B); border: 1px solid rgba(124,58,237,0.3); border-radius: 20px; padding: 32px; margin-top: 24px; text-align: center; }
.upgrade-card h3 { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.upgrade-card p { font-size: 15px; color: var(--text); margin-bottom: 20px; line-height: 1.6; }
.upgrade-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; text-align: left; }
.uf { display: flex; gap: 8px; font-size: 13px; color: var(--text); }
.uf::before { content: '✓'; color: var(--green); font-weight: 700; flex-shrink: 0; }
.upgrade-cta { padding: 14px 40px; background: var(--purple); color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 800; cursor: pointer; font-family: 'Plus Jakarta Sans', sans-serif; }
.upgrade-cta:disabled { opacity: 0.5; cursor: not-allowed; }

/* AD */
.ad-slot { max-width: 860px; margin: 0 auto 24px; padding: 0 24px; }
.ad-inner { background: var(--surface); border: 1px dashed var(--border2); border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }

footer { border-top: 1px solid var(--border); padding: 32px 40px; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.8; }
footer a { color: var(--purple-light); text-decoration: none; }

/* FAQ (shared across scanner + content pages) */
.faq-section { max-width: 860px; margin: 0 auto 64px; padding: 0 24px; }
.faq-section h2 { font-size: 22px; font-weight: 800; margin-bottom: 28px; letter-spacing: -0.5px; }
.faq-item { border-top: 1px solid var(--border); padding: 20px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.faq-item p { font-size: 14px; color: var(--text); line-height: 1.7; }
.faq-item a { color: var(--purple-light); }

/* CONTENT PAGES (privacy / terms) */
.content { max-width: 760px; margin: 48px auto; padding: 0 24px 80px; }
.content h1 { font-size: 34px; font-weight: 800; margin-bottom: 8px; letter-spacing: -1px; }
.content .updated { color: var(--muted); font-size: 13px; margin-bottom: 32px; }
.content h2 { font-size: 19px; font-weight: 700; margin: 32px 0 12px; }
.content p { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 14px; }
.content ul { padding-left: 22px; margin-bottom: 16px; }
.content li { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 8px; }
.content a { color: var(--purple-light); }

/* PRICING PAGE */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; margin: 40px auto; padding: 0 24px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px; }
.price-card.featured { border-color: var(--purple); background: linear-gradient(135deg, #3B0764, #1E1B4B); }
.price-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.price-card .price-note { font-size: 13px; color: var(--muted); }
.price-amount { font-size: 36px; font-weight: 800; margin: 16px 0; }
.price-amount span { font-size: 14px; font-weight: 500; color: var(--muted); }
.price-features { display: flex; flex-direction: column; gap: 10px; margin: 20px 0 24px; }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }

/* MOBILE */
@media (max-width: 640px) {
  nav { padding: 14px 20px; }
  .nav-badge { display: none; }
  .upgrade-btn { padding: 8px 14px; font-size: 12px; }
  .logo { font-size: 17px; gap: 8px; }
  .logo-icon { width: 28px; height: 28px; font-size: 14px; border-radius: 7px; }

  .hero { padding: 40px 20px 32px; }

  .drop-zone { padding: 32px 20px; }
  .drop-icon { font-size: 36px; margin-bottom: 12px; }
  .drop-title { font-size: 18px; }

  .paste-area { font-size: 16px; } /* prevents iOS auto-zoom on focus */

  .score-bar { padding: 20px; gap: 20px; }

  .flag-header { padding: 14px 16px; gap: 10px; }
  .flag-body { padding: 0 16px 16px 16px; }

  .upgrade-card { padding: 24px 20px; }
  .upgrade-features { grid-template-columns: 1fr; }

  .content { margin: 32px auto; }
  .content h1 { font-size: 26px; }
}
