:root {
  --bg: #000000;
  --panel: #353535;
  --accent: #ffc000;
  --accent-2: #22c55e;
  --text: #e2e8f0;
  --muted: #b1b1b1;
  --card: #1c1c1c;
  --border: #292929;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Futura", "Space Grotesk", "Trebuchet MS", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  letter-spacing: 0;
  margin: 0 0 12px;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.lede.compact {
  font-size: 0.92rem;
  margin: 8px 0 0;
}

.actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 150ms ease, border 150ms ease, background 150ms ease;
  font-family: var(--font);
}

.btn.primary {
  background: var(--accent);
  color: #1c1917;
  border-color: transparent;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card,
.panel,
.form,
.panel-list,
.viewer-card,
.flow-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
}

.grid {
  margin-top: 48px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel {
  padding: 18px;
}

.editor-shell,
.viewer-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 18px 56px;
}

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

.editor-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

@media (max-width: 980px) {
  .editor-layout {
    grid-template-columns: 1fr;
  }
}

.panel-list,
.form {
  padding: 16px;
}

.panel-list h2 {
  margin: 0 0 12px;
}

.step-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.scene-item {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--muted);
  margin-bottom: 8px;
}

.scene-item.active {
  border-color: var(--accent);
  background: #ffc00012;
  color: var(--text);
}

.form label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.form input,
.form textarea,
.form select {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  background: #101010;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
}

.form textarea {
  min-height: 86px;
  resize: vertical;
}

.preview {
  background: #101010;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 14px;
}

.image-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.image-stage img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}

.image-stage-editor {
  min-height: 280px;
  border: 1px solid #1f1f1f;
  display: grid;
  place-items: center;
}

.empty-stage {
  color: var(--muted);
  margin: 0;
  padding: 16px;
  text-align: center;
}

.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 192, 0, 0.18);
  backdrop-filter: blur(1.5px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 5px 14px rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hotspot.active {
  width: 30px;
  height: 30px;
  border-color: var(--accent);
  background: rgba(255, 192, 0, 0.48);
  color: #0a0a0a;
}

.hotspot.dimmed {
  opacity: 0.35;
}

.hotspot-editor {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #101010;
  padding: 12px;
}

.hotspot-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.hotspot-row {
  border: 1px solid #252525;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: #141414;
}

.hotspot-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hotspot-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.viewer-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 340px;
}

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

.viewer-card {
  padding: 16px;
}

.scene-image-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0c0c0c;
}

.scene-image-wrap img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.flow-panel {
  padding: 14px;
  align-self: start;
  position: sticky;
  top: 16px;
}

.flow-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.flow-label {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.note-card {
  border: 1px solid #2b2b2b;
  border-radius: 10px;
  background: #111111;
  padding: 10px;
  color: var(--muted);
  min-height: 92px;
}

.tooltip {
  position: absolute;
  max-width: 260px;
  background: rgba(5, 5, 5, 0.95);
  border: 1px solid #2d2d2d;
  border-radius: 8px;
  padding: 8px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
  pointer-events: none;
  z-index: 5;
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.lightbox.hidden {
  display: none;
}

.lightbox img {
  width: 95vw;
  height: 95vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox .lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  display: grid;
  place-items: center;
}

.hybrid-viewer-body {
  background:
    radial-gradient(900px 620px at 50% 0%, rgba(43, 69, 118, 0.32), transparent 66%),
    radial-gradient(1000px 700px at 100% -12%, rgba(18, 64, 74, 0.28), transparent 66%),
    #000;
}

.hybrid-viewer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 120px;
}

.hybrid-topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(6, 8, 13, 0.78);
  backdrop-filter: blur(10px);
  padding: 10px 14px;
  margin-bottom: 44px;
}

.hybrid-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #efbf64;
}

.hybrid-status {
  font-size: 12px;
  color: #9ea9bb;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hybrid-hero {
  text-align: center;
  margin: 14vh auto 7vh;
}

.hybrid-title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hybrid-subtitle {
  margin: 14px auto 0;
  max-width: 62ch;
  color: #9ea9bb;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hybrid-frame {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: linear-gradient(160deg, #0f1726 0%, #141d2b 58%, #101924 100%);
  min-height: 720px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.58);
}

.hybrid-image-wrap {
  position: absolute;
  inset: 8% 9% 12%;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(132deg, #3b5884, #2d435f 58%, #355c5f);
}

.hybrid-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
}

.hybrid-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hybrid-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #9ea9bb;
  padding: 20px;
  text-align: center;
}

.hybrid-beam {
  position: absolute;
  inset: -24% -18% auto;
  height: 460px;
  background: radial-gradient(ellipse at 50% 50%, rgba(132, 186, 255, 0.24), transparent 72%);
  pointer-events: none;
}

.hybrid-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 46%, transparent 34%, rgba(0, 0, 0, 0.58));
  pointer-events: none;
}

.hybrid-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(132, 186, 255, 0.24);
  box-shadow: 0 0 0 9px rgba(132, 186, 255, 0.08);
  animation: hybrid-pulse 2.3s ease-in-out infinite;
  cursor: pointer;
  z-index: 3;
}

.hybrid-hotspot-active {
  background: rgba(239, 191, 100, 0.35);
  box-shadow: 0 0 0 10px rgba(239, 191, 100, 0.1);
}

.hybrid-hotspot-dim {
  opacity: 0.35;
}

.hybrid-note-panel {
  position: absolute;
  right: 14px;
  top: 14px;
  width: min(38%, 360px);
  display: grid;
  gap: 8px;
  z-index: 4;
}

.hybrid-note {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 11px;
  background: rgba(0, 0, 0, 0.52);
}

.hybrid-note strong {
  display: block;
  font-size: 13px;
  color: #70d3d8;
  margin-bottom: 4px;
}

.hybrid-note p {
  margin: 0;
  font-size: 13px;
  color: #9ea9bb;
  line-height: 1.43;
}

.hybrid-note-active {
  border-color: rgba(239, 191, 100, 0.62);
  background: linear-gradient(180deg, rgba(239, 191, 100, 0.14), rgba(239, 191, 100, 0.03));
}

.hybrid-dock {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.48);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  z-index: 4;
}

.hybrid-dock span {
  font-size: 12px;
  color: #9ea9bb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hybrid-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 48%;
}

.hybrid-chip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px;
  text-align: center;
  font-size: 11px;
  color: #9ea9bb;
}

.hybrid-chip-active {
  border-color: rgba(239, 191, 100, 0.63);
  color: #f4f7ff;
}

.hybrid-controls {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hybrid-controls .btn {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.2);
}

.hybrid-sections {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hybrid-section {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.hybrid-section h3 {
  margin: 0 0 7px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.hybrid-section p {
  margin: 0;
  color: #9ea9bb;
  font-size: 14px;
  line-height: 1.45;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hybrid-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 9px rgba(132, 186, 255, 0.08);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.09);
    box-shadow: 0 0 0 13px rgba(132, 186, 255, 0.05);
  }
}

@media (max-width: 1050px) {
  .hybrid-frame {
    min-height: 680px;
  }

  .hybrid-note-panel {
    position: static;
    width: auto;
    margin: 14px;
  }

  .hybrid-dock {
    position: static;
    margin: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .hybrid-progress {
    width: 100%;
  }

  .hybrid-sections {
    grid-template-columns: 1fr;
  }
}
