:root { color-scheme: dark; }

/* Container should obey parent width, and keep a strict 16:9 aspect ratio */
.vvp-wrap { width: 100%; max-width: 100%; margin: 0 auto; }

/* Use aspect-ratio when available; fallback uses padding-top technique */
.vvp-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
}

/* Fallback for older browsers without aspect-ratio support */
@supports not (aspect-ratio: 16 / 9) {
  .vvp-video-wrap::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 9/16 */
  }
  .vvp-video-wrap > * {
    position: absolute;
    inset: 0;
  }
}

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

/* Cover overlay */
.vvp-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.vvp-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vvp-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  background: radial-gradient(1200px 500px at 10% 20%, rgba(255,255,255,0.12), transparent),
              radial-gradient(900px 500px at 80% 30%, rgba(255,255,255,0.08), transparent),
              #0b1220;
}

.vvp-cover-play {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.55));
  transform: translateZ(0);
  transition: transform .12s ease;
}
.vvp-cover:hover .vvp-cover-play { transform: scale(1.04); }
.vvp-cover:active .vvp-cover-play { transform: scale(0.98); }

/* Debug overlay */
.vvp-overlay {
  position: absolute;
  left: 12px;
  top: 12px;
  right: 12px;
  z-index: 4;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
}

.vvp-badge {
  pointer-events: none;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  color: #e6edf6;
  font-weight: 650;
  line-height: 1.25;
  max-width: 78%;
  word-break: break-word;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.vvp-badge small { display:block; opacity:.85; font-weight:500; margin-top:4px; }
.vvp-err { margin-top: 6px; font-weight: 650; color: #ffb4b4; }

/* Controls */
.vvp-controls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  pointer-events: auto;
}

.vvp-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.10);
  color: #e6edf6;
  font-weight: 650;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.vvp-btn:hover { background: rgba(255,255,255,0.16); }
.vvp-btn:active { transform: translateY(1px); }

.vvp-hint {
  margin-left: auto;
  opacity: .75;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  pointer-events: none;
  color: #e6edf6;
}

.vvp-topradio-error {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 0, 0, 0.08);
  color: #ffd0d0;
  font-weight: 700;
}
