@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

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

:root {
  --bg: #08080c;
  --bg-2: #0e0e14;
  --surface: #14141e;
  --surface-2: #1c1c2a;
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.12);
  --text: #f1f5f9;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --gradient: linear-gradient(135deg, #6366f1, #a855f7);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  --font: 'Inter', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== LANDING NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(8,8,12,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; flex: 1; }
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 12px; }
.nav-mobile-toggle { display: none; }

.btn-ghost {
  padding: 8px 16px;
  background: transparent;
  color: var(--text-2);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  font-family: var(--font);
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text); }

.btn-primary-sm {
  padding: 8px 20px;
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  font-family: var(--font);
  transition: opacity 0.2s;
}
.btn-primary-sm:hover { opacity: 0.9; }

.btn-primary {
  padding: 14px 32px;
  background: var(--gradient);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius);
  font-family: var(--font);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.4); }

.btn-outline {
  padding: 14px 32px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-2);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font);
  transition: border-color 0.2s;
}
.btn-outline:hover { border-color: var(--accent); }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}
.hero-orb-1 { width: 600px; height: 600px; background: #6366f1; top: -200px; right: -100px; }
.hero-orb-2 { width: 400px; height: 400px; background: #a855f7; bottom: -100px; left: -100px; animation-delay: -7s; }
.hero-orb-3 { width: 300px; height: 300px; background: #3b82f6; top: 50%; left: 50%; animation-delay: -14s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--text-3); }

.hero-showcase {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 60px;
}
.showcase-card {
  width: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-2);
  background: var(--surface);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  transition: transform 0.3s;
}
.showcase-card:hover { transform: translateY(-4px); }
.showcase-label {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-2);
  display: flex;
  align-items: center;
}
.showcase-img { height: 300px; overflow: hidden; }
.showcase-img img { width: 100%; height: 100%; object-fit: cover; }
.showcase-formats {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(99,102,241,0.15);
  padding: 3px 10px;
  border-radius: 100px;
  margin-left: 10px;
  letter-spacing: 0.5px;
}

/* SKILLS */
.skills-section { padding-top: 60px; padding-bottom: 80px; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color 0.3s;
}
.skill-card:hover { border-color: var(--accent); }
.skill-icon { color: var(--accent); margin-bottom: 14px; }
.skill-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.skill-card p { font-size: 13px; color: var(--text-2); line-height: 1.65; }
.showcase-arrow { flex-shrink: 0; }

/* ========== SECTIONS ========== */
.section { padding: 100px 24px; }
.section-dark { background: var(--bg-2); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-narrow { max-width: 740px; }
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--text-2);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 48px;
}

/* STEPS */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.3s;
}
.step-card:hover { border-color: var(--accent); }
.step-number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.step-icon { color: var(--accent); margin-bottom: 16px; }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* MATERIALS */
.materials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.mat-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.mat-preview { height: 160px; overflow: hidden; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.mat-preview img { width: 100%; height: 100%; object-fit: cover; }
.mat-card h4 { padding: 12px 16px 0; font-size: 15px; font-weight: 600; }
.mat-card p { padding: 4px 16px 16px; font-size: 13px; color: var(--text-2); }

/* SCENES */
.scenes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 600px; margin: 0 auto; }
.scene-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
}
.sc-icon { font-size: 22px; }
.scenes-custom { text-align: center; margin-top: 16px; color: var(--accent); font-size: 14px; }

/* FEATURE SPLIT */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature-text h2 { font-size: 32px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.feature-text p { color: var(--text-2); margin-bottom: 20px; line-height: 1.7; }
.feature-list { list-style: none; }
.feature-list li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-2);
  font-size: 14px;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  background: var(--gradient);
  border-radius: 50%;
}
.feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.dim-badge {
  padding: 20px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 24px;
  font-weight: 700;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 1px;
  color: var(--accent);
}

/* PRICING */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: border-color 0.3s;
}
.price-card:hover { border-color: var(--border-2); }
.price-card-popular { border-color: var(--accent); }
.price-card-popular:hover { border-color: var(--accent-2); }
.price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: white;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.price-name { font-size: 14px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; }
.price-credits { font-size: 20px; font-weight: 700; margin: 8px 0 4px; }
.price-amount { font-size: 36px; font-weight: 900; letter-spacing: -1px; margin-bottom: 4px; }
.price-per { font-size: 14px; color: var(--text-3); margin-bottom: 20px; }
.price-features { list-style: none; text-align: left; margin-bottom: 24px; }
.price-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-2);
  padding-left: 20px;
  position: relative;
}
.price-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.btn-price {
  width: 100%;
  padding: 12px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s;
}
.btn-price:hover { background: var(--border); }
.btn-price-pop {
  background: var(--gradient);
  border: none;
  color: white;
}
.btn-price-pop:hover { opacity: 0.9; background: var(--gradient); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::after { content: '+'; font-size: 20px; color: var(--text-2); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { padding: 0 20px 16px; font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* CTA SECTION */
.cta-section { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cta-section h2 { font-size: 32px; font-weight: 800; }

/* FOOTER */
.footer { padding: 40px 24px; border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand p { font-size: 13px; color: var(--text-3); margin-top: 8px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-3); }

/* ========== MODALS ========== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.modal h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 24px;
  cursor: pointer;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-3); }
.form-error { color: #f87171; font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.btn-full { width: 100%; }
.modal-switch { margin-top: 16px; font-size: 14px; color: var(--text-2); text-align: center; }
.modal-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.google-btn-wrap { display: flex; justify-content: center; margin-bottom: 8px; }
.btn-google {
  width: 100%; padding: 11px 16px; display: flex; align-items: center;
  justify-content: center; gap: 10px; background: #fff; color: #333;
  border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: background 0.2s;
}
.btn-google:hover { background: #f5f5f5; }
.btn-google img { width: 18px; height: 18px; }
.divider-or {
  display: flex; align-items: center; gap: 12px; margin: 12px 0;
  color: var(--text-3); font-size: 12px;
}
.divider-or::before, .divider-or::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ========== APP PAGE ========== */
body.app-page { background: var(--bg); }

.app-nav {
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-nav-left { display: flex; align-items: center; gap: 16px; }
.app-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.credit-badge {
  padding: 4px 12px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.btn-logout {
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}
.btn-buy-credits {
  padding: 6px 16px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}

.app-workspace {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

/* 3D VIEWER */
.viewer-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
#viewer-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #0a0a1e;
}
#three-canvas { width: 100%; height: 100%; display: none; }

.drop-zone {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}
.drop-zone.dragover { background: rgba(99,102,241,0.1); }
.drop-text { font-size: 18px; font-weight: 500; }
.drop-sub { font-size: 13px; opacity: 0.5; }

.upload-btn {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--gradient);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font);
}

.model-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
#info-name { font-weight: 600; color: var(--text); }
.btn-small {
  padding: 4px 12px;
  font-size: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
  color: var(--text-2);
  font-family: var(--font);
}

/* CONTROLS */
.controls-panel { display: flex; flex-direction: column; gap: 16px; }

.control-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.control-group h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-bottom: 12px;
}

.material-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.material-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  transition: border-color 0.15s;
}
.material-btn:hover { border-color: var(--border-2); }
.material-btn.selected { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.mat-name { font-size: 13px; font-weight: 600; }
.mat-finish { font-size: 10px; color: var(--text-3); }

.color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

.color-custom-row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.color-custom-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
#custom-color { width: 28px; height: 28px; border: none; border-radius: 50%; cursor: pointer; padding: 0; }

.scene-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.scene-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  transition: border-color 0.15s;
}
.scene-btn:hover { border-color: var(--border-2); }
.scene-btn.selected { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.scene-icon { font-size: 18px; }

.text-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  margin-top: 8px;
  outline: none;
}
.text-input:focus { border-color: var(--accent); }

/* GENERATE */
.generate-section { background: transparent !important; border: none !important; padding: 0 !important; }
.btn-generate {
  width: 100%;
  padding: 16px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}
.btn-generate:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.4); }
.btn-generate:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-credits-cost { background: rgba(255,255,255,0.2); padding: 4px 10px; border-radius: 6px; font-size: 12px; }

/* MINI LOADER (analyze) */
.object-input-row { display: flex; align-items: center; gap: 8px; }
.object-input-row .text-input { flex: 1; }
.mini-loader { flex-shrink: 0; }
.mini-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* PROGRESS BAR (generate) */
#generating-status { padding: 20px 0; }
.progress-bar-wrap {
  width: 100%; height: 8px; background: var(--surface-2);
  border-radius: 100px; overflow: hidden; margin-bottom: 12px;
}
.progress-bar {
  height: 100%; width: 0%; border-radius: 100px;
  background: var(--gradient);
  transition: width 0.5s ease;
}
#generating-status p { color: var(--text-2); font-size: 13px; text-align: center; }

/* RESULT */
.result-section {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}
.result-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.result-inner h2 { text-align: center; margin-bottom: 24px; font-size: 20px; }
.result-compare { display: flex; align-items: center; justify-content: center; gap: 24px; }
.result-card { flex: 1; max-width: 440px; text-align: center; }
.result-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-3); margin-bottom: 8px; }
.result-card img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.result-arrow { font-size: 28px; color: var(--accent); flex-shrink: 0; }
.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.btn-download {
  padding: 10px 28px;
  background: var(--gradient);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.btn-again {
  padding: 10px 28px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
}

.control-hint { font-size: 11px; color: var(--text-3); margin-top: 6px; }
.control-hint-warn { color: #f59e0b; }
.btn-orientation-full {
  width: 100%; padding: 10px 16px; display: flex; align-items: center;
  justify-content: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  transition: border-color 0.2s, background 0.2s;
}
.btn-orientation-full:hover { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.btn-orientation-full svg { color: var(--accent); }

/* SCENE COMPACT */
.scene-grid-compact { grid-template-columns: repeat(4, 1fr); }
.scene-grid-compact .scene-btn { padding: 6px 4px; font-size: 11px; flex-direction: column; gap: 2px; text-align: center; }
.scene-grid-compact .scene-icon { font-size: 16px; }

/* ASPECT RATIO */
.ratio-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.ratio-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; background: var(--bg); border: 2px solid transparent;
  border-radius: 8px; cursor: pointer; font-family: var(--font);
  color: var(--text-2); font-size: 11px; font-weight: 600;
  transition: border-color 0.15s;
}
.ratio-btn:hover { border-color: var(--border-2); }
.ratio-btn.selected { border-color: var(--accent); background: rgba(99,102,241,0.08); color: var(--accent); }
.ratio-icon {
  border: 2px solid currentColor; border-radius: 3px;
}

.fill-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text);
}
.fill-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer;
}
.textarea-scene { resize: vertical; min-height: 60px; line-height: 1.5; }
.scene-custom-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.tooltip-trigger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-2);
  color: var(--text-2); font-size: 12px; font-weight: 700;
  cursor: help; flex-shrink: 0; position: relative;
}
.tooltip-trigger:hover + .tooltip-content { display: block; }
.tooltip-content {
  display: none; position: absolute; top: 28px; left: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 12px 14px; font-size: 12px;
  color: var(--text-2); line-height: 1.6; width: 280px;
  box-shadow: var(--shadow-lg);
}

.hidden { display: none !important; }

/* ========== LANGUAGE SELECTOR ========== */
.lang-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.lang-trigger:hover {
  border-color: var(--accent);
  color: var(--text);
}

.lang-flag { font-size: 16px; line-height: 1; }
.lang-code { letter-spacing: 0.5px; }
.lang-chevron {
  opacity: 0.6;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 300;
  min-width: 100px;
}

.lang-dropdown.open {
  display: block;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.lang-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.lang-btn.active {
  color: var(--accent);
  background: rgba(99,102,241,0.08);
}

.lang-btn .lang-flag { font-size: 15px; }
.lang-btn .lang-name { font-weight: 600; }

/* App nav lang selector sits nicely after logo */
.app-nav-left .lang-selector { margin-left: 8px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .steps-grid, .materials-grid, .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .showcase-card { width: 100%; max-width: 340px; }
  .showcase-img { height: 220px; }
  .scenes-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-split { grid-template-columns: 1fr; gap: 32px; }
  .hero-showcase { flex-direction: column; }
  .showcase-arrow { transform: rotate(90deg); }
  .app-workspace { grid-template-columns: 1fr; }
  .result-compare { flex-direction: column; }
  .result-arrow { transform: rotate(90deg); }
  .nav-links, .nav-actions { display: none; }
  .nav-mobile-toggle { display: block; background: none; border: none; cursor: pointer; padding: 8px; }
  .nav-mobile-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; }
}
