:root {
  color-scheme: dark;
  --gold: #f5c847;
  --magenta: #cf2778;
  --ink: #08080b;
  --white: #fff;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: transparent;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button, input { font: inherit; }

.player {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 230px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 20%, rgba(207, 39, 120, .32), transparent 35%),
    radial-gradient(circle at 80% 75%, rgba(245, 200, 71, .18), transparent 32%),
    linear-gradient(135deg, #16131d, var(--ink) 70%);
  color: var(--white);
}

.player::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.45), transparent 30%, transparent 55%, rgba(0,0,0,.72));
}

video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.ambient {
  position: absolute;
  inset: -20%;
  z-index: 0;
  filter: blur(70px);
  opacity: .34;
  background: conic-gradient(from 180deg at 50% 50%, var(--magenta), #32207a, var(--gold), var(--magenta));
  animation: drift 14s ease-in-out infinite alternate;
}

.topbar {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(14px, 3vw, 28px);
  transition: opacity .25s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.45));
}

.brand-logo {
  display: block;
  width: auto;
  height: clamp(48px, 7vw, 70px);
  object-fit: contain;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(12,12,16,.6);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff375f;
  box-shadow: 0 0 0 4px rgba(255,55,95,.18);
  animation: pulse 1.8s ease-out infinite;
}

.hero-play {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translate(-50%, -50%);
  padding: 10px 20px 10px 10px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: #fff;
  background: rgba(8,8,11,.62);
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
}

.hero-play:hover { transform: translate(-50%, -50%) scale(1.04); background: rgba(17,15,22,.78); }
.hero-play.hidden { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.92); }

.hero-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #efa541 55%, var(--magenta));
  box-shadow: 0 8px 24px rgba(207,39,120,.35);
  position: relative;
}

.hero-icon::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 15px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #161018;
}

.hero-copy { display: grid; gap: 2px; text-align: left; }
.hero-copy strong { font-size: 14px; letter-spacing: .01em; }
.hero-copy small { color: rgba(255,255,255,.62); font-size: 9px; font-weight: 800; letter-spacing: .18em; }

.state {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 76px;
  display: none;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(8,8,11,.72);
  color: rgba(255,255,255,.78);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  font-size: 12px;
}

.state.visible { display: flex; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.25); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
.state.error .spinner { display: none; }

.controls {
  position: absolute;
  z-index: 5;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 20px clamp(12px, 2.5vw, 24px) clamp(12px, 2.5vw, 22px);
  transition: opacity .25s ease, transform .25s ease;
}

.player.idle.playing .controls { opacity: 0; transform: translateY(8px); }
.player.idle.playing .topbar { opacity: 0; }

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.icon-button:hover { background: rgba(255,255,255,.13); transform: scale(1.05); }
.icon-button svg { width: 22px; height: 22px; fill: currentColor; }
.pause-svg, .muted-svg { display: none; }
.player.playing .play-svg { display: none; }
.player.playing .pause-svg { display: block; }
.player.muted .volume-svg { display: none; }
.player.muted .muted-svg { display: block; }

.volume-wrap { display: flex; align-items: center; }
.volume {
  width: 76px;
  accent-color: var(--gold);
  cursor: pointer;
}
.spacer { flex: 1; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,55,95,.45); } 70%,100% { box-shadow: 0 0 0 7px rgba(255,55,95,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translate3d(6%, -4%, 0) rotate(18deg) scale(1.08); } }

@media (max-width: 520px) {
  .player { min-height: 190px; }
  .brand-logo { height: 43px; }
  .live-pill { min-height: 32px; padding: 0 11px; font-size: 9px; }
  .hero-icon { width: 42px; height: 42px; }
  .hero-icon::after { left: 18px; top: 13px; }
  .hero-play { gap: 10px; padding-right: 16px; }
  .volume { display: none; }
  .pip-button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
