:root {
  --bg-dark: #f7f8fc;
  --bg-card: #ffffff;
  --text-main: #18202a;
  --text-muted: #667085;
  --accent: #e50914; /* Netflix red vibe for comedy */
  --accent-hover: #b80710;
  --glass-bg: rgba(247, 248, 252, 0.82);
  --glass-border: rgba(15, 23, 42, 0.08);
}

body.theme-dark {
  --bg-dark: #0f1218;
  --bg-card: #171b24;
  --text-main: #f3f6fb;
  --text-muted: #a8b3c5;
  --glass-bg: rgba(15, 18, 24, 0.82);
  --glass-border: rgba(255, 255, 255, 0.08);
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.04) 75%);
}

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

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-dark);
  background-image:
    linear-gradient(45deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(15, 23, 42, 0.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(15, 23, 42, 0.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(15, 23, 42, 0.03) 75%);
  background-size: 40px 40px;
  background-position:
    0 0,
    0 20px,
    20px -20px,
    -20px 0px;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Hero Section */
.hero {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(to bottom, rgba(247, 248, 252, 0.15), var(--bg-dark)),
    url("https://images.unsplash.com/photo-1585699324551-f6c309eedeca?q=80&w=2070&auto=format&fit=crop")
      no-repeat center center/cover;
  position: relative;
}

.theme-dark .hero {
  background:
    linear-gradient(to bottom, rgba(15, 18, 24, 0.12), var(--bg-dark)),
    url("https://images.unsplash.com/photo-1585699324551-f6c309eedeca?q=80&w=2070&auto=format&fit=crop")
      no-repeat center center/cover;
}

.hero-content {
  z-index: 2;
  animation: fadeIn 1s ease-out;
}

.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
}

.theme-dark .theme-toggle {
  background: #202635;
  color: #f3f6fb;
  border-color: rgba(255, 255, 255, 0.1);
}

.hero h1 {
  font-family: "Outfit", sans-serif;
  font-size: 5rem;
  letter-spacing: -2px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.5rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Main Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.gallery-section h2 {
  font-family: "Outfit", sans-serif;
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: left;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 10px;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.video-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid var(--glass-border);
  position: relative;
}

.video-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  border-color: var(--accent);
}

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-thumbnail {
  opacity: 0.7;
}

.play-icon {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--text-main);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  background: rgba(229, 9, 20, 0.8);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px; /* Visual center adjustment for play icon */
}

.video-card:hover .play-icon {
  opacity: 1;
  top: 40%; /* slightly drop down */
}

.video-info {
  padding: 20px;
}

.video-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-platform {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
}

.platform-drive {
  color: #1fa463;
}
.platform-bunny {
  color: #ff8800;
}

/* Modal */
.modal {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--glass-bg);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-dark);
  width: 90%;
  max-width: 1000px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  position: relative;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  overflow: hidden;
}

.modal.show .modal-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--text-main);
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: var(--accent);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  width: 100%;
  background: #e9edf5;
}

.theme-dark .video-container {
  background: #0f131b;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* Premium Popup Styling */
.popup-content {
  text-align: center;
  padding: 50px 40px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(242, 245, 250, 0.98) 100%
  );
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-top: 1px solid rgba(229, 9, 20, 0.4);
  box-shadow:
    0 30px 60px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  max-width: 480px;
}

.theme-dark .popup-content {
  background: linear-gradient(
    145deg,
    rgba(23, 27, 36, 0.98) 0%,
    rgba(15, 18, 24, 0.98) 100%
  );
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.popup-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.08);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.12);
}

.notif-icon {
  background: rgba(31, 164, 99, 0.08);
  color: #1fa463;
  box-shadow: 0 0 20px rgba(31, 164, 99, 0.12);
  border-top: 1px solid rgba(31, 164, 99, 0.4);
}

/* Specific Top Border for Notification Modal */
#notification-modal .popup-content {
  border-top: 1px solid rgba(31, 164, 99, 0.5);
}

.popup-content h2 {
  color: var(--text-main);
  margin-bottom: 15px;
  font-family: "Outfit", sans-serif;
  font-size: 2.2rem;
  letter-spacing: -0.5px;
}

.popup-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.6;
}

.popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--accent);
  color: var(--text-main);
  text-decoration: none;
  padding: 16px 30px;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(229, 9, 20, 0.18);
  font-family: "Inter", sans-serif;
}

.popup-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(229, 9, 20, 0.24);
}

.notif-icon ~ .popup-btn {
  background: #1fa463;
  box-shadow: 0 10px 20px rgba(31, 164, 99, 0.18);
}

.notif-icon ~ .popup-btn:hover {
  background: #1a8f55;
  box-shadow: 0 15px 30px rgba(31, 164, 99, 0.24);
}

.popup-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--accent);
  margin-top: 25px;
  font-size: 0.95rem;
  background: rgba(229, 9, 20, 0.08);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(229, 9, 20, 0.2);
  text-align: left;
}

/* Sponsored Ad Section */
.ad-section {
  margin-bottom: 60px;
  animation: fadeIn 1s ease-out;
}

.ad-banner {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(247, 248, 252, 0.96) 100%
  );
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 35px 40px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    0 0 40px rgba(229, 9, 20, 0.04);
  transition:
    transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.theme-dark .ad-banner {
  background: linear-gradient(
    135deg,
    rgba(23, 27, 36, 0.96) 0%,
    rgba(15, 18, 24, 0.96) 100%
  );
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    0 0 40px rgba(229, 9, 20, 0.05);
}

.ad-banner:hover {
  transform: translateY(-4px);
  border-color: rgba(229, 9, 20, 0.4);
  box-shadow:
    0 15px 40px rgba(15, 23, 42, 0.1),
    0 0 50px rgba(229, 9, 20, 0.1);
}

.ad-badge {
  position: absolute;
  top: 15px;
  left: 20px;
  background: var(--accent);
  color: var(--text-main);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.4);
}

.ad-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 10px;
}

.ad-text {
  flex: 1;
}

.ad-text h3 {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.ad-text p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 650px;
  line-height: 1.6;
}

.ad-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--text-main);
  text-decoration: none;
  padding: 12px 28px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.3);
}

.ad-button:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.4);
}

.ad-arrow {
  transition: transform 0.2s ease;
}

.ad-button:hover .ad-arrow {
  transform: translateX(4px);
}

.ad-visual {
  width: 240px;
  height: 160px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ad-banner:hover .ad-image {
  transform: scale(1.08);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .theme-toggle {
    top: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 0.9rem;
  }
  .hero h1 {
    font-size: 3.5rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  .gallery-section h2 {
    font-size: 2rem;
  }
  .close-btn {
    top: 10px;
    right: 15px;
    z-index: 10;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
  }
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  .container {
    padding: 40px 15px;
  }

  /* Ad responsiveness */
  .ad-body {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 20px;
  }
  .ad-visual {
    width: 100%;
    height: 180px;
  }
  .ad-text h3 {
    font-size: 1.6rem;
  }
  .ad-banner {
    padding: 25px 20px;
    margin-top: 15px;
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    top: 12px;
    right: 12px;
    padding: 7px 12px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
  .video-info {
    padding: 15px;
  }
  .video-title {
    font-size: 1.1rem;
  }

  /* Ad mobile adjustments */
  .ad-text h3 {
    font-size: 1.4rem;
  }
  .ad-text p {
    font-size: 0.95rem;
    margin-bottom: 18px;
  }
}

/* Utility to hide content when blocked */
.content-hidden > main,
.content-hidden > header,
.content-hidden > footer {
  display: none !important;
}
