:root {
  /* Professional & Sober Palette - Slate & Indigo */
  --bg-dark: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #334155;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --success: #10b981;
  --border: rgba(255, 255, 255, 0.08);

  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --font-main: 'Inter', -apple-system, sans-serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ──────────────────────────────────── */
h2 {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

/* ── Fullscreen Video ─────────────────────────────── */
.video-container {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}

.video-container.has-zoom video {
  cursor: move;
}

.video-container.is-dragging video {
  cursor: grabbing;
}

/* ── Rotation Classes ────────────────────────────── */
.rotate-0 {
  transform: rotate(0deg);
}

.rotate-90 {
  transform: rotate(90deg);
}

.rotate-180 {
  transform: rotate(180deg);
}

.rotate-270 {
  transform: rotate(270deg);
}

.rotated-sideways video {
  width: 100vh;
  height: 100vw;
}

/* ── Night Vision Mode ────────────────────────────── */
.night-vision {
  filter: url(#nightVisionFilter) contrast(1.2) brightness(1.2);
}

.night-vision-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0, rgba(0, 255, 0, 0.05) 1px, transparent 2px),
    rgba(0, 20, 0, 0.1);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
  mix-blend-mode: screen;
}

.night-vision-active .night-vision-overlay {
  opacity: 1;
}

/* ── UI Bars (Floating Concept) ───────────────────── */
.top-bar,
.bottom-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 2rem);
  max-width: 480px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-radius: 1.5rem;
}

.top-bar {
  top: 1rem;
}

.bottom-bar {
  bottom: 1rem;
}

/* ── Status Badge ────────────────────────────────── */
.status-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: 2rem;
  background: rgba(0, 0, 0, 0.3);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.status-badge.live {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
}

.status-badge.live .status-dot {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s infinite;
}

.status-badge.connecting {
  color: var(--text-muted);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.15);
  }
}

/* ── Logo & Info ─────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.viewer-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Control Buttons ──────────────────────────────── */
.btn {
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 600;
  border-radius: 1rem;
}

.btn i {
  stroke-width: 2;
}

.btn-circle {
  width: 48px;
  height: 48px;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-circle:hover {
  background: var(--bg-card);
  color: var(--text-main);
  transform: translateY(-2px);
}

.btn-circle:active {
  transform: scale(0.95);
}

.btn-circle.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.btn-circle.danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 1rem 2rem;
  width: 100%;
}

.btn-primary:hover:not(:disabled) {
  background: #5558e6;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-primary-light,
.btn-secondary-light {
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  height: auto;
  min-height: 120px;
  border-radius: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

.btn-primary-light {
  background: var(--accent);
  color: #fff;
}

.btn-primary-light i {
  font-size: 1.5rem;
}

.btn-secondary-light {
  background: var(--bg-surface);
  color: var(--text-main);
}

.btn-secondary-light:hover {
  background: var(--bg-card);
}

.btn-primary-light:hover {
  background: #5558e6;
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -10px rgba(99, 102, 241, 0.5);
}

.btn-secondary-light:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border);
  width: 100%;
  margin-top: 1rem;
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

/* ── Interactive Screens ──────────────────────────── */
.center-message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem;
  background-color: var(--bg-dark);
  z-index: 50;
}

.message-box {
  width: 100%;
  max-width: 320px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  width: 100%;
}

.icon-box {
  width: auto;
  max-width: 240px;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  box-shadow: none;
}

.icon-box .brand-logo {
  height: 60px;
  width: auto;
}

/* ── Mobile & Notch ──────────────────────────────── */
@media (max-width: 480px) {

  .top-bar,
  .bottom-bar {
    width: 92%;
    padding: 0.6rem 1rem;
  }
}

@supports (padding: env(safe-area-inset-top)) {
  .top-bar {
    top: calc(0.75rem + env(safe-area-inset-top));
  }

  .bottom-bar {
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
}