/**
 * Ads Stylesheet
 * Styling for interstitial and native ad placements
 */

/* ============================================
   INTERSTITIAL ADS (Full-screen overlay)
   ============================================ */

.ad-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ad-interstitial {
  background: #fff;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ad-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f5f5f5;
  border-radius: 16px 16px 0 0;
}

.ad-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ad-label i {
  font-size: 14px;
}

.ad-content {
  padding: 40px 20px;
}

.ad-placeholder {
  text-align: center;
  padding: 20px;
}

.ad-placeholder i.fa-paw {
  color: #ff6b6b;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.ad-placeholder h3 {
  font-size: 24px;
  color: #333;
  margin-bottom: 12px;
  font-weight: 700;
}

.ad-placeholder p {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
}

.ad-placeholder .ad-subtext {
  font-size: 14px;
  color: #999;
  font-style: italic;
}

.upgrade-cta {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.upgrade-cta p {
  font-size: 14px;
  color: #333;
  margin-bottom: 12px;
}

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-upgrade:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  text-decoration: none;
  color: #fff;
}

.btn-upgrade i {
  font-size: 16px;
}

.ad-skip-button {
  width: 100%;
  padding: 16px;
  background: #f5f5f5;
  color: #999;
  border: none;
  border-radius: 0 0 16px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  transition: all 0.3s ease;
}

.ad-skip-button:not(:disabled) {
  background: #ff6b6b;
  color: #fff;
  cursor: pointer;
}

.ad-skip-button:not(:disabled):hover {
  background: #ff5252;
}

.ad-skip-button .countdown {
  font-weight: 700;
}

/* ============================================
   NATIVE ADS (In-feed placement)
   ============================================ */

.ad-native-card {
  border: 2px solid #fff3cd !important;
  background: linear-gradient(to bottom, #fffbf0 0%, #ffffff 100%) !important;
  position: relative;
}

.ad-native-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
  border-radius: 8px 8px 0 0;
}

.ad-native-content {
  width: 100%;
}

.ad-native-content .post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}

.ad-native-content .post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ad-native-content .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}

.ad-native-content .author-info {
  display: flex;
  flex-direction: column;
}

.ad-native-content .author-name {
  font-weight: 700;
  font-size: 16px;
  color: #333;
}

.ad-native-content .post-time {
  font-size: 13px;
  color: #999;
}

.ad-native-content .ad-label {
  background: #fff3cd;
  color: #856404;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ad-media {
  width: 100%;
  background: #f8f9fa;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder-native {
  text-align: center;
  padding: 40px 20px;
}

.ad-placeholder-native i {
  color: #ccc;
  margin-bottom: 20px;
  opacity: 0.5;
}

.ad-placeholder-native h4 {
  font-size: 20px;
  color: #666;
  margin-bottom: 10px;
  font-weight: 600;
}

.ad-placeholder-native p {
  font-size: 14px;
  color: #999;
}

.ad-caption {
  padding: 16px;
}

.ad-caption p {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #333;
}

.ad-caption strong {
  font-weight: 700;
}

.upgrade-link-container {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
}

.upgrade-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.upgrade-link:hover {
  color: #764ba2;
  text-decoration: none;
  gap: 12px;
}

.upgrade-link i {
  font-size: 14px;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
  .ad-interstitial {
    background: #2c2c2c;
    color: #e0e0e0;
  }

  .ad-header {
    background: #1e1e1e;
    border-bottom-color: #444;
  }

  .ad-placeholder h3 {
    color: #e0e0e0;
  }

  .ad-placeholder p {
    color: #aaa;
  }

  .upgrade-cta {
    border-top-color: #444;
  }

  .ad-skip-button {
    background: #3a3a3a;
    color: #aaa;
  }

  .ad-native-card {
    background: linear-gradient(
      to bottom,
      #3a3a3a 0%,
      #2c2c2c 100%
    ) !important;
    border-color: #4a4a4a !important;
  }

  .ad-caption p {
    color: #e0e0e0;
  }

  .upgrade-link-container {
    border-top-color: #444;
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .ad-interstitial {
    max-width: 95%;
    max-height: 90vh;
  }

  .ad-placeholder h3 {
    font-size: 20px;
  }

  .ad-placeholder p {
    font-size: 14px;
  }

  .btn-upgrade {
    padding: 10px 20px;
    font-size: 14px;
  }

  .ad-native-content .author-avatar {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .ad-native-content .author-name {
    font-size: 14px;
  }
}
