/**
 * StreamXHub — Download Popup New (Light/Clean Theme)
 * Shows when user clicks to watch a video.
 * Version 2.0
 */

/* ============================================================
   OVERLAY
   ============================================================ */
.download-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.88);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
  pointer-events: auto !important;
}

.download-popup-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.download-popup-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ============================================================
   CONTAINER
   ============================================================ */
.download-popup-container {
  background: #ffffff;
  border-radius: 18px;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  max-width: 480px;
  width: 100%;
  position: relative;
  animation: popupSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overflow: hidden;
  pointer-events: auto !important;
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: scale(0.88) translateY(24px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   CLOSE BUTTON
   ============================================================ */
.download-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.download-popup-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #111;
  transform: rotate(90deg);
}

/* ============================================================
   HEADER
   ============================================================ */
.download-popup-header {
  background: linear-gradient(150deg, #ff0055 0%, #cc0040 100%);
  color: #fff;
  padding: 32px 30px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.download-popup-header::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.popup-icon {
  font-size: 46px;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.popup-title {
  font-size: 23px;
  font-weight: 900;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.popup-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ============================================================
   CONTENT
   ============================================================ */
.download-popup-content { padding: 24px 28px 20px; }

/* Benefits list */
.popup-benefits {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.benefit-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
}

.benefit-item:hover {
  background: rgba(255, 0, 85, 0.04);
  border-color: rgba(255, 0, 85, 0.2);
  transform: translateX(3px);
}

.benefit-icon { font-size: 20px; flex-shrink: 0; line-height: 1.3; }

.benefit-info { flex: 1; }

.benefit-info strong {
  display: block;
  font-size: 13px;
  color: #111;
  margin-bottom: 2px;
  font-weight: 800;
}

.benefit-info p {
  font-size: 12px;
  color: #777;
  margin: 0;
  line-height: 1.45;
}

/* Action buttons */
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease;
  text-decoration: none;
  border: none;
}

.action-button .button-icon { font-size: 20px; flex-shrink: 0; }

.action-button .button-text-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.action-button .button-main  { display: block; font-size: 14px; font-weight: 800; }
.action-button .button-size  { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; }

.action-button.secondary {
  background: #f4f4f6;
  color: #333;
  justify-content: center;
  border: 1px solid #e8e8ec;
}

.action-button.secondary:hover {
  background: #ebebef;
  transform: translateY(-2px);
}

.action-button.primary {
  background: linear-gradient(135deg, #ff0055 0%, #ff4488 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 0, 85, 0.32);
}

.action-button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(255, 0, 85, 0.45);
}

.action-button:active { transform: translateY(0); }

/* Stats */
.popup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
  padding: 14px;
  background: #f7f7fa;
  border-radius: 10px;
}

.stat-item { text-align: center; }

.stat-value {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: #ff0055;
  margin-bottom: 3px;
}

.stat-label {
  display: block;
  font-size: 10px;
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Trust badges */
.trust-section {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 14px 0;
}

.trust-badge {
  display: inline-block;
  padding: 5px 11px;
  background: rgba(0, 200, 100, 0.08);
  border: 1px solid rgba(0, 200, 100, 0.28);
  border-radius: 6px;
  font-size: 11px;
  color: #007a4d;
  font-weight: 700;
  white-space: nowrap;
}

/* System requirements */
.system-requirements {
  text-align: center;
  padding: 13px 16px;
  background: rgba(255, 0, 85, 0.05);
  border: 1px solid rgba(255, 0, 85, 0.18);
  border-radius: 8px;
  margin: 18px 0;
}

.system-requirements p {
  margin: 0;
  color: #cc003f;
  font-weight: 700;
  font-size: 13px;
}

/* Legal */
.popup-legal {
  text-align: center;
  font-size: 10px;
  color: #bbb;
  margin-top: 12px;
  line-height: 1.6;
}

.popup-legal p { margin: 0; }

.popup-legal a {
  color: #ff0055;
  text-decoration: none;
  font-weight: 700;
}

.popup-legal a:hover { text-decoration: underline; }

/* Game section */
.popup-game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  background: rgba(255, 0, 85, 0.04);
  border: 1px solid rgba(255, 0, 85, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.popup-game-section:hover {
  background: rgba(255, 0, 85, 0.09);
  transform: translateY(-2px);
}

.game-thumbnail-wrapper {
  width: 100%;
  max-width: 280px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(255, 0, 85, 0.25);
}

.game-thumbnail {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.popup-game-section:hover .game-thumbnail { transform: scale(1.05); }

.game-info { text-align: center; }
.game-info strong { display: block; font-size: 14px; color: #ff0055; font-weight: 900; margin-bottom: 4px; }
.game-info p { font-size: 12px; color: #888; margin: 0; }

/* Hentai / slideshow cards */
.hentai-card { transition: transform 0.3s ease; }
.hentai-card:hover { transform: translateY(-6px); }
.hentai-card img { transition: transform 0.4s ease; display: block; }
.hentai-card:hover img { transform: scale(1.08); }

#hentaiSlideshow { cursor: pointer; }
.hentai-slideshow { cursor: pointer; }

#hentaiSlideshow .slideshow-nav {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  transition: background 0.2s ease;
}

#hentaiSlideshow .slideshow-nav:hover { background: rgba(255, 0, 85, 0.75); }

@media (max-width: 768px) {
  .hentai-slideshow > div { width: 100vw !important; height: 100vh !important; }
  .hentai-slideshow img { object-fit: contain !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .download-popup-container { border-radius: 14px; }
  .download-popup-header { padding: 26px 20px; }
  .popup-icon { font-size: 38px; }
  .popup-title { font-size: 20px; }
  .download-popup-content { padding: 20px 18px; }
  .popup-stats { gap: 8px; padding: 12px; }
  .stat-value { font-size: 14px; }
  .action-button { padding: 12px 14px; }
  .action-button .button-main { font-size: 13px; }
  .trust-badge { padding: 4px 10px; font-size: 10px; }
}

@media (max-width: 400px) {
  .download-popup-close { width: 30px; height: 30px; font-size: 18px; }
  .download-popup-header { padding: 20px 16px; }
  .popup-icon { font-size: 32px; }
  .popup-title { font-size: 18px; }
  .download-popup-content { padding: 16px 14px; }
  .popup-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; }
  .benefit-item { padding: 8px; }
  .action-button { padding: 10px 12px; }
}