:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --panel: #151515;
  --panel-strong: #1e1e1e;
  --accent: #ff1f1f;
  --accent-2: #ff6b2b;
  --text: #f5f5f5;
  --muted: #bdbdbd;
  --badge: #ffd966;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1b1b1b, #0b0b0b 60%);
  font-family: "Arial", sans-serif;
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.player-shell {
  width: min(960px, 100%);
}

.player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.main-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.splash {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: #000 url("/public/hero-image.png") center/cover no-repeat;
}

.splash.hidden {
  display: none;
}

.splash-video,
.splash-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.splash-video.hidden {
  display: none;
}

.ad-overlay {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.ad-overlay.hidden {
  display: none;
}

.ad-badge {
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--badge);
  color: #1c1c1c;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  cursor: grab;
}

.ad-container {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
}

.ad-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
}

.ad-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 6px;
  text-align: center;
  background: linear-gradient(135deg, #202020, #121212);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.ad-fallback.hidden {
  display: none;
}

.ad-fallback-title {
  font-size: 16px;
  letter-spacing: 0.08em;
}

.ad-fallback-subtitle {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.16em;
}

.view-overlay {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.view-overlay.hidden {
  display: none;
}

.view-badge {
  align-self: flex-start;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #1c1c1c;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  cursor: grab;
}

.view-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
}

.view-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: cover;
}

.view-bottom-right {
  bottom: 72px;
  right: 18px;
}

.view-bottom-left {
  bottom: 72px;
  left: 18px;
}

.view-top-right {
  top: 18px;
  right: 18px;
}

.view-top-left {
  top: 18px;
  left: 18px;
}

.mode-pip {
  width: 28%;
  min-width: 200px;
  max-width: 280px;
  aspect-ratio: 16 / 9;
}

.overlay-bottom-right {
  bottom: 72px;
  right: 18px;
}

.mode-quarter {
  width: 25%;
  min-width: 220px;
  max-width: 320px;
  height: 100%;
  top: 0;
  right: 0;
  border-radius: 0 0 0 12px;
}

.tap-to-play {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.tap-to-play.hidden {
  display: none;
}

@media (max-width: 720px) {
  .mode-pip {
    width: 42%;
    min-width: 160px;
  }

  .mode-quarter {
    width: 45%;
    height: 45%;
    bottom: 12px;
    top: auto;
    right: 12px;
  }

  .overlay-bottom-right {
    right: 12px;
    bottom: 56px;
  }

  .view-bottom-right {
    right: 12px;
    bottom: 56px;
  }

  .view-bottom-left {
    left: 12px;
    bottom: 56px;
  }

  .view-top-right {
    right: 12px;
    top: 12px;
  }

  .view-top-left {
    left: 12px;
    top: 12px;
  }
}

@media (max-width: 480px) {
  .mode-pip,
  .mode-quarter {
    width: 56%;
    min-width: 150px;
  }
}
