.video-player-widget {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  border: 1px solid rgba(255,255,255,0.2);
  overflow: hidden;
  font-family: "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  padding: 15px;
  width: 100%;
  box-sizing: border-box;
}
    
.video-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden; /* keep clipping for the video area */
}

.video-thumb {
  position: absolute;
  inset: 0;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.video-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  animation: pulseGlow 2s infinite ease-in-out;
}

.video-thumb::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 22px solid white;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  transform: translate(-40%, -50%);
  z-index: 2;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 0 0 25px rgba(0, 195, 255, 0.7); }
  100% { box-shadow: 0 0 15px rgba(0, 0, 0, 0.4); }
}

.video-thumb.hidden {
  opacity: 0;
  pointer-events: none;
}

.video-container > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: none;
}

.video-container > iframe.active {
  display: block;
}

/* --- Controls & buttons --- */
.controls {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  gap: 10px;
  padding: 10px;
}

.collapse-btn {
  flex: 1;
  max-width: 48%;
  padding: 15px 0;
  background: #050505;
  color: #fff;
  border: none;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.collapse-btn:hover {
  background: #00c3ff;
  box-shadow: 0 0 15px #00c3ff;
}


.collapse-btn.active {
  background: #00c3ff;
  box-shadow: 0 0 20px #00c3ff;
  animation: glowPulse 2s infinite ease-in-out;
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 10px #00c3ff; }
  50% { box-shadow: 0 0 25px #00c3ff; }
  100% { box-shadow: 0 0 10px #00c3ff; }
}

.collapse {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
  width: 100%;
  max-width: 720px;
  margin-top: 10px;
}

.collapse.active {
  max-height: 200px;
  opacity: 1;
}

.server-options, .download-options {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
}

.server-btn, .download-btn {
  padding: 10px 20px;
  background: #E7180B;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.server-btn.active, .server-btn:hover,
.download-btn:hover {
  background: #00c3ff;
  box-shadow: 0 0 10px #00c3ff;
}

/* -----------------------------------------------------------
   EXCEPTION FOR BANNER ADS (force-visible + prefer safe parents)
   Put this near the end of your CSS file so it overrides earlier rules
   ----------------------------------------------------------- */

/* wrapper class you can add around ad script in HTML (optional but recommended) */
.banner-ads {
  display: block;
  text-align: left;
  margin: 8px auto;
  overflow: visible; /* allow iframe to show */
}

/* specific rules for the ad iframe — keep wide matching for nested variants */
iframe[src*="highperformanceformat"],
iframe[src*="highperformanceformat.com"],
iframe[data-src*="highperformanceformat"],
iframe[title*="highperformanceformat"] {
  display: block !important;
  visibility: visible !important;
  width: 300px !important;
  height: 250px !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  position: relative !important;
  z-index: 9999 !important;
  margin: 8px auto !important;
}

/* If ad got injected inside a clipped parent, allow visibility on common parents */
.video-player-widget iframe[src*="highperformanceformat"],
.video-container iframe[src*="highperformanceformat"] {
  display: block !important;
  position: relative !important;
  z-index: 9999 !important;
}

/* fallback: make sure any direct children of .banner-ads are visible */
.banner-ads > iframe,
.banner-ads * {
  overflow: visible !important;
}