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

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --primary-bg: #F0EDFF;
  --bg: #FAFAFE;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(108,92,231,0.08);
  --shadow-lg: 0 12px 48px rgba(108,92,231,0.12);
  --transition: 0.2s ease;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ───────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 800; font-size: 1.25rem;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary);
  font-weight: 500; font-size: 0.9rem;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--primary); }

/* ── Hero ─────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 24px 40px;
  max-width: 700px; margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600; font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary), #E84393);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px; margin: 0 auto;
}

/* ── Converter Card ───────────────────────────── */
.converter-section {
  max-width: 640px; margin: 0 auto;
  padding: 0 24px 80px;
}
.converter-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  transition: box-shadow var(--transition);
}

/* ── Dropzone ─────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.dropzone-icon { margin-bottom: 16px; }
.dropzone-title { font-weight: 600; font-size: 1.1rem; margin-bottom: 4px; }
.dropzone-sub { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 16px; }
.dropzone-hint { color: var(--text-secondary); font-size: 0.75rem; margin-top: 16px; }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none; cursor: pointer;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 14px 32px; font-size: 1rem; width: 100%; justify-content: center; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  font-size: 1.2rem; color: var(--text-secondary);
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.btn-icon:hover { background: #FEE2E2; color: #EF4444; }

/* ── File Info ─────────────────────────────────── */
.file-info {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}
.file-icon { font-size: 2rem; }
.file-details { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.file-name {
  font-weight: 600; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.file-size { font-size: 0.8rem; color: var(--text-secondary); }

/* ── Format Grid ──────────────────────────────── */
.format-section { margin-bottom: 24px; }
.format-label { font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; display: block; }
.format-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.format-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: inherit;
  font-weight: 600; font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.format-btn:hover { border-color: var(--primary); color: var(--primary); }
.format-btn.selected {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Progress ─────────────────────────────────── */
.progress-container { text-align: center; padding: 20px 0; }
.progress-circle {
  position: relative; width: 120px; height: 120px; margin: 0 auto 24px;
}
.progress-circle svg { width: 100%; height: 100%; }
.progress-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.4rem; color: var(--primary);
}
.progress-label { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.progress-sub { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Done / Error ─────────────────────────────── */
.done-container { text-align: center; padding: 20px 0; }
.done-icon { margin-bottom: 20px; }
.done-container h2 { font-size: 1.5rem; margin-bottom: 8px; }
.done-sub { color: var(--text-secondary); margin-bottom: 24px; }
.error-msg { color: #EF4444; }

/* ── Features ─────────────────────────────────── */
.features {
  max-width: 1000px; margin: 0 auto;
  padding: 80px 24px;
}
.features h2 { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Formats Table ────────────────────────────── */
.formats-section {
  max-width: 700px; margin: 0 auto;
  padding: 0 24px 80px;
}
.formats-section h2 { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 32px; }
.formats-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.format-row {
  display: grid; grid-template-columns: 1fr 100px 80px;
  padding: 14px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.format-row:last-child { border-bottom: none; }
.format-row.header {
  background: var(--primary-bg);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
}

/* ── FAQ ──────────────────────────────────────── */
.faq-section {
  max-width: 700px; margin: 0 auto;
  padding: 0 24px 80px;
}
.faq-section h2 { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 32px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--primary); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 24px 18px; color: var(--text-secondary); font-size: 0.9rem; }

/* ── Footer ───────────────────────────────────── */
.footer {
  text-align: center; padding: 32px 24px;
  color: var(--text-secondary); font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ── Indeterminate progress ───────────────────── */
.progress-circle.indeterminate svg {
  animation: spin 1.5s linear infinite;
}
.progress-circle.indeterminate #progressRing {
  stroke-dashoffset: 220 !important;
}

/* ── Spinner ──────────────────────────────────── */
.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--primary-bg);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

/* ── Responsive ───────────────────────────────── */
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .converter-card { padding: 24px; }
  .nav-links { display: none; }
  .hero { padding: 48px 24px 24px; }
}
