:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-soft: rgba(255, 255, 255, 0.04);
  --panel: rgba(11, 18, 32, 0.82);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #eef3ff;
  --muted: #9db0d0;
  --accent: #5eead4;
  --accent-strong: #22c55e;
  --accent-2: #38bdf8;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 30%),
    radial-gradient(circle at right top, rgba(94, 234, 212, 0.12), transparent 28%),
    linear-gradient(180deg, #07101c 0%, #091624 48%, #050a12 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
}

.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  align-items: stretch;
}

.hero-copy, .viewer-wrap, .details article {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 28px;
  padding: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-strong);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 28px;
}

button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary {
  color: #06111f;
  background: linear-gradient(135deg, #7cf8e2, #4ade80);
  box-shadow: 0 18px 30px rgba(74, 222, 128, 0.24);
}

.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.stat-card {
  border-radius: 18px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: #7f95b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  font-size: 1rem;
}

.viewer-wrap {
  border-radius: 28px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
}

.viewer-header > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
  box-shadow: 0 0 0 6px rgba(100, 116, 139, 0.12);
}

.pill {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.viewer {
  position: relative;
  flex: 1;
  min-height: 520px;
  border-radius: 22px;
  overflow: visible;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(9, 17, 29, 0.88), rgba(5, 10, 18, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.viewer img {
  display: none;
}

.viewer video,
.viewer canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.viewer video {
  display: none;
}

.viewer.active video,
.viewer.active canvas {
  display: block;
}

.viewer canvas {
  pointer-events: none;
}

#overlayCanvas {
  padding: 0;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.details article {
  border-radius: 22px;
  padding: 22px;
}

.details h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

@media (max-width: 1024px) {
  .hero, .details {
    grid-template-columns: 1fr;
  }

  .viewer {
    min-height: 420px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1200px);
    padding-top: 16px;
  }

  .hero-copy, .viewer-wrap, .details article {
    border-radius: 22px;
    padding: 20px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .controls {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .viewer {
    min-height: 320px;
  }
}
