/* ====== CSS VARIABLES ====== */
:root {
  --bg-primary: #06060e;
  --bg-secondary: #0c0c1a;
  --bg-card: #131326;
  --bg-card-hover: #1a1a38;
  --border: rgba(255,255,255,0.06);
  --border-glow: rgba(79,140,255,0.12);
  --text-primary: #e8e8f5;
  --text-secondary: #8888a8;
  --text-muted: #5a5a78;
  --accent: #4f8cff;
  --accent-glow: rgba(79,140,255,0.2);
  --accent2: #00d4aa;
  --accent3: #7c5cfc;
  --danger: #ff6b8a;
  --warning: #f0a050;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====== RESET ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ====== GRADIENT TEXT ====== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition);
  border-radius: 999px; text-decoration: none;
}
.btn-sm { padding: 8px 20px; font-size: 14px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; padding: 12px 24px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #3360cc);
  color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border); backdrop-filter: blur(10px);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }

/* ====== NAV ====== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 32px;
  background: rgba(6,6,14,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-secondary); font-size: 15px; transition: color var(--transition); }
.nav-links a:hover { color: var(--text-primary); }

/* ====== HERO ====== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 32px 80px; overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(79,140,255,0.08) 0%, transparent 60%),
              radial-gradient(ellipse 50% 50% at 80% 80%, rgba(0,212,170,0.05) 0%, transparent 60%);
}
.hero-glow {
  position: absolute; width: 600px; height: 600px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(79,140,255,0.06) 0%, transparent 70%);
  pointer-events: none; animation: float 8s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.1); } }
.hero-content { position: relative; z-index: 2; max-width: 700px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-secondary); margin-bottom: 32px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-title {
  font-family: var(--font-display); font-size: clamp(40px, 8vw, 72px);
  font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.02em;
}
.hero-desc {
  font-size: 18px; color: var(--text-secondary);
  max-width: 520px; margin: 0 auto 40px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 64px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; justify-content: center; }
.stat { text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.stat-label { display: block; font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* before/after visual */
.hero-visual { margin-top: 64px; position: relative; z-index: 2; }
.before-after { display: flex; align-items: center; gap: 24px; justify-content: center; }
.ba-side { text-align: center; }
.ba-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; color: var(--text-muted); }
.ba-frame {
  width: 360px; height: 210px; border-radius: var(--radius-lg); position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.ba-before { background: linear-gradient(135deg, #1a1a3e, #0f0f2a); }
.ba-after { background: linear-gradient(135deg, #0a1a20, #0f0f2a); border-color: rgba(0,212,170,0.2); }
.ba-subtitle {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,0.9); color: #111; padding: 6px 16px;
  border-radius: 6px; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.ba-watermark {
  position: absolute; top: 20px; right: 20px;
  color: rgba(255,255,255,0.2); font-size: 18px; font-weight: 700;
  transform: rotate(15deg); border: 2px dashed rgba(255,255,255,0.1);
  padding: 4px 12px; border-radius: 4px;
}
.ba-clean {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--accent2); font-size: 18px; font-weight: 600;
}
.ba-arrow { display: flex; align-items: center; }

/* ====== SECTIONS ====== */
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.section-header p { color: var(--text-secondary); font-size: 17px; }
section { padding: 100px 32px; }
.features, .how, .pricing { max-width: 1200px; margin: 0 auto; }

/* ====== FEATURES ====== */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: all var(--transition); cursor: default;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.feature-icon { margin-bottom: 20px; }
.feature-card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 10px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ====== HOW IT WORKS ====== */
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; }
.step { display: flex; flex-direction: column; align-items: center; position: relative; flex: 1; max-width: 300px; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #3360cc);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  margin-bottom: 20px; box-shadow: 0 4px 20px var(--accent-glow);
  position: relative; z-index: 2;
}
.step-connector {
  width: 80px; height: 2px;
  background: linear-gradient(to right, var(--accent), var(--border));
  margin-top: 24px; flex-shrink: 0;
}
.step-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; text-align: center;
  transition: all var(--transition); width: 100%;
}
.step-card:hover { border-color: var(--border-glow); }
.step-icon { margin-bottom: 16px; }
.step-card h3 { font-family: var(--font-display); font-size: 17px; margin-bottom: 8px; }
.step-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

/* ====== PRICING ====== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 36px 28px;
  transition: all var(--transition); position: relative; display: flex; flex-direction: column;
}
.price-card:hover { border-color: var(--border-glow); transform: translateY(-4px); }
.price-card.popular { border-color: var(--accent); background: linear-gradient(180deg, rgba(79,140,255,0.05) 0%, var(--bg-card) 30%); }
.popular-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #3360cc);
  color: #fff; padding: 6px 20px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.price-header { text-align: center; margin-bottom: 28px; }
.price-header h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 8px; }
.price { font-family: var(--font-display); font-size: 40px; font-weight: 800; margin-bottom: 4px; }
.price span { font-size: 16px; font-weight: 400; color: var(--text-muted); }
.price-header p { color: var(--text-secondary); font-size: 14px; }
.price-features {
  list-style: none; margin-bottom: 28px; flex: 1;
}
.price-features li {
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 14px; color: var(--text-secondary);
}
.price-features li:last-child { border-bottom: none; }

/* ====== FOOTER ====== */
.footer { border-top: 1px solid var(--border); padding: 60px 32px 32px; background: var(--bg-secondary); }
.footer-content {
  max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between;
  gap: 64px; margin-bottom: 40px;
}
.footer-brand p { color: var(--text-muted); font-size: 14px; max-width: 320px; margin-top: 16px; line-height: 1.7; }
.footer-brand a { color: var(--accent); }
.footer-links { display: flex; gap: 64px; }
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; color: var(--text-muted); }
.footer-col a { display: block; color: var(--text-secondary); font-size: 14px; padding: 6px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; text-align: center;
  padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; display: flex; justify-content: space-between;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 960px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .steps { flex-direction: column; align-items: center; gap: 40px; }
  .step-connector { width: 2px; height: 40px; margin: 0; }
  .hero-stats { gap: 32px; }
  .ba-frame { width: 280px; height: 160px; }
  .footer-content { flex-direction: column; gap: 40px; }
  .footer-links { gap: 40px; }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 16px; }
  .nav-links .btn-sm { display: none; }
  .hero { padding: 100px 20px 60px; }
  section { padding: 60px 20px; }
  .before-after { flex-direction: column; }
  .ba-arrow { transform: rotate(90deg); }
  .ba-frame { width: 100%; max-width: 360px; }
  .hero-stats { gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ====== APP PAGE STYLES ====== */
.app-body { min-height: 100vh; padding-top: 80px; }
.app-container { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.app-header { text-align: center; margin-bottom: 48px; }
.app-header h1 { font-family: var(--font-display); font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.app-header p { color: var(--text-secondary); }

/* upload area */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-xl);
  padding: 60px 40px; text-align: center; transition: all var(--transition);
  cursor: pointer; position: relative; background: rgba(255,255,255,0.01);
  margin-bottom: 32px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent); background: rgba(79,140,255,0.03);
}
.upload-zone svg { margin-bottom: 16px; opacity: 0.6; }
.upload-zone h3 { font-family: var(--font-display); font-size: 20px; margin-bottom: 8px; }
.upload-zone p { color: var(--text-secondary); font-size: 14px; }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* task list */
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  display: flex; align-items: center; gap: 20px; transition: all var(--transition);
}
.task-item:hover { border-color: var(--border-glow); }
.task-status {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.task-status.pending { background: var(--warning); animation: pulse 1.5s infinite; }
.task-status.processing { background: var(--accent); animation: pulse 0.8s infinite; }
.task-status.completed { background: var(--accent2); }
.task-status.failed { background: var(--danger); }
.task-info { flex: 1; min-width: 0; }
.task-filename { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.task-action .btn { white-space: nowrap; }

/* config panel */
.config-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 24px;
}
.config-panel h3 { font-family: var(--font-display); font-size: 16px; margin-bottom: 16px; }
.config-row { display: flex; gap: 16px; flex-wrap: wrap; }
.config-field { flex: 1; min-width: 150px; }
.config-field label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
.config-field select, .config-field input {
  width: 100%; padding: 10px 14px;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary); font-family: var(--font-body);
  font-size: 14px; outline: none; transition: border-color var(--transition);
}
.config-field select:focus, .config-field input:focus { border-color: var(--accent); }

/* auth form */
.auth-form {
  max-width: 400px; margin: 60px auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px;
}
.auth-form h2 { font-family: var(--font-display); text-align: center; margin-bottom: 24px; font-size: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary); font-size: 15px;
  font-family: var(--font-body); outline: none; transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--accent); }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-secondary); margin-top: 16px; }
.auth-switch a { color: var(--accent); cursor: pointer; }

/* toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 14px 28px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: slideUp 0.4s ease;
  z-index: 1000;
}
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } }
.toast.success { border-color: var(--accent2); }
.toast.error { border-color: var(--danger); }

/* empty state */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state svg { opacity: 0.3; margin-bottom: 16px; }
.empty-state h3 { color: var(--text-muted); font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 14px; }

/* progress bar */
.progress-bar {
  width: 100%; height: 4px; background: var(--bg-primary);
  border-radius: 2px; overflow: hidden; margin-top: 8px;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px; animation: progressAnim 2s ease-in-out infinite;
}
@keyframes progressAnim {
  0% { width: 0%; } 50% { width: 70%; } 100% { width: 100%; }
}

/* video preview */
.video-preview {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  background: #000; margin-bottom: 24px;
}
.video-preview video { width: 100%; display: block; max-height: 500px; }
