:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #000;
  color: #fff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-height: 100vh; }
[hidden] { display: none !important; }

/* Layar preview pertama, 9:16 seperti source asli. */
.preview-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.preview-card {
  position: relative;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.preview-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(.90);
  pointer-events: none;
}
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgb(0 0 0 / 72%);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  z-index: 2;
  transition: background .2s ease, scale .2s ease;
}
.play-button:hover, .play-button:focus-visible {
  background: rgb(255 255 255 / 20%);
  scale: 1.08;
}
.play-button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.play-triangle {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid #fff;
}
.video-title, .preview-message {
  position: absolute;
  left: 12px;
  padding: 7px 10px;
  border-radius: 5px;
  background: rgb(0 0 0 / 65%);
  color: #fff;
  font-size: 13px;
  z-index: 2;
}
.video-title {
  bottom: 12px;
  margin: 0;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-message {
  top: 12px;
  right: 12px;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 480px) {
  .preview-card { max-width: 350px; border-radius: 4px; }
  .play-button { width: 54px; height: 54px; }
  .play-triangle {
    border-top-width: 11px;
    border-bottom-width: 11px;
    border-left-width: 17px;
  }
}

.popup-message {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 3;
  padding: 10px;
  margin: 0;
  border-radius: 5px;
  background: rgb(70 20 20 / 95%);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
}
