/* ==========================================================================
   VidNexus AI — "Aurora Dash" theme
   Near-black dashboard, mint-green primary accent, soft aurora glow
   (teal -> violet -> pink) behind the hero. Bold geometric display type,
   clean grotesque body type. Glassy dark cards, pill badges.
   ========================================================================== */

:root {
  color-scheme: dark;
  --stage:        #0B0C10; /* base background — near black */
  --stage-raised: #16181F; /* card/panel surface */
  --stage-line:   #262932; /* hairline borders on dark surfaces */
  --coral:        #1FE8A6; /* primary accent — mint green (was coral, kept var name) */
  --coral-dim:    #14C98C;
  --marquee:      #7C9CFF; /* secondary accent — soft periwinkle blue */
  --curtain-teal: #FF6FD8; /* tertiary accent — aurora pink, used sparingly */
  --danger:       #FF5C7A; /* semantic error color — separate from the mint accent */
  --ink:          #F5F6FA; /* primary text on dark */
  --ink-dim:      #A8ACBA; /* secondary text on dark */
  --ink-faint:    #6B6F80;

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

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

body {
  background: var(--stage);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a { color: var(--coral); text-decoration: none; }
a:hover { color: var(--marquee); }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; position: relative; }

/* aurora glow behind everything, fixed so it doesn't scroll with content */
.app-shell::before {
  content: '';
  position: fixed;
  top: -280px; left: 10%;
  width: 900px; height: 560px;
  background: radial-gradient(ellipse at center, rgba(31,232,166,0.16) 0%, rgba(124,156,255,0.10) 45%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
}

.sidebar, .main-content { position: relative; z-index: 1; }

.sidebar {
  width: 264px;
  flex-shrink: 0;
  background: rgba(22,24,31,0.7);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--stage-line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  padding: 0 12px 20px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 12px var(--coral);
}

.nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--ink-dim);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-card:hover {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
}

.nav-card.active {
  background: rgba(31, 232, 166, 0.12);
  color: var(--ink);
}

/* left rail indicator for the active nav card — the signature element */
.nav-card.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: var(--coral);
  box-shadow: 0 0 10px rgba(31,232,166,0.6);
}

.nav-card .icon { width: 20px; text-align: center; flex-shrink: 0; }
.nav-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  padding: 18px 14px 6px 14px;
  font-weight: 600;
}

/* ---------- Icon rail (far-left, icon-only nav) ---------- */
.icon-rail {
  width: 68px;
  flex-shrink: 0;
  background: rgba(22,24,31,0.7);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--stage-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 6px;
}

.icon-rail-logo {
  width: 32px; height: 32px;
  margin-bottom: 18px;
}

.icon-rail-item {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ink-faint);
  position: relative;
  flex-shrink: 0;
}

.icon-rail-item:hover { background: rgba(255,255,255,0.05); color: var(--ink); }

.icon-rail-item.active {
  background: rgba(31,232,166,0.14);
  color: var(--coral);
}

.icon-rail-spacer { flex: 1; }

.icon-rail-item.logout { color: var(--danger); margin-top: 6px; }

/* ---------- Profile panel (left, next to icon rail) ---------- */
.profile-panel {
  width: 280px;
  flex-shrink: 0;
  background: var(--stage-raised);
  border-right: 1px solid var(--stage-line);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
}

.profile-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--marquee));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--stage);
  margin-bottom: 16px;
}

.profile-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.15;
  margin-bottom: 12px;
}

.profile-plan-badge {
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-icons-row {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
}

.contact-icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stage-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--ink-dim);
}

.contact-icon-btn:hover { color: var(--coral); border-color: var(--coral-dim); }

.activity-list { margin-bottom: 24px; }

.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stage-line);
}

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

.activity-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--ink-faint);
  padding-top: 2px;
}

.activity-date { font-size: 0.78rem; color: var(--ink-faint); }
.activity-desc { font-size: 0.85rem; color: var(--ink-dim); }

.profile-panel-spacer { flex: 1; }

.plan-box {
  border: 1px solid var(--coral-dim);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
}

.plan-box .label { font-size: 0.72rem; color: var(--ink-faint); margin-bottom: 2px; }
.plan-box .value { font-family: var(--font-display); font-weight: 700; color: var(--coral); font-size: 1rem; }

/* ---------- Big stat cards (Upload/Download-style) ---------- */
.stat-grid-lg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card-lg {
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.stat-card-lg .stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.stat-card-lg .stat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.stat-card-lg .stat-title .diamond {
  width: 8px; height: 8px;
  background: var(--coral);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.stat-card-lg .stat-arrow { color: var(--ink-faint); font-size: 1rem; }

.stat-card-lg .stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.stat-card-lg .stat-sub { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 3px; }

/* ---------- Recent-creations table card ---------- */
.table-card {
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-weight: 600;
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--stage-line);
}

.data-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--stage-line);
  font-size: 0.88rem;
  color: var(--ink-dim);
}

.data-table tr:last-child td { border-bottom: none; }

.status-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.status-chip.done { background: rgba(31,232,166,0.14); color: var(--coral); }
.status-chip.pending { background: rgba(124,156,255,0.14); color: var(--marquee); }
.status-chip.failed { background: rgba(255,92,122,0.14); color: var(--danger); }

/* ---------- Main content ---------- */
.main-content { flex: 1; padding: 32px 40px; max-width: 1200px; }

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

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
}

.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--marquee));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--stage);
}

/* ---------- Welcome banner ---------- */
.welcome-banner {
  background: linear-gradient(145deg, rgba(22,24,31,0.92) 0%, rgba(18,20,26,0.92) 100%);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.welcome-banner::after {
  /* aurora glow accent, the recurring theme motif */
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(31,232,166,0.20) 0%, rgba(255,111,216,0.10) 55%, transparent 75%);
  pointer-events: none;
}

/* status pill, matches the reference "Active" badge */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--coral-dim);
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 999px;
}

.btn-pill-solid {
  background: var(--coral);
  color: #0B0C10;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 999px;
  display: inline-block;
  white-space: nowrap;
}

.btn-pill-solid:hover { background: var(--marquee); color: #0B0C10; }

.quote-banner-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.quote-mark { font-family: var(--font-display); font-size: 1.6rem; color: var(--coral); line-height: 1; }

/* ---------- Modal (prompt-variants viewer) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--stage-line);
  flex-shrink: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.modal-close-btn:hover { color: var(--ink); }

.modal-card-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.variant-block { margin-bottom: 18px; }
.variant-block:last-child { margin-bottom: 0; }

.variant-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 6px;
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(11,12,16,0.35);
  border-top-color: #0B0C10;
  border-radius: 50%;
  display: inline-block;
  animation: btn-spin 0.7s linear infinite;
}

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

.mode-toggle {
  display: inline-flex;
  background: var(--stage);
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}

.mode-toggle-btn {
  background: none;
  border: none;
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.mode-toggle-btn.active {
  background: var(--coral);
  color: #0B0C10;
}

/* ---------- Inline create-forms (e.g. Avatar Maker) ---------- */
.form-row-grid {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 20px;
  column-gap: 20px;
  row-gap: 20px;
  align-items: end;
}

.form-row-grid > div { min-width: 0; }
.form-row-grid .form-control-dark { margin-bottom: 0; }

@media (max-width: 760px) {
  .form-row-grid { grid-template-columns: 1fr; }
  .form-row-grid button { width: 100%; }
}

/* ---------- Stat + feature cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.stat-card .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  color: var(--ink);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* ---------- Step wizard (Kids Podcast, ViralStreet-style) ---------- */
.wizard-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.wizard-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--stage-line);
  background: var(--stage);
  color: var(--ink-faint);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

.wizard-step-pill:disabled { cursor: not-allowed; }

.wizard-step-pill .num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--stage-line);
  color: var(--ink-faint);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
}

.wizard-step-pill.active { border-color: var(--coral-dim); color: var(--ink); }
.wizard-step-pill.active .num { background: var(--coral); color: #0B0C10; }

.wizard-step-pill.done { color: var(--coral); }
.wizard-step-pill.done .num { background: rgba(31,232,166,0.16); color: var(--coral); }

.wizard-shell {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 32px;
}

.wizard-main {
  flex: 1;
  min-width: 0;
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  padding: 26px;
}

.wizard-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.wizard-sidebar-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 18px 0 8px 0;
}

.wizard-sidebar-label:first-child { margin-top: 0; }

.wizard-sidebar-media {
  width: 100%;
  aspect-ratio: 9/16;
  border-radius: var(--radius-md);
  background: var(--stage);
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .wizard-shell { flex-direction: column; }
  .wizard-sidebar { width: 100%; }
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 1200px) { .story-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .story-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--stage-raised);
  border: 1px solid var(--stage-line);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  display: block;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--coral-dim);
  color: var(--ink);
}

.feature-card .icon-badge {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.feature-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; color: var(--ink); }
.feature-card p { font-size: 0.85rem; color: var(--ink-dim); margin: 0; }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  background: var(--stage);
}

.auth-story {
  flex: 1;
  background: linear-gradient(160deg, #0F1420 0%, #0B0E16 60%);
  display: flex;
  align-items: flex-end;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

/* soft vignette so the bottom text block stays readable over the wave art */
.auth-story::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, rgba(31,232,166,0.10) 0%, transparent 55%),
              linear-gradient(to top, rgba(11,14,22,0.92) 0%, rgba(11,14,22,0.15) 55%, transparent 80%);
  z-index: 1;
  pointer-events: none;
}

.auth-story-wave {
  position: absolute;
  top: 12%; left: -5%;
  width: 110%;
  z-index: 0;
  opacity: 0.9;
}

.auth-story-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

.auth-story .story-eyebrow {
  color: var(--coral);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.auth-story h1 {
  font-size: 2.1rem;
  margin: 10px 0 12px 0;
  max-width: 460px;
  line-height: 1.15;
}

.auth-story h1 .accent { color: var(--coral); }

.auth-story p { color: var(--ink-dim); max-width: 420px; line-height: 1.6; margin-bottom: 18px; }

.btn-outline-ghost {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
}

.auth-form-panel {
  width: 460px;
  flex-shrink: 0;
  background: var(--stage);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 56px;
  border-right: 1px solid var(--stage-line);
}

.auth-topbrand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 48px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label-row a { font-size: 0.8rem; color: var(--marquee); }

.form-control-dark {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stage-line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  width: 100%;
  font-family: var(--font-body);
  margin-bottom: 14px;
}

select.form-control-dark {
  background: var(--stage-raised);
  cursor: pointer;
}

select.form-control-dark option {
  background: var(--stage-raised);
  color: var(--ink);
}

.form-control-dark:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(31,232,166,0.15);
}

.form-label-dark {
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-bottom: 6px;
  display: block;
}

.btn-coral {
  background: var(--coral);
  color: #0B0C10;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-family: var(--font-display);
  font-weight: 700;
  width: 100%;
  transition: background 0.15s ease;
}

.btn-coral:hover { background: var(--marquee); color: #0B0C10; }

.alert-dark-error {
  background: rgba(255,92,122,0.10);
  border: 1px solid var(--danger);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .auth-story { display: none; }
  .auth-form-panel { width: 100%; border-right: none; }
  .sidebar { display: none; }
  .main-content { padding: 20px; }
}
