/**
 * @file ad-modal.css
 * @description Styles for Futello Rewarded Video Ad player modal with stadium glassmorphism and responsive HUD.
 */

.ad-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: adModalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adModalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.ad-modal-card {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(3, 7, 18, 0.98) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ad-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-badge-tag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--neon-cyan, #38bdf8);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
}

.ad-countdown-pill {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.ad-countdown-pill.completed {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.ad-media-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-poster-backdrop {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.ad-poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.4) 0%, rgba(2, 6, 23, 0.85) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.ad-sponsor-emblem {
  font-size: 2.5rem;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 15px rgba(250, 204, 21, 0.6));
  animation: adEmblemFloat 2.5s ease-in-out infinite alternate;
}

@keyframes adEmblemFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.ad-sponsor-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.ad-sponsor-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0;
  max-width: 90%;
}

.ad-progress-bar-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
}

.ad-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  transition: width 1s linear;
}

.ad-sound-toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.ad-sound-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.ad-modal-footer {
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ad-reward-hint {
  font-size: 0.82rem;
  color: #cbd5e1;
  text-align: center;
}

.ad-quit-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.ad-quit-btn:hover {
  color: #ef4444;
}
