/**
 * 广告样式 - 不烦人的广告设计
 * 穿山甲（字节）+ 优量汇（腾讯）
 */

/* ===== 底部固定广告位 ===== */
.ad-bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.95) 0%, rgba(26, 26, 46, 1) 100%);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(212, 165, 116, 0.2);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

.ad-bottom-banner.hidden {
  transform: translateY(100%);
}

.ad-container {
  width: 100%;
  max-width: 320px;
  min-height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 广告标签 */
.ad-label {
  position: absolute;
  top: 2px;
  right: 8px;
  font-size: 10px;
  color: rgba(212, 165, 116, 0.5);
  letter-spacing: 0.5px;
}

/* 关闭按钮 */
.ad-close-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ad-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ===== 内容区原生广告 ===== */
.ad-native-card {
  margin: 16px 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 165, 116, 0.15);
  border-radius: 12px;
  position: relative;
}

.ad-native-card .ad-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(212, 165, 116, 0.2);
  color: #d4a574;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.ad-native-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ad-native-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #8b4513, #a0522d);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.ad-native-text {
  flex: 1;
}

.ad-native-title {
  font-size: 14px;
  color: #e8d5b7;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
}

.ad-native-desc {
  font-size: 12px;
  color: rgba(232, 213, 183, 0.6);
  line-height: 1.4;
}

.ad-native-cta {
  margin-top: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #8b4513, #a0522d);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.ad-native-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

/* ===== 激励广告弹窗 ===== */
.ad-reward-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ad-reward-modal.show {
  display: flex;
}

.ad-reward-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 20px;
  padding: 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}

.ad-reward-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #e94560, #c0392b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.ad-reward-title {
  font-size: 18px;
  color: #e8d5b7;
  font-weight: 600;
  margin-bottom: 8px;
}

.ad-reward-desc {
  font-size: 14px;
  color: rgba(232, 213, 183, 0.7);
  margin-bottom: 20px;
  line-height: 1.5;
}

.ad-reward-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ad-reward-watch {
  padding: 14px;
  background: linear-gradient(135deg, #e94560, #c0392b);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ad-reward-watch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

.ad-reward-skip {
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: 12px;
  color: rgba(232, 213, 183, 0.6);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ad-reward-skip:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e8d5b7;
}

/* ===== 倒计时 ===== */
.ad-countdown {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(233, 69, 96, 0.9);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  z-index: 10000;
  display: none;
}

.ad-countdown.show {
  display: block;
}

/* ===== 为广告预留底部空间 ===== */
body.has-bottom-ad {
  padding-bottom: 70px;
}

/* ===== 响应式 ===== */
@media (max-width: 375px) {
  .ad-bottom-banner {
    padding: 6px 10px;
  }
  
  .ad-container {
    min-height: 45px;
  }
  
  .ad-native-card {
    margin: 12px 16px;
    padding: 12px;
  }
}

/* ===== 暗色主题适配 ===== */
.dark-theme .ad-native-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===== 广告加载占位 ===== */
.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  color: rgba(212, 165, 116, 0.4);
  font-size: 12px;
}

.ad-placeholder::before {
  content: "广告加载中...";
}
