/* 🔧 Reset Dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 🧍 Body Layout */
body {
  font-family: 'Roboto', Arial, sans-serif;
  background: linear-gradient(to right, #5a189a, #240046);
  color: white;
  margin: 0;
  padding: 0;
  height: 100vh;
}

/* 🎥 Container Video Player */
.video-player {
  position: relative;
  width: 80%;
  max-width: 860px;
  height: 480px;
  background-color: #000;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 1;
}

/* 🎞️ Video Element */
.video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

/* ▶️ Tombol Play Tengah */
#centerPlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  cursor: pointer;
}
#centerPlay img {
  width: 80px;
  height: auto;
  transition: transform 0.2s ease;
}
#centerPlay img:hover {
  transform: scale(1.1);
}

/* ⏳ Loading Indicator */
#loadingIndicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  padding: 20px;
  border-radius: 8px;
  display: none;
}
#loadingIndicator img {
  width: 64px;
  height: 64px;
}

/* 💬 Popup Message */
#popupMessage {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  background: #fff;
  border: 2px solid #333;
  padding: 20px;
  z-index: 9998;
  display: none;
}
.popup-content button {
  margin-top: 10px;
}

/* 🔴 Indikator LIVE */
.live-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: sans-serif;
  font-size: 12px;
  color: white;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
}

.red-dot {
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  animation: blinkRed 1s infinite;
}

@keyframes blinkRed {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}



/* 📊 Progress Bar */
.progress-container {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  z-index: 4;
}
.progress {
  width: 0%;
  height: 100%;
  background: red;
  border-radius: 5px;
}
.progress-thumb {
  position: absolute;
  top: -5px;
  left: -7.5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: red;
}

/* 🎛️ Media Controls */
#mediaControls {
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  z-index: 5;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px 0;
  border-radius: 0;
  gap: 0;
}
#mediaControls .control-btn {
  background: none;
  border: none;
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
#mediaControls .control-btn img {
  width: 30px;
  height: 30px;
  transition: transform 0.2s ease;
}
#mediaControls .control-btn:hover img {
  transform: scale(1.1);
}

/* 🧊 Overlay dan Popup */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  pointer-events: auto;
}
.popup {
  display: none;
  position: fixed;
  top: 43%; left: 50%;
  transform: translate(-50%, -50%);
  width: 560px; height: 280px;
  max-width: 90%;
  background: url("../img/pop.png") center center no-repeat;
  background-size: cover;
  backdrop-filter: blur(4px);
  padding: 24px;
  text-align: center;
  z-index: 999;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.1);
  pointer-events: auto;
}
.popup p {
  font-size: 18px;
  color: white;
  text-shadow: 4px 4px 9px rgba(0, 0, 0, 0.5);
  font-weight: bold;
  margin-bottom: 20px;
}
.popup-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}
.popup-buttons button {
  width: 20%;
  background: #240046;
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
}
.popup-buttons button:hover {
  background: darkred;
  transform: scale(1.05);
}

/* 📱 Modul Responsif Mobile */
@media (max-width: 768px) {
  .video-player {
    width: 95%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
  }

  #centerPlay img {
    width: 60px;
  }

  #loadingIndicator img {
    width: 48px;
    height: 48px;
  }

  #mediaControls {
    flex-wrap: wrap;
    padding: 8px 0;
    gap: 12px;
  }

  #mediaControls .control-btn img {
    width: 24px;
    height: 24px;
  }

  .progress-container {
    bottom: 60px;
    height: 5px;
  }

  .popup {
    width: 90%;
    height: auto;
    padding: 16px;
  }

  .popup p {
    font-size: 16px;
  }

  .popup-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .popup-buttons button {
    width: 100%;
    font-size: 14px;
    padding: 10px;
  }

  .live-indicator {
    font-size: 10px;
    padding: 2px 6px;
    gap: 4px;
  }

  .live-indicator .dot {
    width: 6px;
    height: 6px;
  }
}
/* ❌ Tombol Close Popup */
#closePopup {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.3s ease;
}
#closePopup:hover {
  background: rgba(255, 0, 0, 0.6);
}

/* 🧊 Overlay Aktif */
.overlay.active {
  display: block;
}

/* 🧊 Popup Aktif */
.popup.active {
  display: block;
}

/* 📱 Responsif Tombol Close */
@media (max-width: 768px) {
  #closePopup {
    top: 8px;
    right: 8px;
    font-size: 20px;
    padding: 2px 6px;
  }
}
.player-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
}

.logo {
  height: 40px;
}

.title {
  font-size: 20px;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.header-btn {
  background: #240046;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.header-btn:hover {
  background: darkred;
}
@media (max-width: 768px) {
  /* Header */
  #header .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #site-logo img {
    height: 32px;
  }

  /* Navigasi vertikal */
  .nav-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  /* Tombol login/register */
  .auth-buttons {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  /* Search bar */
  .searchform {
    flex-direction: column;
    gap: 8px;
  }

  .search-text,
  .search-submit {
    width: 100%;
  }

  /* Video player */
  .video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
  }

  /* Footer */
  #footer ul {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}

