/* === GhostLot — Cyberpunk Neon Theme === */
:root {
  --bg: #07080d;
  --bg-secondary: #0d0f17;
  --bg-card: #111320;
  --fg: #e8e9ed;
  --fg-muted: #8b8fa3;
  --accent: #00e68a;
  --accent-dim: rgba(0, 230, 138, 0.12);
  --accent-glow: rgba(0, 230, 138, 0.25);
  --border: rgba(255,255,255,0.06);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max-w: 1100px;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

.accent { color: var(--accent); }

/* ---- HERO ---- */
.hero {
  position: relative;
  padding: 140px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 32px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 28px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto;
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-w);
  margin: 64px auto 0;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

.hero-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* ---- PROBLEM ---- */
.problem {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.problem h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 48px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.problem-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.problem-icon {
  font-size: 20px;
  color: var(--fg-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.problem-card p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ---- PILLARS ---- */
.pillars {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-tag {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
}

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

.pillar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px 28px;
  position: relative;
  transition: border-color 0.3s;
}

.pillar:hover {
  border-color: rgba(0, 230, 138, 0.2);
}

.pillar-number {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  color: var(--accent-dim);
  line-height: 1;
  margin-bottom: 16px;
  background: var(--accent-dim);
  -webkit-background-clip: text;
  color: rgba(0, 230, 138, 0.2);
}

.pillar h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--fg);
}

.pillar-desc {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.pillar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pillar-tags span {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ---- HOW ---- */
.how {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.how h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.how-sub {
  max-width: 600px;
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 56px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  align-items: stretch;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.step:first-child { border-top: 1px solid var(--border); }

.step-bar {
  width: 4px;
  min-height: 48px;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
  border-radius: 4px;
  flex-shrink: 0;
}

.step-content { flex: 1; }

.step-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.step-content p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* ---- CLOSING ---- */
.closing {
  padding: 120px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.closing-glow {
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.closing .container { position: relative; z-index: 1; }

.closing h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

.closing-sub {
  max-width: 580px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.75;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.footer-tagline {
  font-size: 14px;
  color: var(--fg-muted);
}

.footer-meta {
  font-size: 13px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-dot { opacity: 0.4; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { padding: 100px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
  .problem-grid { grid-template-columns: 1fr; }
  .pillar-grid { grid-template-columns: 1fr; gap: 20px; }
  .step { gap: 20px; }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  .footer-brand {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .hero { padding: 80px 0 48px; }
  .hero h1 { letter-spacing: -1px; }
  .problem, .pillars, .how { padding: 72px 0; }
  .closing { padding: 80px 0; }
  .pillar { padding: 28px 22px 22px; }
}

/* ---- CTA BUTTON (landing page) ---- */
.btn-cta {
  display: inline-block;
  margin-top: 40px;
  background: var(--accent);
  color: #07080d;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* ---- APP NAV ---- */
.app-nav {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: rgba(7, 8, 13, 0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
.app-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}
.nav-badge {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 12px;
  border-radius: 100px;
}
.nav-back {
  font-size: 14px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--accent); }

/* ---- APP HEADER ---- */
.app-header {
  position: relative;
  padding: 72px 0 56px;
  text-align: center;
  overflow: hidden;
}
.app-header-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.app-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
}
.app-subtitle {
  max-width: 560px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  position: relative;
}

/* ---- APP MAIN ---- */
.app-main { padding: 0 0 80px; }

.app-error {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.25);
  border-radius: 10px;
  padding: 14px 20px;
  color: #ff6b6b;
  font-size: 15px;
  margin-bottom: 28px;
}
.error-icon { margin-right: 8px; }

/* ---- APP GRID ---- */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ---- PANEL ---- */
.form-panel, .history-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.panel-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
}
.panel-sub {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ---- FORM ELEMENTS ---- */
.form-row { margin-bottom: 20px; }
.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.required { color: var(--accent); }
.form-optional { color: var(--fg-muted); font-size: 12px; text-transform: none; letter-spacing: 0; }
.form-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus { border-color: rgba(0, 230, 138, 0.4); }
.form-input::placeholder { color: #4a4f63; }
.form-textarea { resize: vertical; min-height: 100px; }

.btn-generate {
  width: 100%;
  margin-top: 8px;
  background: var(--accent);
  color: #07080d;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  padding: 15px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s;
}
.btn-generate:hover { opacity: 0.88; }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-arrow { font-size: 18px; }

/* ---- HISTORY ---- */
.history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.8;
}
.history-empty-icon { font-size: 36px; margin-bottom: 12px; }
.history-empty-sub { font-size: 14px; margin-top: 6px; }

.history-list { display: flex; flex-direction: column; gap: 0; }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }
.history-vehicle {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}
.history-trim {
  font-weight: 400;
  color: var(--fg-muted);
  font-size: 14px;
}
.history-meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--fg-muted);
}
.history-meta span::before { content: ''; }
.history-item-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.history-badge {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-heading);
  white-space: nowrap;
}
.history-link {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s;
}
.history-link:hover { color: var(--accent); }

/* ---- LOADING OVERLAY ---- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 8, 13, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.loading-overlay.hidden { display: none; }
.loading-box {
  text-align: center;
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 320px;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}
.loading-sub { font-size: 14px; color: var(--fg-muted); }

/* ---- RESULTS HEADER ---- */
.results-header {
  position: relative;
  padding: 72px 0 52px;
  overflow: hidden;
}
.results-header-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.results-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 16px;
  position: relative;
}
.results-trim {
  font-size: 0.65em;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0;
  display: block;
  margin-top: 6px;
}
.results-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--fg-muted);
  flex-wrap: wrap;
  position: relative;
}
.results-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.results-meta span + span::before {
  content: '·';
  opacity: 0.4;
}

/* ---- RESULTS MAIN ---- */
.results-main { padding: 0 0 80px; }
.content-section {
  margin-bottom: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
}
.content-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.content-section-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
}

/* ---- SCRIPT ---- */
.script-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.script-part {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.script-part-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.script-tag {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 100px;
}
.hook-tag { background: rgba(0,230,138,0.15); color: var(--accent); }
.body-tag { background: rgba(100,160,255,0.12); color: #7aaeff; }
.cta-tag { background: rgba(255,160,50,0.12); color: #ffa032; }
.script-timing {
  font-size: 12px;
  color: var(--fg-muted);
}
.script-text {
  font-size: 15px;
  color: var(--fg);
  line-height: 1.7;
}

.full-script-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.full-script-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.script-label-full {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.full-script-text {
  padding: 20px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}

/* ---- CAPTIONS ---- */
.captions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.caption-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.caption-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.platform-badge {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 100px;
}
.tiktok-badge { background: rgba(255,0,80,0.12); color: #ff5080; }
.reels-badge { background: rgba(180,0,255,0.12); color: #c060ff; }
.shorts-badge { background: rgba(255,40,0,0.12); color: #ff5030; }
.caption-text { font-size: 14px; color: var(--fg); line-height: 1.7; }

/* ---- COPY BUTTONS ---- */
.btn-copy {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.btn-copy:hover, .btn-copy.copied { color: var(--accent); border-color: rgba(0,230,138,0.3); }
.btn-copy-sm {
  background: none;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-copy-sm:hover, .btn-copy-sm.copied { color: var(--accent); border-color: rgba(0,230,138,0.3); }

/* ---- SCHEDULE TABLE ---- */
.schedule-table-wrap { overflow-x: auto; }
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.schedule-table th {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: left;
  padding: 0 16px 14px 0;
  border-bottom: 1px solid var(--border);
}
.schedule-table td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  vertical-align: top;
}
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-day {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.schedule-platform {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
}
.schedule-time { color: var(--fg-muted); font-size: 14px; }
.schedule-note { color: var(--fg-muted); font-size: 14px; max-width: 300px; }

/* ---- RESULTS ACTIONS ---- */
.results-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 40px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
}
.btn-secondary:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }
.results-actions .btn-generate { width: auto; }

/* ---- APP RESPONSIVE ---- */
@media (max-width: 900px) {
  .app-grid { grid-template-columns: 1fr; }
  .script-grid { grid-template-columns: 1fr; }
  .captions-grid { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .form-panel, .history-panel, .content-section { padding: 24px; }
  .form-row-3 { grid-template-columns: 1fr; }
  .results-actions { flex-direction: column; align-items: stretch; }
  .results-actions .btn-secondary { text-align: center; justify-content: center; }
}