/* ==========================================================================
   NEXA AI · Official Website & Dual-Engine Framework
   Aesthetic: Obsidian Dark + Neural Cyan / Quantum Violet / Amber Accents
   ========================================================================== */

:root {
  --bg-0: #04060c;
  --bg-1: #080c17;
  --bg-2: #0d1324;
  --bg-card: rgba(13, 19, 36, 0.68);
  --bg-card-hover: rgba(18, 27, 50, 0.85);
  --bg-glass: rgba(10, 15, 29, 0.72);

  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-glow: rgba(56, 189, 248, 0.35);
  --border-violet: rgba(168, 85, 247, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-violet: #a855f7;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --grad-primary: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #a855f7 100%);
  --grad-drama: linear-gradient(135deg, #a855f7 0%, #ec4899 55%, #f59e0b 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-glow-cyan: 0 0 40px -10px rgba(34, 211, 238, 0.4);
  --shadow-glow-violet: 0 0 40px -10px rgba(168, 85, 247, 0.4);
  --shadow-card: 0 20px 50px -20px rgba(0, 0, 0, 0.75);

  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --nav-height: 72px;
  --container-max: 1240px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-0);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.08), transparent 38%),
    radial-gradient(circle at 85% 18%, rgba(168, 85, 247, 0.1), transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(59, 130, 246, 0.06), transparent 45%),
    var(--bg-0);
  line-height: 1.6;
}

/* Neural Canvas Background */
#neural-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

/* Subtle Grid Overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 35%, transparent 100%);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.app-shell {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(4, 6, 12, 0.72);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad-primary);
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
  position: relative;
}

.brand-logo::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 10px;
  background: var(--bg-1);
}

.brand-logo svg {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.24));
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35), 0 4px 16px rgba(34, 211, 238, 0.15);
}

.nav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.25);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #030712;
  font-weight: 700;
  box-shadow: 0 8px 28px -6px rgba(34, 211, 238, 0.5);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -6px rgba(34, 211, 238, 0.7);
}

.btn-drama {
  background: var(--grad-drama);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 28px -6px rgba(168, 85, 247, 0.5);
}

.btn-drama:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -6px rgba(236, 72, 153, 0.65);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(148, 163, 184, 0.3);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.98rem;
}

/* ==========================================================================
   View Switching
   ========================================================================== */
.view-section {
  display: none;
  animation: fadeSlideIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.view-section.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Hero Section (Home View)
   ========================================================================== */
.hero {
  padding: 84px 0 64px;
  position: relative;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #bae6fd;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 28px;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.12);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.3rem);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-text-drama {
  background: var(--grad-drama);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 52px;
}

/* Hero Live AI Console Preview Card */
.hero-visual {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.45), rgba(148, 163, 184, 0.1) 45%, rgba(168, 85, 247, 0.45));
  box-shadow: 0 30px 90px -25px rgba(0, 0, 0, 0.9), 0 0 60px -20px rgba(34, 211, 238, 0.25);
}

.hero-visual-inner {
  background: rgba(8, 12, 23, 0.94);
  border-radius: calc(var(--radius-lg) - 1px);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.75);
  border-bottom: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #ef4444; }
.window-dots span:nth-child(2) { background: #f59e0b; }
.window-dots span:nth-child(3) { background: #10b981; }

.window-title {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.hero-dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  padding: 20px;
  text-align: left;
}

.dash-panel {
  background: rgba(13, 19, 36, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dash-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.dash-label.violet {
  color: #d8b4fe;
}

.dash-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.route-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-item {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 6, 12, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.08);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.route-model {
  color: var(--text-primary);
  font-weight: 600;
}

.route-latency {
  color: var(--accent-cyan);
  text-align: center;
}

.route-status {
  color: var(--accent-emerald);
  text-align: right;
}

.drama-mini-pipeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-shot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(4, 6, 12, 0.55);
  border: 1px solid rgba(168, 85, 247, 0.16);
}

.mini-thumb {
  width: 48px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(236, 72, 153, 0.45));
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.mini-shot-info {
  flex: 1;
  min-width: 0;
}

.mini-shot-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mini-shot-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.mini-progress {
  width: 68px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mini-progress > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--grad-drama);
}

/* ==========================================================================
   Model Marquee Strip
   ========================================================================== */
.marquee-wrap {
  padding: 28px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 12, 23, 0.5);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.model-chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: inline-block;
}

.model-chip.video i {
  background: var(--accent-pink);
}

/* ==========================================================================
   Section Headers & Cards
   ========================================================================== */
.section {
  padding: 84px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 52px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Dual Engine Product Cards */
.dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.engine-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.engine-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-surface);
  pointer-events: none;
}

.engine-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow-cyan);
}

.engine-card.drama:hover {
  border-color: var(--border-violet);
  box-shadow: var(--shadow-glow-violet);
}

.engine-top {
  position: relative;
  z-index: 1;
}

.engine-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--accent-cyan);
}

.engine-card.drama .engine-icon {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.35);
  color: #e879f9;
}

.engine-kicker {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.engine-title {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.engine-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: #cbd5e1;
}

.feature-list li::before {
  content: "✦";
  color: var(--accent-cyan);
  font-size: 0.8rem;
}

.engine-card.drama .feature-list li::before {
  color: #e879f9;
}

.engine-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.engine-stat {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.engine-stat strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* Bento Metrics / Capabilities */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.bento-card {
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.bento-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
}

.bento-num {
  font-size: 2rem;
  font-weight: 850;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

.bento-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.bento-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* Closed-Loop Workflow Banner */
.loop-card {
  border-radius: var(--radius-lg);
  padding: 36px;
  background: linear-gradient(135deg, rgba(13, 19, 36, 0.92), rgba(20, 16, 42, 0.88));
  border: 1px solid rgba(168, 85, 247, 0.28);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.loop-step {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(4, 6, 12, 0.52);
  border: 1px solid var(--border-subtle);
}

.loop-index {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.loop-step h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.loop-step p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   API Hub View (Framework Preview)
   ========================================================================== */
.subpage-header {
  padding: 44px 0 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.subpage-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.subpage-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.framework-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.8rem;
  font-weight: 600;
}

.api-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 22px;
  padding-bottom: 72px;
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(14px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.panel-head h3 {
  font-size: 1.08rem;
  font-weight: 700;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn:hover,
.pill-btn.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.42);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.model-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(4, 6, 12, 0.62);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.model-card:hover {
  border-color: rgba(34, 211, 238, 0.38);
  transform: translateY(-2px);
}

.model-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.model-name {
  font-weight: 700;
  font-size: 0.94rem;
}

.model-type {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.model-type.video {
  background: rgba(236, 72, 153, 0.16);
  color: #f9a8d4;
  border-color: rgba(236, 72, 153, 0.3);
}

.model-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.model-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.model-meta strong {
  color: var(--accent-cyan);
}

/* Code Preview Box */
.code-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.code-block {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #03050a;
  border: 1px solid var(--border-subtle);
  color: #cbd5e1;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 18px;
}

.key-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(4, 6, 12, 0.6);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ==========================================================================
   Drama E-Commerce Studio View (Short-Drama Workbench Shell)
   ========================================================================== */
.studio-shell {
  display: grid;
  grid-template-columns: 230px 1fr 280px;
  gap: 18px;
  padding-bottom: 72px;
  min-height: 640px;
}

.studio-sidebar,
.studio-canvas,
.studio-inspector {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.studio-step-btn {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(4, 6, 12, 0.5);
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-step-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.studio-step-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.18));
  border-color: rgba(168, 85, 247, 0.45);
  color: #fff;
}

.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #e879f9;
  margin-bottom: 2px;
}

.step-name {
  font-size: 0.88rem;
  font-weight: 700;
}

/* Mount Slot Banner */
.mount-slot {
  border: 1px dashed rgba(168, 85, 247, 0.55);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(34, 211, 238, 0.06));
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mount-slot-text h4 {
  font-size: 0.94rem;
  color: #f3e8ff;
  margin-bottom: 3px;
}

.mount-slot-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.storyboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.shot-card {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(4, 6, 12, 0.7);
  border: 1px solid var(--border-subtle);
}

.shot-preview {
  height: 112px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  background:
    radial-gradient(circle at 30% 20%, rgba(168, 85, 247, 0.45), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(34, 211, 238, 0.35), transparent 55%),
    #0b1120;
}

.shot-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(4, 6, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.shot-body {
  padding: 12px;
}

.shot-body h5 {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.shot-body p {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.timeline-bar {
  margin-top: auto;
  padding: 14px;
  border-radius: 14px;
  background: rgba(4, 6, 12, 0.72);
  border: 1px solid var(--border-subtle);
}

.timeline-tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.track-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.track-clips {
  display: flex;
  gap: 6px;
}

.clip-block {
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.45), rgba(236, 72, 153, 0.45));
  border: 1px solid rgba(232, 121, 249, 0.4);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: #fff;
}

.clip-block.cyan {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.35), rgba(59, 130, 246, 0.35));
  border-color: rgba(34, 211, 238, 0.45);
}

.inspector-field {
  padding: 12px;
  border-radius: 12px;
  background: rgba(4, 6, 12, 0.58);
  border: 1px solid var(--border-subtle);
}

.inspector-field label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.inspector-value {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  background: rgba(4, 6, 12, 0.82);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* Toast Notification */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #f8fafc;
  font-size: 0.86rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .dual-grid,
  .api-layout,
  .hero-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid,
  .loop-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav-tabs {
    display: none;
  }

  .bento-grid,
  .loop-card,
  .model-grid,
  .storyboard-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 52px;
  }
}


/* ==========================================================================
   Full-Stack Auth, Developer Console, Playground & Admin Styles
   ========================================================================== */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 14px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.3);
  font-size: 0.82rem;
}

.user-balance {
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  font-weight: 700;
}

.hidden {
  display: none !important;
}

/* Sub-tabs inside API Hub & Admin */
.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.sub-tab-btn {
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-tab-btn:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.35);
}

.sub-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.22));
  border-color: rgba(34, 211, 238, 0.5);
}

.sub-pane {
  display: none;
}

.sub-pane.active {
  display: block;
}

/* Forms & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  background: rgba(4, 6, 12, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent-cyan);
}

.textarea {
  min-height: 92px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

/* Data Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.data-table th {
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge.ok {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.warn {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.err {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Playground Output */
.playground-output {
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
  padding: 16px;
  border-radius: 14px;
  background: #03050a;
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #e2e8f0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 4, 10, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  place-items: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: grid;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: #0b1121;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
}

.hint-box {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 0.76rem;
  color: #bae6fd;
  line-height: 1.5;
}

.inline-input {
  width: 78px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(4, 6, 12, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}
