/**
 * 광고 슬롯 스타일
 * - 플레이스홀더 모드: 점선 테두리로 광고 영역 표시
 * - 실제 광고 모드: 플레이스홀더 숨기고 광고 표시
 */

/* ===== 공통 광고 컨테이너 ===== */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ad-slot.ad-live {
  border: none;
  background: transparent;
}

.ad-slot.ad-live .ad-placeholder {
  display: none;
}

/* ===== 플레이스홀더 스타일 ===== */
.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  color: #adb5bd;
  font-size: 13px;
  font-weight: 600;
}

.ad-placeholder-icon {
  font-size: 24px;
  opacity: 0.6;
}

.ad-placeholder-text {
  font-size: 12px;
  color: #868e96;
}

.ad-placeholder-size {
  font-size: 10px;
  color: #adb5bd;
  background: rgba(0,0,0,0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== 1. 헤더 하단 배너 ===== */
.ad-banner-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
}

.ad-banner-header .ad-slot {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 0 auto;
}

/* 모바일 */
@media (max-width: 768px) {
  .ad-banner-header {
    padding: 12px 16px;
  }

  .ad-banner-header .ad-slot {
    max-width: 320px;
    height: 100px;
  }
}

/* ===== 2. 네이티브 광고 카드 ===== */
.ad-card-native {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 20px;
  border: 2px dashed #dee2e6;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.ad-card-native:hover {
  border-color: #adb5bd;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.ad-card-native.ad-live {
  border: none;
  background: white;
}

.ad-card-native .ad-placeholder {
  padding: 32px;
}

.ad-card-native .ad-placeholder-icon {
  font-size: 36px;
}

.ad-card-native .ad-placeholder-text {
  font-size: 14px;
  max-width: 200px;
  line-height: 1.5;
}

/* ===== 3. 스토리 마지막 스폰서 페이지 ===== */
.ad-sponsor-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  background: linear-gradient(180deg, #fef9f0 0%, #fff 50%, #f8f9fa 100%);
  height: 100%;
}

.ad-sponsor-page .ad-slot {
  width: 100%;
  max-width: 300px;
  height: 250px;
  margin-bottom: 24px;
}

.ad-sponsor-page .ad-placeholder-icon {
  font-size: 48px;
}

.ad-sponsor-thank {
  font-size: 14px;
  color: #888;
  margin-bottom: 16px;
}

.ad-sponsor-cta {
  margin-top: 20px;
}

.ad-sponsor-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  text-decoration: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
}

.ad-sponsor-home-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* ===== 개발 모드 표시 ===== */
.ad-slot[data-ad-debug="true"]::after {
  content: attr(data-slot-id);
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  background: #ff6b6b;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
}

/* ===== 광고 로딩 애니메이션 ===== */
.ad-slot.ad-loading .ad-placeholder {
  animation: adPulse 1.5s ease-in-out infinite;
}

@keyframes adPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ===== 반응형 숨김 (필요시) ===== */
.ad-hide-mobile {
  display: flex;
}

@media (max-width: 768px) {
  .ad-hide-mobile {
    display: none;
  }
}

.ad-hide-desktop {
  display: none;
}

@media (max-width: 768px) {
  .ad-hide-desktop {
    display: flex;
  }
}
