/* 大众传媒 · 广告位排版（position: home | browse | watch | float） */

.dz-ad-banner-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 12px;
  padding: 0 12px;
  box-sizing: border-box;
}

.dz-ad-banner-wrap:empty,
.dz-ad-banner-wrap.is-hidden {
  display: none !important;
}

.dz-ad-banner {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dz-ad-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: cover;
}

.dz-ad-banner--text {
  padding: 14px 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
}

.dz-ad-banner--text:hover {
  filter: brightness(1.08);
}

.dz-ad-label {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.dz-ad-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.dz-ad-carousel .dz-ad-banner {
  flex: 0 0 min(100%, 360px);
  scroll-snap-align: start;
}

.dz-ad-float {
  position: fixed;
  bottom: 88px;
  right: 16px;
  z-index: 9000;
  width: min(300px, calc(100vw - 32px));
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.45);
  animation: dzAdFloatIn 0.45s ease-out;
}

.dz-ad-float.is-closed {
  display: none;
}

.dz-ad-float-inner {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dz-ad-float img {
  width: 100%;
  display: block;
  max-height: 140px;
  object-fit: cover;
}

.dz-ad-float-body {
  padding: 12px 14px;
  color: #fff;
}

.dz-ad-float-title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 8px;
}

.dz-ad-float-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #667eea;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.dz-ad-float-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

@keyframes dzAdFloatIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pre-roll */
.preroll-wrapper {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
}

.preroll-countdown {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: #fff;
  font-size: 13px;
}

.preroll-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  margin-bottom: 6px;
  overflow: hidden;
}

.preroll-progress-bar {
  height: 100%;
  width: 0;
  background: #667eea;
  transition: width 0.3s linear;
}

.preroll-skip {
  margin-left: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

@media (max-width: 768px) {
  .dz-ad-float {
    bottom: 72px;
    right: 10px;
    width: min(260px, calc(100vw - 20px));
  }

  .dz-ad-banner img {
    max-height: 90px;
  }
}
