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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --bg: #fafafa;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
}

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Header === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
}

.header nav {
  display: flex;
  gap: 32px;
}

.header nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.header nav a:hover {
  color: var(--primary);
}

/* === Hero === */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

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

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

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* === Upload Area === */
.upload-area {
  max-width: 640px;
  margin: 0 auto;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--surface);
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary);
  background: #f0f0ff;
}

.upload-area.drag-over {
  transform: scale(1.01);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.upload-icon {
  width: 48px;
  height: 48px;
  color: var(--primary);
}

.upload-text {
  font-size: 1rem;
  color: var(--text);
}

.upload-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Settings Panel === */
.settings-panel {
  max-width: 640px;
  margin: 24px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.settings-panel h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.setting-group select,
.setting-group input[type="number"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}

.setting-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

/* === File List === */
.file-list-container {
  max-width: 640px;
  margin: 24px auto 0;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.file-list-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.file-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

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

.file-item-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}

.file-item-size {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  font-size: 1.1rem;
  line-height: 1;
  transition: color 0.2s;
}

.file-item-remove:hover {
  color: var(--danger);
}

/* === Tier Info === */
.tier-info {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #92400e;
}

.tier-info.free {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.btn-white {
  background: white;
  color: var(--primary);
}

.btn-white:hover {
  background: #f0f0ff;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* === Progress === */
.progress-container {
  max-width: 640px;
  margin: 32px auto 0;
  text-align: center;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* === Results === */
.results-container {
  max-width: 640px;
  margin: 32px auto 0;
}

.results-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.result-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.result-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.result-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.results-files {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 0;
}

.result-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.result-file:last-child {
  border-bottom: none;
}

.result-file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-file-saved {
  color: var(--success);
  font-weight: 600;
  white-space: nowrap;
  margin-left: 12px;
}

.result-file-error {
  color: var(--danger);
  font-size: 0.82rem;
}

/* === Trust Bar === */
.trust-bar {
  padding: 32px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* === Sections === */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--surface);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

/* === Steps === */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  padding: 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: 50%;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* === Benefits === */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.benefit-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === Pricing === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pricing-popular {
  border-color: var(--primary);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 12px;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 24px;
}

.pricing-price small {
  font-size: 1.2rem;
  font-weight: 600;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: "✓ ";
  color: var(--success);
  font-weight: 700;
}

/* === FAQ === */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--bg);
  overflow: hidden;
}

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* === CTA === */
.cta-section {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: white;
  text-align: center;
  padding: 64px 0;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* === Footer === */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header nav {
    gap: 16px;
  }

  .hero {
    padding: 48px 0 32px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .results-summary {
    grid-template-columns: 1fr;
  }

  .trust-items {
    gap: 20px;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header nav {
    display: none;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .upload-area {
    padding: 32px 16px;
  }
}
