@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --col-black-1: #111111;
  --col-black-2: #000000;
  --col-black-3: #222222;
  --col-white-1: #ffffff;
  --col-yellow-1: #f1c125;
  --col-pink-1: #ec316a;
  --col-blue-1: #007bff;
  --col-grey-1: #8c8c8c;
  --col-grey-2: #333333;
}

body {
  font-family: "Open Sans", sans-serif;
  background-color: var(--col-black-2);
  color: var(--col-white-1);
  overflow: hidden;
}

section,
.section {
  width: 100%;
  padding: 0 20px;
}

.container {
  width: 1110px;
  max-width: 100%;
  margin: 0 auto;
}

h1,
h2,
h3,
h4 {
  font-family: "Roboto", sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER START */
#header-section {
  background-color: var(--col-black-1);
  padding-top: 15px;
}

.logo-img {
  height: 75px;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.header-content-row-1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px; /* Sedikit padding agar tidak terlalu mepet */
}

.header-content-row-2 {
  width: 100%;
  padding: 14px 20px;
  background-color: #252525;
}

.menu-wr {
  width: 1110px;
  margin: 0 auto;
}

.menu-wr ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.menu-wr ul li a {
  color: var(--col-yellow-1);
  font-weight: 600;
  font-size: 14px;
  display: block;
  transition: background-color 0.3s;
}

.menu-wr ul li a:hover {
  background-color: var(--col-pink-1);
}
#search-input {
  background-color: var(--col-black-2);
  border: 1px solid var(--col-grey-2);
  color: var(--col-white-1);
  padding: 8px 12px;
  width: 250px;
  border-radius: 4px;
}

/* HEADER END */

/* MAIN CONTENT (SECTION 2) START */
#main-section {
  padding-top: 20px;
  padding-bottom: 40px;
}

.download-banner {
  background-color: var(--col-black-1);
  text-align: center;
  padding: 10px;
  border: 1px solid var(--col-yellow-1);
  margin-bottom: 20px;
}

.download-banner p {
  color: var(--col-yellow-1);
  font-weight: 600;
  font-size: 14px;
}

.main-content-grid {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 20px;
}

.ad-column,
.video-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ad-banner img,
.top-ad-banner img,
.video-thumbnail {
  width: 100%;
  display: block;
  border-radius: 5px;
}

.video-thumbnail {
  filter: blur(16px);
  transition: filter 0.3s ease;
  -webkit-filter: blur(16px);
}

.top-ad-banner img {
  margin-bottom: 20px;
}

.video-player-wrapper {
  position: relative;
  cursor: pointer;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70px;
  height: 70px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  border: 3px solid var(--col-white-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.video-player-wrapper:hover .play-button {
  background-color: #f07266;
}

/* NEW ROWS */
/* Gaya untuk elemen loader */
.loader {
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 255, 255, 0.3); /* Warna dasar lingkaran */
  border-top-color: var(--col-white-1); /* Warna bagian yang berputar */
  border-radius: 50%;
  display: none; /* Sembunyikan secara default */
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Saat tombol play dalam mode 'loading' */
.play-button.loading .loader {
  display: block; /* Tampilkan loader */
}

.play-button.loading::after {
  display: none; /* Sembunyikan ikon segitiga play */
}
/* NEW ROWS END */

/* Segitiga play */
.play-button::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent var(--col-white-1);
  margin-left: 5px;
}

.video-controls {
  background-color: var(--col-pink-1);
  padding: 10px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.control-btn {
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--col-white-1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  display: flex; /* Untuk ikon dan teks */
  align-items: center;
  gap: 8px; /* Jarak antara ikon dan teks */
  transition: background-color 0.3s;
}
.control-btn:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

.video-info h1 {
  font-size: 24px;
  margin-bottom: 10px;
}

.rating {
  margin-bottom: 15px;
}

.rating span {
  color: var(--col-yellow-1);
  font-size: 20px;
}

.description {
  color: var(--col-grey-1);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 15px;
}

.video-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--col-grey-1);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--col-grey-2);
}

.share-btn {
  background-color: var(--col-grey-2);
  color: var(--col-white-1);
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-section input {
  width: 100%;
  background-color: var(--col-black-1);
  border: 1px solid var(--col-grey-2);
  padding: 12px;
  border-radius: 4px;
  color: var(--col-white-1);
  margin-bottom: 10px;
}

.comment-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--col-grey-1);
}

.comment-info a {
  color: var(--col-pink-1);
  font-weight: 600;
}
/* MAIN CONTENT (SECTION 2) END */

/* FOOTER START */
#footer-section {
  background-color: var(--col-black-1);
  padding: 20px;
  border-top: 1px solid var(--col-grey-2);
  margin-top: 20px;
}

#footer-section p {
  text-align: center;
  color: var(--col-grey-1);
  font-size: 14px;
}
/* FOOTER END */

/* POPUP */

/* ==================================== */
/* GAYA UNTUK POPUP BARU */
/* ==================================== */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none; /* Sembunyi secara default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  display: block;
  opacity: 1;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 8px;
  z-index: 1001;
  width: 450px;
  max-width: 100%;
  display: none; /* Sembunyi secara default */
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.popup.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.popup-content {
  position: relative;
  text-align: center;
}

.popup-content h2 {
  color: var(--col-yellow-1);
  margin-top: 0;
  margin-bottom: 15px;
}

.popup-content p {
  color: var(--col-white-1);
  margin-bottom: 20px;
}

.popup-content img {
  max-width: 100%;
  border-radius: 5px;
}

.close-btn {
  position: absolute;
  top: -30px;
  right: -30px;
  background: var(--col-white-1);
  color: var(--col-black-2);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 28px;
  cursor: pointer;
  font-weight: bold;
}

/* =================================================================== */
/* RESPONSIVE STYLES */
/* =================================================================== */

/* Untuk Tablet dan layar yang lebih kecil (di bawah 992px) */
@media (max-width: 992px) {
  .container,
  .menu-wr {
    width: 100%;
  }

  .main-content-grid {
    grid-template-columns: 1fr;
  }

  .menu-wr ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
  }

  .header-content-row-1 {
    flex-direction: column;
    padding-bottom: 15px;
  }
}

/* Untuk Mobile (di bawah 768px) */
@media (max-width: 768px) {
  .ad-column {
    display: none;
  }

  section,
  .section {
    padding: 0 15px;
  }

  .header-content-row-2 {
    padding: 14px 15px;
  }

  .video-info h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  .description {
    font-size: 14px;
  }

  .video-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .popup {
    padding: 25px 20px;
    width: 95%;
  }

  .close-btn {
    top: -15px;
    right: -10px;
  }
}
