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

:root {
  --bg: #0b0b10;
  --surface: #14141e;
  --border: #252535;
  --accent: #e8433a;
  --accent-hover: #d13830;
  --text: #e8e8f0;
  --muted: #7878a0;
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --blue: #60a5fa;
  --radius: 14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ─────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  background: rgba(11,11,16,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.nav-logo span { color: var(--accent); }

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  padding: 100px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(232,67,58,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(232,67,58,0.12);
  border: 1px solid rgba(232,67,58,0.3);
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #e8433a, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-sub strong { color: var(--text); }

.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 48px; }
.hero-note { font-size: 0.8rem; color: var(--muted); }

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 32px;
}

.hstat { display: flex; flex-direction: column; align-items: center; padding: 0 28px; }
.hstat strong {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #e8433a, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hstat span { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.hstat-div { width: 1px; height: 36px; background: var(--border); }

/* ── SECTIONS ────────────────────────────────────────────────── */
.section-inner { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.section-inner--narrow { max-width: 720px; }

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

/* ── FEATURES ────────────────────────────────────────────────── */
.features { padding: 80px 20px; border-top: 1px solid var(--border); }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: rgba(232,67,58,0.35); transform: translateY(-2px); }
.feat-icon { font-size: 1.8rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* ── HOW IT WORKS ────────────────────────────────────────────── */
.how-it-works { padding: 80px 20px; border-top: 1px solid var(--border); background: var(--surface); }

.steps { display: flex; align-items: flex-start; justify-content: center; }
.step { flex: 1; min-width: 180px; max-width: 260px; text-align: center; padding: 0 20px; }

.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #e8433a, #fb923c);
  color: #fff; font-size: 1.1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 0.88rem; color: var(--muted); }
.step-arrow { font-size: 1.5rem; color: var(--border); padding-top: 14px; }

/* ── TOOL SECTION ────────────────────────────────────────────── */
.tool-section { padding: 80px 20px; border-top: 1px solid var(--border); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }

.card-label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 20px; display: block; }

/* ── QUALITY CARDS ───────────────────────────────────────────── */
.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

@media (max-width: 600px) { .quality-grid { grid-template-columns: 1fr; } }

.quality-card { cursor: pointer; }
.quality-card input { display: none; }

.qcard-inner {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
}

.quality-card input:checked + .qcard-inner {
  border-color: var(--accent);
  background: rgba(232,67,58,0.06);
}

.qcard-inner.recommended { border-color: rgba(232,67,58,0.4); }

.rec-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.qcard-icon { font-size: 2rem; margin-bottom: 10px; }
.qcard-name { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.qcard-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

.qcard-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.badge-green { background: rgba(74,222,128,0.12); color: var(--success); }
.badge-blue  { background: rgba(96,165,250,0.12); color: var(--blue); }
.badge-yellow { background: rgba(251,191,36,0.12); color: var(--warning); }
.badge-red   { background: rgba(248,113,113,0.12); color: var(--danger); }

/* ── DROPZONE ────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 52px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: rgba(232,67,58,0.05); }
.drop-icon { color: var(--accent); margin-bottom: 16px; }
.browse-link { color: var(--accent); cursor: pointer; text-decoration: underline; }
.drop-hint { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 9px;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: 10px; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ── RESULTS ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

.results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-header h3 { font-size: 1.05rem; font-weight: 700; }
#file-count { color: var(--muted); font-weight: 400; font-size: 0.9rem; }

.stats-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 24px;
  margin-bottom: 16px; display: flex; gap: 32px; flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.2rem; font-weight: 700; }
.stat-value.green { color: var(--success); }

.results-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }

.result-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
}
.result-row.error { border-color: rgba(248,113,113,0.4); }
.result-name { flex: 1; font-size: 0.88rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-sizes { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.result-badge { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }

.actions { display: flex; justify-content: center; margin-top: 8px; }

.processing-box {
  text-align: center; padding: 60px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#processing-text { color: var(--muted); }

/* ── QUALITY GUIDE TABLE ─────────────────────────────────────── */
.guide-section { padding: 80px 20px; border-top: 1px solid var(--border); background: var(--surface); }

.guide-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.guide-row {
  display: grid;
  grid-template-columns: 120px 80px 1fr 140px;
  gap: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  align-items: center;
}
.guide-row:last-child { border-bottom: none; }

.guide-header {
  background: rgba(255,255,255,0.03);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.guide-row .green { color: var(--success); font-weight: 700; }
.guide-row .yellow { color: var(--warning); font-weight: 700; }

@media (max-width: 600px) {
  .guide-table { display: none; }
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq-section { padding: 80px 20px; border-top: 1px solid var(--border); }
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

.faq-item summary {
  padding: 18px 20px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--accent); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 18px; font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }

.footer-inner {
  max-width: 1000px; margin: 0 auto;
  padding: 60px 20px 40px;
  display: flex; gap: 60px; flex-wrap: wrap;
}
.footer-brand { flex: 2; min-width: 220px; }
.footer-brand p { color: var(--muted); font-size: 0.88rem; margin-top: 10px; line-height: 1.7; }
.footer-home-link { display: inline-block; margin-top: 12px; font-size: 0.85rem; color: var(--muted); transition: color 0.15s; }
.footer-home-link:hover { color: var(--text); }
.footer-links { flex: 1; min-width: 120px; }
.footer-links h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 14px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.88rem; color: var(--muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }

.footer-bottom { border-top: 1px solid var(--border); text-align: center; padding: 20px; font-size: 0.8rem; color: var(--muted); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .navbar { padding: 0 20px; }
  .hero { padding: 70px 16px 60px; }
  .hero-stats { padding: 16px; }
  .hstat { padding: 0 12px; }
  .hstat-div { display: none; }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); padding: 0; }
  .footer-inner { gap: 32px; }
}
