/* Passion3D World - Futuristic Industrial Tech UI */
:root {
  --bg-0: #03060d;
  --bg-1: #060b18;
  --bg-2: #0a1226;
  --panel: rgba(10, 18, 38, 0.55);
  --panel-border: rgba(0, 229, 255, 0.18);
  --neon-cyan: #00e5ff;
  --neon-blue: #2a7bff;
  --neon-soft: #7df9ff;
  --text-0: #e8f4ff;
  --text-1: #9fb4d4;
  --text-2: #5a6e8f;
  --danger: #ff3b6b;
  --success: #00ffa3;
  --grid: rgba(0, 229, 255, 0.06);
}

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

html, body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: 'Inter', 'Rajdhani', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(0, 229, 255, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(42, 123, 255, 0.10), transparent 50%),
    linear-gradient(180deg, #03060d 0%, #060b18 100%);
}

/* Animated grid backdrop */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  animation: gridShift 30s linear infinite;
}

@keyframes gridShift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}

/* Animated particles / scanlines */
.bg-scan {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, transparent 0 3px, rgba(255,255,255,0.012) 3px 4px);
}

.bg-orb {
  position: fixed;
  width: 600px; height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: float 18s ease-in-out infinite;
}
.bg-orb.cyan { background: radial-gradient(circle, #00e5ff, transparent 70%); top: -200px; left: -200px; }
.bg-orb.blue { background: radial-gradient(circle, #2a7bff, transparent 70%); bottom: -200px; right: -200px; animation-delay: -6s; }
.bg-orb.pink { background: radial-gradient(circle, #b455ff, transparent 70%); top: 40%; right: 10%; animation-delay: -12s; opacity: 0.25; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
}

/* Glassmorphism panel */
.glass {
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.65), rgba(6, 11, 24, 0.55));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  box-shadow:
    0 8px 40px rgba(0, 229, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.glass-strong {
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.88), rgba(6, 11, 24, 0.82));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(3, 6, 13, 0.85), rgba(3, 6, 13, 0.3));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.10);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-0);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #00e5ff, #2a7bff);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.55);
  font-weight: 900;
  color: #00121a;
  font-family: 'JetBrains Mono', monospace;
}
.brand-name { font-size: 16px; letter-spacing: 0.16em; }
.brand-name span { color: var(--neon-cyan); }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--text-1);
  text-decoration: none;
  padding: 8px 16px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: all 0.25s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--neon-cyan); background: rgba(0, 229, 255, 0.08); }
.nav-links a.active { color: var(--neon-cyan); background: rgba(0, 229, 255, 0.10); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(.2,.7,.2,1);
  font-family: inherit;
  background: transparent;
  color: var(--text-0);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, #00e5ff, #2a7bff);
  color: #00121a;
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0), 0 6px 24px rgba(0, 229, 255, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.18), 0 12px 36px rgba(0, 229, 255, 0.45); }
.btn-ghost { border-color: var(--panel-border); color: var(--text-0); background: rgba(10,18,38,0.4); }
.btn-ghost:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(0,229,255,0.06); }
.btn-icon { padding: 10px; min-width: 40px; justify-content: center; }
.btn.active { border-color: var(--neon-cyan); color: var(--neon-cyan); background: rgba(0,229,255,0.10); box-shadow: inset 0 0 18px rgba(0,229,255,0.15); }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 100px 28px 60px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.hero-content { position: relative; z-index: 2; }
.tag-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--neon-cyan);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 600;
}
.tag-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity: 0.3; } }

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #9fc7ff 60%, #00e5ff 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(135deg, #00e5ff, #2a7bff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display: block;
}
.hero .tagline {
  font-size: 18px;
  color: var(--text-1);
  margin-bottom: 32px;
  max-width: 540px;
  line-height: 1.6;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.stat { }
.stat .num { font-size: 28px; font-weight: 700; color: var(--neon-cyan); font-family: 'JetBrains Mono', monospace; }
.stat .lbl { font-size: 11px; letter-spacing: 0.18em; color: var(--text-2); text-transform: uppercase; margin-top: 4px; }

.hero-viewer {
  position: relative;
  height: 600px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 80px rgba(0, 229, 255, 0.15), inset 0 0 60px rgba(0, 229, 255, 0.05);
}
.hero-viewer canvas { display: block; width: 100% !important; height: 100% !important; }

.hero-viewer .corner {
  position: absolute;
  width: 28px; height: 28px;
  border-color: var(--neon-cyan);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}
.corner.tl { top: 12px; left: 12px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 12px; right: 12px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 12px; left: 12px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 12px; right: 12px; border-bottom-width: 2px; border-right-width: 2px; }

.hero-viewer .hud {
  position: absolute;
  top: 16px; left: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--neon-cyan);
  letter-spacing: 0.12em;
  padding: 6px 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 6px;
}
.hero-viewer .hud-r {
  position: absolute;
  bottom: 16px; right: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-1);
  letter-spacing: 0.08em;
}

/* Features section */
.section {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 28px;
}
.section-title {
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
}
.section-heading {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  line-height: 1.1;
}
.section-sub {
  color: var(--text-1);
  max-width: 720px;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.feature-card {
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(0, 229, 255, 0.4); }
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,229,255,0.18), rgba(42,123,255,0.12));
  border: 1px solid rgba(0,229,255,0.25);
  margin-bottom: 18px;
  color: var(--neon-cyan);
  font-size: 22px;
}
.feature-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.feature-card p { color: var(--text-1); font-size: 13px; line-height: 1.6; }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.model-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(10, 18, 38, 0.6), rgba(6, 11, 24, 0.5));
  border: 1px solid var(--panel-border);
  transition: all 0.35s cubic-bezier(.2,.7,.2,1);
  text-decoration: none;
  color: inherit;
  display: block;
}
.model-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 20px 60px rgba(0, 229, 255, 0.18);
}
.model-thumb {
  position: relative;
  aspect-ratio: 4/3;
  background: radial-gradient(ellipse at center, #0c1a36 0%, #03060d 80%);
  overflow: hidden;
}
.model-thumb canvas { display: block; width: 100% !important; height: 100% !important; }
.model-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(3,6,13,0.7) 100%);
  pointer-events: none;
}
.model-thumb .badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,229,255,0.3);
  border-radius: 4px;
  color: var(--neon-cyan);
  z-index: 2;
}
.model-thumb .open-overlay {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.3s;
  background: rgba(0, 12, 24, 0.5);
  z-index: 3;
}
.model-card:hover .open-overlay { opacity: 1; }
.open-overlay span {
  padding: 10px 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00e5ff, #2a7bff);
  color: #00121a;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(0,229,255,0.4);
}
.model-info { padding: 18px 20px 22px; }
.model-info h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: -0.01em; }
.model-info .cat { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.16em; color: var(--neon-cyan); text-transform: uppercase; }
.model-info p { color: var(--text-1); font-size: 13px; margin-top: 10px; line-height: 1.55; }
.model-meta {
  display: flex; gap: 14px; margin-top: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--text-2);
}
.model-meta span i { color: var(--neon-cyan); margin-right: 4px; }

/* Viewer page layout */
.viewer-layout {
  position: fixed;
  inset: 64px 0 0 0;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 0;
}
.viewer-sidebar {
  border-right: 1px solid var(--panel-border);
  background: rgba(6, 11, 24, 0.6);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  padding: 20px;
}
.viewer-stage {
  position: relative;
  background: radial-gradient(ellipse at center, #0a1428 0%, #03060d 80%);
  overflow: hidden;
}
.viewer-stage canvas { display: block; width: 100% !important; height: 100% !important; }

.viewer-panel {
  border-left: 1px solid var(--panel-border);
  background: rgba(6, 11, 24, 0.6);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  padding: 20px;
}

.side-title {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.side-title::before {
  content: ''; width: 14px; height: 1px; background: var(--neon-cyan);
}

.model-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.model-pick {
  display: flex; gap: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(10,18,38,0.5);
  cursor: pointer;
  transition: all 0.25s;
  align-items: center;
}
.model-pick:hover { border-color: rgba(0,229,255,0.25); }
.model-pick.active { border-color: var(--neon-cyan); background: rgba(0,229,255,0.08); box-shadow: inset 0 0 18px rgba(0,229,255,0.08); }
.model-pick .ico {
  width: 44px; height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0,229,255,0.18), rgba(42,123,255,0.12));
  border: 1px solid rgba(0,229,255,0.2);
  display: grid; place-items: center;
  color: var(--neon-cyan);
  font-size: 18px;
  flex-shrink: 0;
}
.model-pick .meta { flex: 1; min-width: 0; }
.model-pick .meta .n { font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.model-pick .meta .c { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-2); letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px; }

.preset-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 22px; }
.preset-btn {
  padding: 10px;
  border-radius: 8px;
  background: rgba(10,18,38,0.5);
  border: 1px solid var(--panel-border);
  color: var(--text-1);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.preset-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.preset-btn i { font-size: 13px; }

.toggle-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.toggle-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(10,18,38,0.5);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: all 0.2s;
}
.toggle-item:hover { border-color: rgba(0,229,255,0.3); }
.toggle-item .lbl { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.toggle-item .lbl i { color: var(--neon-cyan); width: 16px; }
.switch {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  position: relative;
  transition: background 0.25s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-1);
  transition: all 0.25s;
}
.toggle-item.on .switch { background: rgba(0,229,255,0.4); }
.toggle-item.on .switch::after { left: 18px; background: var(--neon-cyan); box-shadow: 0 0 10px var(--neon-cyan); }

.slider-row { margin-bottom: 22px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-1); margin-bottom: 8px; letter-spacing: 0.06em; }
.slider-row label span { font-family: 'JetBrains Mono', monospace; color: var(--neon-cyan); }
input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 4px; background: rgba(0,229,255,0.15); border-radius: 999px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--neon-cyan); cursor: pointer;
  box-shadow: 0 0 10px var(--neon-cyan);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: none;
  background: var(--neon-cyan); cursor: pointer;
  box-shadow: 0 0 10px var(--neon-cyan);
}

/* Info panel right */
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 12px; }
.info-row .k { color: var(--text-2); letter-spacing: 0.06em; }
.info-row .v { color: var(--text-0); font-family: 'JetBrains Mono', monospace; }

.info-title {
  font-size: 20px; font-weight: 700; margin-bottom: 4px;
}
.info-cat {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--neon-cyan); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 12px;
}
.info-desc { color: var(--text-1); font-size: 13px; line-height: 1.6; margin-bottom: 18px; }

.spec-list { margin-bottom: 22px; }

.action-row { display: flex; flex-direction: column; gap: 8px; }

/* Floating HUD on stage */
.stage-hud {
  position: absolute;
  top: 18px; left: 18px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  z-index: 5;
}
.hud-chip {
  padding: 6px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(0,229,255,0.25);
  border-radius: 6px;
  color: var(--neon-cyan);
  backdrop-filter: blur(8px);
}
.hud-chip.live::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 8px var(--success);
  margin-right: 8px;
  animation: pulse 1.6s ease-in-out infinite;
}
.stage-overlay-actions {
  position: absolute;
  bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--panel-border);
  padding: 6px;
  border-radius: 14px;
  backdrop-filter: blur(14px);
  z-index: 5;
}
.stage-overlay-actions button {
  background: transparent;
  border: none;
  color: var(--text-1);
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}
.stage-overlay-actions button:hover { color: var(--neon-cyan); background: rgba(0,229,255,0.10); }
.stage-overlay-actions button.active { color: var(--neon-cyan); background: rgba(0,229,255,0.14); }

.stage-fps {
  position: absolute;
  top: 18px; right: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--panel-border);
  color: var(--text-1);
  padding: 6px 10px;
  border-radius: 6px;
  z-index: 5;
}

.coords {
  position: absolute;
  bottom: 18px; right: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.1em;
  z-index: 5;
  text-align: right;
  line-height: 1.6;
}
.coords span { color: var(--neon-cyan); }

/* Loading */
.loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, rgba(10, 20, 40, 0.85), rgba(3,6,13,0.95));
  z-index: 10;
  backdrop-filter: blur(6px);
  transition: opacity 0.5s;
}
.loader.hide { opacity: 0; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(0,229,255,0.15);
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-cyan);
  animation: spin 1s linear infinite;
  margin: 0 auto 18px;
  box-shadow: 0 0 30px rgba(0,229,255,0.25);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.3em; color: var(--neon-cyan); text-transform: uppercase; }
.loader-pct { font-size: 22px; color: var(--text-0); margin-top: 8px; font-family: 'JetBrains Mono', monospace; }

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0,229,255,0.10);
  padding: 36px 28px;
  margin-top: 60px;
  text-align: center;
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.footer span { color: var(--neon-cyan); }

/* Hotspot annotations */
.hotspot {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.2);
  border: 2px solid var(--neon-cyan);
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: grid; place-items: center;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
.hotspot::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--neon-cyan);
}
.hotspot .tip {
  position: absolute;
  left: 18px; top: -8px;
  white-space: nowrap;
  background: rgba(0,0,0,0.85);
  border: 1px solid var(--neon-cyan);
  color: var(--text-0);
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) translateX(10px);
  transition: all 0.25s;
  letter-spacing: 0.06em;
}
.hotspot:hover .tip { opacity: 1; transform: translateY(-50%) translateX(0); }

/* Responsive */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 90px; }
  .hero-viewer { height: 420px; }
  .viewer-layout { grid-template-columns: 220px 1fr 280px; }
}
@media (max-width: 760px) {
  .nav { padding: 12px 16px; }
  .nav-links a { padding: 6px 10px; font-size: 11px; }
  .brand-name { display: none; }
  .viewer-layout { grid-template-columns: 1fr; inset: 64px 0 0 0; }
  .viewer-sidebar, .viewer-panel { display: none; }
  .viewer-sidebar.mobile-open, .viewer-panel.mobile-open {
    display: block; position: fixed; top: 64px; bottom: 0; width: 280px; z-index: 60;
  }
  .viewer-sidebar.mobile-open { left: 0; }
  .viewer-panel.mobile-open { right: 0; }
  .section { padding: 50px 18px; }
  .hero { padding: 90px 18px 40px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* Fullscreen */
.viewer-stage:fullscreen { background: #03060d; }
.viewer-stage:fullscreen .stage-hud,
.viewer-stage:fullscreen .stage-overlay-actions,
.viewer-stage:fullscreen .stage-fps,
.viewer-stage:fullscreen .coords { z-index: 9999; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.8s cubic-bezier(.2,.7,.2,1) both; }
.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.2s; }
.fade-up.d3 { animation-delay: 0.3s; }
.fade-up.d4 { animation-delay: 0.4s; }

@keyframes glowSweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, transparent, rgba(0,229,255,0.18), transparent);
  background-size: 200% 100%;
  animation: glowSweep 3s ease-in-out infinite;
}

/* Mobile menu */
.menu-toggle { display: none; background: transparent; border: 1px solid var(--panel-border); color: var(--neon-cyan); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
}

/* ============================================================
   Upload Zone (Studio + Convert)
   ============================================================ */
.upload-zone {
  position: relative;
  border: 2px dashed rgba(0, 229, 255, 0.35);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.04), rgba(42, 123, 255, 0.04));
  transition: all 0.25s ease;
  margin-bottom: 16px;
}
.upload-zone:hover {
  border-color: var(--neon-cyan);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.10), rgba(42, 123, 255, 0.10));
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.25);
}
.upload-zone.drag {
  border-color: var(--neon-cyan);
  border-style: solid;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(42, 123, 255, 0.15));
  box-shadow: 0 0 36px rgba(0, 229, 255, 0.5);
  transform: scale(1.01);
}
.upload-zone.big {
  padding: 60px 24px;
}
.upload-zone .upload-icon {
  font-size: 36px;
  color: var(--neon-cyan);
  margin-bottom: 10px;
  filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.7));
}
.upload-zone.big .upload-icon {
  font-size: 56px;
}
.upload-zone .upload-text {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #e8f6ff;
}
.upload-zone.big .upload-text {
  font-size: 22px;
}
.upload-zone .upload-sub {
  font-size: 12px;
  color: rgba(232, 246, 255, 0.55);
  margin-top: 4px;
  margin-bottom: 10px;
}
.upload-zone .upload-formats {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(0, 229, 255, 0.7);
  padding: 6px 10px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 999px;
  display: inline-block;
}

/* File meta panel */
.file-meta {
  background: rgba(0, 8, 20, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.file-meta .info-row { margin-bottom: 4px; }
.file-meta .info-row:last-child { margin-bottom: 0; }

/* ============================================================
   Studio: Empty State (before any file uploaded)
   ============================================================ */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  color: rgba(232, 246, 255, 0.75);
  z-index: 3;
}
.empty-state.hide { display: none; }
.empty-state i {
  font-size: 72px;
  color: var(--neon-cyan);
  margin-bottom: 18px;
  filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.6));
  animation: float 3.6s ease-in-out infinite;
}
.empty-state h2 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  color: #fff;
}
.empty-state p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 480px;
  color: rgba(232, 246, 255, 0.6);
}
.empty-state .empty-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.18) 0%, transparent 70%);
  z-index: -1;
  animation: pulse 3.5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ============================================================
   Convert Page Layout
   ============================================================ */
.convert-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 22px;
  margin: 36px auto;
  max-width: 1320px;
}
.convert-card {
  padding: 24px;
  border-radius: 18px;
  position: relative;
}
.convert-step {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--neon-cyan);
  margin-bottom: 8px;
}
.convert-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 18px;
}
.convert-preview {
  height: 360px;
  border-radius: 12px;
  background: radial-gradient(ellipse at center, #0a1428 0%, #03060d 80%);
  border: 1px solid rgba(0, 229, 255, 0.15);
  position: relative;
  overflow: hidden;
}
.convert-preview canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.empty-preview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(232, 246, 255, 0.5);
}
.empty-preview i { font-size: 42px; color: var(--neon-cyan); opacity: 0.8; }
.empty-preview span {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
}
.empty-preview.err i { color: #ff5577; }

/* Inline overlay actions (inside convert preview card, not absolute over stage) */
.stage-overlay-actions.inline {
  position: static;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.stage-overlay-actions.inline button {
  position: static;
  display: inline-flex;
}

/* Format Picker */
.format-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.format-pick {
  display: block;
  cursor: pointer;
  position: relative;
}
.format-pick input { display: none; }
.format-pick .pick-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 10px;
  background: rgba(0, 8, 20, 0.4);
  transition: all 0.18s ease;
}
.format-pick:hover .pick-body {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.05);
}
.format-pick input:checked + .pick-body {
  border-color: var(--neon-cyan);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(42, 123, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.6), 0 0 18px rgba(0, 229, 255, 0.25);
}
.format-pick .pick-ico {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(42, 123, 255, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
}
.format-pick .pick-meta .n {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  letter-spacing: 0.04em;
}
.format-pick .pick-meta .d {
  font-size: 11px;
  color: rgba(232, 246, 255, 0.55);
  margin-top: 2px;
}

/* Convert options checkboxes */
.convert-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid rgba(0, 229, 255, 0.12);
}
.opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(232, 246, 255, 0.78);
  cursor: pointer;
}
.opt-row input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(0, 229, 255, 0.5);
  border-radius: 4px;
  background: rgba(0, 8, 20, 0.6);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.opt-row input[type="checkbox"]:checked {
  background: var(--neon-cyan);
  border-color: var(--neon-cyan);
}
.opt-row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #001825;
  font-weight: 700;
}

#convertBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.convert-status {
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-align: center;
  min-height: 18px;
}
.convert-status.ok { color: #00ffa3; }
.convert-status.err { color: #ff5577; }

.convert-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1320px;
  margin: 30px auto 0;
}

@media (max-width: 1100px) {
  .convert-layout { grid-template-columns: 1fr; }
  .convert-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .convert-features { grid-template-columns: 1fr; }
}

/* Color picker label override */
input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 8px;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; border-radius: 8px; }
input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0, 229, 255, 0.3); border-radius: 6px; }
