/* ===========================================
   VIRALCUTPRO V6 - SUPABASE INTEGRATION
   =========================================== */

:root {
  --bg: #09090b;
  --bg-card: #18181b;
  --bg-elevated: #27272a;
  --bg-hover: #3f3f46;

  --white: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;

  --red: #ff6b6b;
  --orange: #ffa94d;
  --yellow: #ffd43b;
  --green: #51cf66;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --purple: #c084fc;
  --pink: #f472b6;

  --accent: #ff6b6b;
  --accent-2: #ffa94d;
  --gradient: linear-gradient(135deg, var(--red) 0%, var(--orange) 100%);
  --glow: 0 0 40px rgba(255, 107, 107, 0.3);

  --font: 'Inter', -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: white; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(255, 107, 107, 0.5);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.btn-ghost {
  color: var(--gray-400);
}
.btn-ghost:hover { color: var(--white); }

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--bg-elevated);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===========================================
   TOPBAR
   =========================================== */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.topbar-link {
  font-size: 14px;
  color: var(--gray-400);
  transition: color 0.2s;
}
.topbar-link:hover { color: var(--white); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Usage Badge */
.usage-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border-radius: 100px;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.2s;
}

.usage-badge:hover {
  background: var(--bg-hover);
}

.usage-bar {
  width: 60px;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: var(--gradient);
  transition: width 0.3s;
}

/* ===========================================
   HERO SECTION
   =========================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-size: 13px;
  color: var(--gray-300);
  margin-bottom: 24px;
}

.hero-badge span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 800px;
}

.hero h1 .gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 20px;
  color: var(--gray-400);
  max-width: 600px;
  margin-bottom: 48px;
}

/* Prompt Input */
.prompt-container {
  width: 100%;
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.prompt-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 24px;
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  transition: all 0.3s;
}

.prompt-box:focus-within {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.prompt-box input {
  flex: 1;
  background: none;
  border: none;
  color: var(--white);
  font-size: 16px;
  outline: none;
}
.prompt-box input::placeholder { color: var(--gray-500); }

.prompt-box button {
  padding: 12px 24px;
  background: var(--gradient);
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
}
.prompt-box button:hover { transform: scale(1.02); }
.prompt-box button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.prompt-chip {
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  font-size: 13px;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s;
}
.prompt-chip:hover {
  border-color: var(--accent);
  color: var(--white);
}

/* ===========================================
   GENERATION FLOW
   =========================================== */

.generation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.95);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.generation-modal {
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
}

/* Loading State */
.generation-loading {
  text-align: center;
  padding: 80px 24px;
}

.generation-loading h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 32px;
}

.loading-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px;
  margin: 0 auto;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  text-align: left;
}

.loading-step.active {
  border: 1px solid var(--accent);
}

.loading-step.done {
  opacity: 0.5;
}

.loading-step-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.loading-step.active .loading-step-icon {
  background: var(--gradient);
}

.loading-step h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.loading-step p {
  font-size: 12px;
  color: var(--gray-500);
}

/* Result State */
.generation-result {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

.result-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-phone {
  width: 280px;
  background: #000;
  border-radius: 40px;
  padding: 10px;
  box-shadow: var(--glow);
}

.result-screen {
  position: relative;
  aspect-ratio: 9/16;
  background: var(--bg-elevated);
  border-radius: 30px;
  overflow: hidden;
}

.result-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-text-overlay {
  position: absolute;
  left: 50%;
  top: 70%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  text-align: center;
  max-width: 90%;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}

.result-watermark {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.result-playback {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border-radius: 100px;
}

.play-btn {
  width: 36px;
  height: 36px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.timeline-bar {
  width: 120px;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.timeline-progress {
  height: 100%;
  background: var(--gradient);
  transition: width 0.1s;
}

.time-label {
  font-size: 12px;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}

/* Result Details */
.result-details {
  display: flex;
  flex-direction: column;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.result-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 8px;
}

.result-header p {
  color: var(--gray-400);
  font-size: 14px;
}

.result-close {
  width: 40px;
  height: 40px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gray-400);
  cursor: pointer;
}
.result-close:hover { color: var(--white); }

.result-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.meta-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 13px;
}

.meta-tag span:first-child {
  font-size: 16px;
}

/* Script Scenes */
.script-section {
  margin-bottom: 24px;
}

.script-section h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.scene-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scene-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.scene-item:hover {
  background: var(--bg-elevated);
}

.scene-item.active {
  border-color: var(--accent);
  background: rgba(255, 107, 107, 0.1);
}

.scene-number {
  width: 24px;
  height: 24px;
  background: var(--bg-elevated);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.scene-item.active .scene-number {
  background: var(--accent);
}

.scene-content {
  flex: 1;
}

.scene-text {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.scene-timing {
  font-size: 11px;
  color: var(--gray-500);
}

.scene-edit-btn {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  opacity: 0;
}

.scene-item:hover .scene-edit-btn {
  opacity: 1;
}

.scene-edit-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Result Actions */
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.result-actions .btn {
  flex: 1;
}

/* ===========================================
   HOW IT WORKS
   =========================================== */

.how-section {
  padding: 100px 24px;
  text-align: center;
}

.how-section h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
}

.how-section > p {
  color: var(--gray-400);
  font-size: 18px;
  margin-bottom: 64px;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.how-step {
  text-align: center;
}

.how-icon {
  width: 80px;
  height: 80px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

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

.how-step p {
  font-size: 14px;
  color: var(--gray-500);
}

/* ===========================================
   USE CASES
   =========================================== */

.usecases {
  padding: 80px 24px;
  background: var(--bg-card);
}

.usecases-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.usecases h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.usecase-card {
  padding: 32px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
  background-size: cover;
  background-position: center;
  position: relative;
}

.usecase-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  border-radius: var(--radius-lg);
}

.usecase-card h3,
.usecase-card p {
  position: relative;
  z-index: 1;
}

.usecase-card:hover {
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-4px);
}

.usecase-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.usecase-card p {
  font-size: 14px;
  color: var(--gray-400);
  line-height: 1.6;
}

/* ===========================================
   PRICING
   =========================================== */

.pricing {
  padding: 100px 24px;
  scroll-margin-top: 80px;
}

.pricing-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.pricing h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.pricing > p {
  text-align: center;
  color: var(--gray-400);
  margin-bottom: 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pricing-card {
  position: relative;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: var(--gradient);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.pricing-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 24px;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
}

.pricing-period {
  font-size: 16px;
  color: var(--gray-500);
}

.pricing-desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pricing-features {
  flex: 1;
  margin-bottom: 24px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--gray-300);
}

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

.pricing-features li.disabled {
  color: var(--gray-600);
  text-decoration: line-through;
}

.pricing-features li.disabled::before {
  content: '—';
  color: var(--gray-600);
}

/* Billing Toggle */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.billing-toggle span {
  font-size: 14px;
  color: var(--gray-500);
  transition: color 0.2s;
}

.billing-toggle span.active {
  color: var(--white);
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  width: 56px;
  height: 30px;
  background: var(--bg-elevated);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.3s;
}

.toggle-switch.active {
  background: var(--gradient);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch.active::after {
  transform: translateX(26px);
}

.yearly-savings {
  padding: 4px 10px;
  background: var(--green);
  color: #000;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}

/* Price Display */
.price-monthly {
  text-decoration: line-through;
  color: var(--gray-500);
  font-size: 18px;
  margin-right: 8px;
}

.price-yearly-note {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.price-savings {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(81, 207, 102, 0.2);
  color: var(--green);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 8px;
}

/* Add-on Packs */
.addons-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.addons-section h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.addons-section > p {
  text-align: center;
  color: var(--gray-400);
  font-size: 14px;
  margin-bottom: 24px;
}

.addons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.addon-card {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.2s;
}

.addon-card:hover {
  border-color: var(--accent);
}

.addon-credits {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.addon-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.addon-price {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.addon-card .btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
}

/* Managed Service */
.managed-section {
  margin-top: 48px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 169, 77, 0.1) 100%);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}

.managed-content h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.managed-content h3 span {
  padding: 4px 10px;
  background: var(--gradient);
  border-radius: 6px;
  font-size: 11px;
  text-transform: uppercase;
}

.managed-content > p {
  color: var(--gray-400);
  font-size: 15px;
  margin-bottom: 16px;
}

.managed-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.managed-features span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-300);
}

.managed-features span::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
}

.managed-cta {
  text-align: center;
}

.managed-price {
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.managed-price strong {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  font-family: var(--font-display);
}

/* ===========================================
   CTA SECTION
   =========================================== */

.cta-section {
  padding: 100px 24px;
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  font-size: 20px;
  color: var(--gray-400);
  margin-bottom: 32px;
  position: relative;
}

/* ===========================================
   FOOTER
   =========================================== */

.footer {
  padding: 48px 24px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--gray-500);
  max-width: 280px;
}

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

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--gray-400);
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--gray-500);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--gray-600);
}

/* ===========================================
   MODALS
   =========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--gray-400);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-input label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
}

.modal-input input {
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 15px;
}
.modal-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.modal-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--gray-500);
}

.modal-switch button {
  color: var(--accent);
  font-weight: 600;
}

.modal-error {
  padding: 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 13px;
  text-align: center;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 16px 20px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  font-size: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===========================================
   HELP WIDGET
   =========================================== */

.help-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: var(--glow);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  font-size: 24px;
  line-height: 1;
}

.help-bubble:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 60px rgba(255, 107, 107, 0.5);
}

.help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1499;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.help-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  z-index: 1500;
  background: var(--bg-card);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
}

.help-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-panel-header h2 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  margin: 0;
}

.help-close-btn {
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.help-close-btn:hover {
  color: var(--white);
}

.help-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  flex: 1;
  overflow-y: auto;
}

.help-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-form .form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-300);
}

.help-form .form-group input,
.help-form .form-group select,
.help-form .form-group textarea {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.help-form .form-group input:focus,
.help-form .form-group select:focus,
.help-form .form-group textarea:focus {
  outline: none;
  border-color: var(--red);
}

.help-form .form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.help-form .form-group select option {
  background: var(--bg-elevated);
  color: var(--white);
}

.help-form .form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.help-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius);
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.help-submit-btn:hover:not(:disabled) {
  box-shadow: var(--glow);
}

.help-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.help-success {
  padding: 16px;
  background: rgba(81, 207, 102, 0.1);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  color: var(--green);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.help-error {
  padding: 12px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 13px;
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 1024px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .usecases-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .generation-result { grid-template-columns: 1fr; }
  .result-preview { order: -1; }
}

@media (max-width: 768px) {
  .topbar-nav { display: none; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 16px; }
  .prompt-box { flex-direction: column; padding: 16px; border-radius: var(--radius-lg); }
  .prompt-box input { width: 100%; text-align: center; }
  .prompt-box button { width: 100%; justify-content: center; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .addons-grid { grid-template-columns: 1fr; max-width: 280px; }
  .managed-section { grid-template-columns: 1fr; text-align: center; }
  .managed-features { justify-content: center; }
  .help-panel { width: 100%; }
  .help-bubble { bottom: 16px; right: 16px; }
}
