/* ==========================================================================
   MultiGame Arcade — Unified Ads & Monetization Stylesheet
   ========================================================================== */

:root {
  --ad-overlay-bg: rgba(7, 8, 18, 0.94);
  --ad-accent: #a855f7;
  --ad-accent-glow: rgba(168, 85, 247, 0.35);
  --ad-gold: #fbbf24;
  --ad-text: #f3f4f6;
  --ad-muted: #9ca3af;
}

/* Simulated Ad Modal Overlay */
.arcade-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--ad-overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: adFadeIn 0.25s ease-out forwards;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ad-text);
  user-select: none;
  -webkit-user-select: none;
}

.arcade-ad-overlay.hidden {
  display: none !important;
}

@keyframes adFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.arcade-ad-container {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(170deg, #18192e 0%, #0d0e1c 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px var(--ad-accent-glow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header with Badge & Timer */
.arcade-ad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.arcade-ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ad-accent);
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
}

.arcade-ad-badge.rewarded {
  color: var(--ad-gold);
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}

.arcade-ad-timer {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ad-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.arcade-ad-timer strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Ad Body / Video Player Simulation */
.arcade-ad-video-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, #26194a 0%, #0c0919 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  overflow: hidden;
}

.arcade-ad-pulse-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px dashed rgba(168, 85, 247, 0.35);
  animation: adRotate 12s linear infinite;
}

@keyframes adRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.arcade-ad-icon {
  font-size: 3.2rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 6px 16px var(--ad-accent-glow));
  animation: adBounce 2s ease-in-out infinite;
}

@keyframes adBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.arcade-ad-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.arcade-ad-subtitle {
  font-size: 0.82rem;
  color: var(--ad-muted);
  max-width: 320px;
  line-height: 1.4;
}

/* Progress bar along bottom of video */
.arcade-ad-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
  width: 0%;
  transition: width 0.1s linear;
}

/* Footer / Action Controls */
.arcade-ad-footer {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
}

.arcade-ad-sponsor-info {
  font-size: 0.72rem;
  color: var(--ad-muted);
}

.arcade-ad-btn-skip,
.arcade-ad-btn-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.arcade-ad-btn-skip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.arcade-ad-btn-skip:not(:disabled):hover,
.arcade-ad-btn-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.arcade-ad-btn-claim {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  animation: adClaimGlow 1.6s ease-in-out infinite alternate;
}

@keyframes adClaimGlow {
  from { box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4); }
  to { box-shadow: 0 6px 22px rgba(16, 185, 129, 0.7); }
}

/* Rewarded Prompt Dialog (e.g., "Out of Moves" or "Need 3 Hints") */
.arcade-reward-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 999990;
  background: rgba(5, 6, 14, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'Outfit', sans-serif;
  animation: adFadeIn 0.2s ease-out;
}

.arcade-reward-prompt-modal.hidden {
  display: none !important;
}

.arcade-reward-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(170deg, #1f1a3a 0%, #110e24 100%);
  border: 1px solid rgba(236, 72, 153, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(236, 72, 153, 0.2);
  border-radius: 24px;
  padding: 26px 22px;
  text-align: center;
  color: #fff;
}

.arcade-reward-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: inline-block;
}

.arcade-reward-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}

.arcade-reward-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.45;
  margin-bottom: 22px;
}

.arcade-reward-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arcade-reward-btn-watch {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.35);
}

.arcade-reward-btn-watch:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

.arcade-reward-btn-cancel {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  padding: 8px;
  cursor: pointer;
}

.arcade-reward-btn-cancel:hover {
  color: #fff;
}

/* Rewarded Success Toast */
.arcade-toast-reward {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 1000000;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.arcade-toast-reward.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Banner Ads Container Placeholder */
.arcade-banner-slot {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 16px auto;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.arcade-banner-slot::before {
  content: 'ADVERTISEMENT';
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

@media (max-width: 768px) {
  .arcade-banner-slot {
    max-width: 320px;
    min-height: 50px;
  }
}
