/* ============================================================
   TeraboxPlay — Modern White / Light Ultra-Smooth UI
   Optimized for High-FPS Mobile Performance & AdSense Revenue
   ============================================================ */

:root {
  /* Color Palette — Clean Luxury Light Theme */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-focus: #f59e0b;
  
  /* Brand Accents */
  --accent-gold: #f59e0b;
  --accent-gold-hover: #d97706;
  --accent-gold-subtle: #fef3c7;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  /* Typography Colors */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* UI Tokens */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 12px 30px -4px rgba(245, 158, 11, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-btn: 0 4px 15px rgba(245, 158, 11, 0.35);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset & Hardware-Accelerated Fast Scrolling */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(254, 243, 199, 0.45) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(224, 242, 254, 0.4) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(241, 245, 249, 0.8) 0px, transparent 100%);
  background-attachment: scroll; /* Prevents mobile scroll jank */
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   NAVBAR (Clean White + Floating Border)
   ============================================================ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.75rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1rem;
  padding-left: 2px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.brand-accent {
  color: #f59e0b;
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: #0f172a;
  background: var(--bg-surface-subtle);
}

.nav-link.active {
  color: var(--accent-gold-hover);
  font-weight: 700;
}

/* ============================================================
   MAIN LAYOUT & HERO SECTION (Mobile Ergonomic)
   ============================================================ */
.main-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  flex: 1;
}

/* Hero Card */
.hero-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706);
}

.hero-badge, .section-badge, .article-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 2rem auto;
  line-height: 1.55;
}

/* Hero Form Container */
.hero-form-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* Input Box with Integrated Adjacent Paste Button */
.input-box-wrapper {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.5rem 0.35rem 0.85rem;
  gap: 0.6rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: border-color, box-shadow;
  transform: translateZ(0);
}

.input-box-wrapper:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12), 0 8px 24px rgba(245, 158, 11, 0.08);
}

.input-icon-wrap {
  display: flex;
  align-items: center;
  color: var(--text-subtle);
  flex-shrink: 0;
}

.url-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  padding: 0.75rem 0.25rem;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--text-subtle);
  font-size: 0.95rem;
}

/* Floating 1-Tap Paste Button inside Input Row */
.btn-paste-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-paste-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-paste-pill:active {
  transform: translateY(0);
  background: #e2e8f0;
}

.btn-paste-pill.pasted {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}

/* Twin Action Buttons Row Directly Underneath Input Box */
.hero-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
}

.btn-hero-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, box-shadow;
  transform: translateZ(0);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  color: #ffffff;
}

.btn-hero-action:hover {
  transform: translateY(-2px);
}

.btn-hero-action:active {
  transform: translateY(0);
}

.btn-hero-action:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Play Video Button: Vibrant Amber Gold */
.btn-hero-play {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.28);
}

.btn-hero-play:hover {
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.4);
}

/* Download Video Button: Modern Azure Blue */
.btn-hero-download {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.28);
}

.btn-hero-download:hover {
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4);
}

.action-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.action-label {
  letter-spacing: -0.01em;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .hero-card {
    padding: 1.5rem 1rem;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  /* Keep twin action buttons side-by-side on mobile like iPad mode */
  .hero-actions-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }
  .btn-hero-action {
    padding: 0.75rem 0.6rem;
    font-size: 0.92rem;
    border-radius: 10px;
    gap: 0.4rem;
  }
  .action-icon {
    font-size: 1rem;
  }
}

/* 120FPS Performance Optimizations */
.features-section,
.faq-section,
.blog-section,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error Banner */
.error-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  color: #b91c1c;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.25rem auto 0 auto;
  max-width: 750px;
  text-align: left;
}

/* ============================================================
   ADSENSE HIGH-CONVERTING AD UNITS
   ============================================================ */
.ad-slot-container {
  width: 100%;
  max-width: 100%;
  margin: 1.25rem auto;
  text-align: center;
  position: relative;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  box-shadow: var(--shadow-sm);
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ad-slot-container::before {
  content: 'ADVERTISEMENT';
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0.4rem;
}

.ad-banner-slot {
  width: 100%;
  overflow: hidden;
}

/* Mobile Sticky Bottom Anchor Ad handled in section 1 */

/* ============================================================
   VIDEO PLAYER & DETAILS SECTION
   ============================================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.player-section {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

.player-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 auto;
}

.video-element {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  background: #000000;
  display: block;
}

/* Modern Glowing Dual Pulse Video Loader */
.player-loader {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  pointer-events: none;
}

.glow-orb-loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  border-radius: 50%;
  box-sizing: border-box;
}

.pulse-ring-1 {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
  animation: pulseOrb 2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.pulse-ring-2 {
  width: 75%;
  height: 75%;
  border: 2px solid rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
  animation: pulseOrb 2s cubic-bezier(0.25, 1, 0.5, 1) infinite 0.6s;
}

.center-play-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.15rem;
  padding-left: 3px;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.7);
  animation: breatheIcon 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes pulseOrb {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

@keyframes breatheIcon {
  0%, 100% { transform: scale(0.95); box-shadow: 0 0 20px rgba(245, 158, 11, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 35px rgba(245, 158, 11, 0.85); }
}

.player-loader-text {
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

.loader-subtext {
  font-size: 0.82rem;
  color: #94a3b8;
  text-align: center;
  max-width: 85%;
}

/* Video Details Card — Ultra-Compact & Mobile-First */
.details-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  box-shadow: var(--shadow-card);
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.file-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.file-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.full-badge {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Side-by-Side Action Buttons (Left & Right) */
.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-light);
  width: 100%;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 0.85rem;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  width: 100%;
  text-align: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-action-download {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

.btn-action-download:hover {
  background: #0369a1;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.4);
}

.btn-share {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
}

.btn-share:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

#btn-download {
  background: #0f172a;
  color: #ffffff;
  border: none;
}

#btn-download:hover {
  background: #1e293b;
}

/* Multi-file Playlist Card */
.playlist-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.playlist-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 280px;
  overflow-y: auto;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  cursor: pointer;
  transition: all 0.15s;
}

.file-item:hover, .file-item.active {
  border-color: var(--accent-gold);
  background: #fffbeb;
}

.file-item.active .file-item-name {
  color: #b45309;
  font-weight: 700;
}

.file-item-name {
  font-size: 0.9rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.file-item-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================================
   SEO & CONTENT SECTIONS (Fast 60fps Scrolling)
   ============================================================ */
.info-section {
  width: 100%;
  margin: 3.5rem auto 0 auto;
}

.info-section.alt-bg {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-card);
}

.section-heading {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.section-subheading {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin-bottom: 2.25rem;
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.step-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #fde68a;
}

.step-num {
  font-size: 2.8rem;
  font-weight: 900;
  color: #f1f5f9;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  line-height: 1;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* Features Four Grid */
.features-four-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.2s;
}

.feature-box:hover {
  background: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-sm);
}

.fb-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-box h3 {
  font-size: 1.15rem;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Devices Grid */
.devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.device-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--accent-gold);
}

.device-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.device-card h3 {
  font-size: 1.25rem;
  color: #0f172a;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.device-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.faq-item[open] {
  border-color: var(--accent-gold);
}

.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--accent-gold);
  font-weight: 600;
}

.faq-item[open] .faq-question::after {
  content: '−';
}

.faq-answer {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  border-top: 1px solid var(--border-light);
  padding-top: 0.85rem;
}

/* Blog Preview Header on Home */
.blog-preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============================================================
   POLICY PAGES & BLOG ARTICLES (AdSense Compliant & Crisp)
   ============================================================ */
.page-container {
  width: 100%;
  max-width: 960px;
  margin: 2.5rem auto 4rem auto;
  padding: 0 1.5rem;
}

.content-article, .article-reader-container {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  box-shadow: var(--shadow-card);
}

.page-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.page-meta-update {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 2rem;
}

.page-section {
  margin-bottom: 2.5rem;
}

.page-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.85rem;
}

.page-section h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.25rem 0 0.5rem 0;
}

.page-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.page-section ul, .page-section ol {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.page-section li {
  margin-bottom: 0.5rem;
}

.page-section code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 5px;
  color: #b45309;
  font-size: 0.9em;
  border: 1px solid #e2e8f0;
}

.features-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.feature-mini-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.f-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.feature-mini-card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem 0;
  color: #0f172a;
}

.feature-mini-card p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}

.contact-box-banner {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.contact-email-highlight {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.5rem;
}

.contact-email-highlight a {
  color: #b45309;
  text-decoration: underline;
}

/* Contact Page Grid */
.contact-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2.5rem;
  margin-top: 1rem;
}

.contact-info-panel h3, .contact-form-panel h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.contact-card-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.1rem;
  margin: 1rem 0;
}

.c-icon {
  font-size: 1.6rem;
}

.c-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.c-val, .c-val a {
  font-size: 0.98rem;
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.c-val a:hover {
  color: var(--accent-gold);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.form-textarea {
  resize: vertical;
}

.btn-submit-contact {
  width: 100%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: opacity 0.2s;
}

.btn-submit-contact:hover {
  opacity: 0.95;
}

.alert-success {
  margin-top: 1rem;
  padding: 1rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  color: #065f46;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ============================================================
   BLOG STYLES (Clean White Cards & Single Post)
   ============================================================ */
.blog-header-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.blog-search-bar {
  display: flex;
  max-width: 550px;
  margin: 1.5rem auto 0 auto;
  gap: 0.5rem;
}

.blog-search-bar input {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.blog-search-bar input:focus {
  border-color: var(--accent-gold);
}

.blog-search-bar button {
  background: var(--accent-gold);
  border: none;
  color: #ffffff;
  font-weight: 700;
  padding: 0 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.blog-search-bar button:hover {
  background: var(--accent-gold-hover);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: #fde68a;
  box-shadow: var(--shadow-hover);
}

.blog-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  background: #f1f5f9;
}

.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img-wrap img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-bottom: 0.6rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.blog-card-title a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.15s;
}

.blog-card-title a:hover {
  color: var(--accent-gold);
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.blog-read-more {
  color: #b45309;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-read-more:hover {
  text-decoration: underline;
}

.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.p-btn {
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.15s;
}

.p-btn:hover, .p-btn.active {
  background: var(--accent-gold);
  color: #ffffff;
  border-color: var(--accent-gold);
}

/* Single Article Reader */
.article-breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
}

.article-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.article-breadcrumbs a:hover {
  color: var(--accent-gold);
}

.single-article-title {
  font-size: 2.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 0.85rem;
}

.single-article-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-subtle);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.single-cover-wrap {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.single-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-article-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
}

.single-article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  margin: 2.25rem 0 0.85rem 0;
}

.single-article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.75rem 0 0.6rem 0;
}

.single-article-content p {
  margin-bottom: 1.35rem;
}

.single-article-content ul, .single-article-content ol {
  margin-left: 1.75rem;
  margin-bottom: 1.5rem;
}

.single-article-content li {
  margin-bottom: 0.5rem;
}

.article-footer-cta {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cta-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.cta-box h3 {
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.share-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-subtle);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.blog-loader-wrap, .empty-blog-box {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
}

/* ============================================================
   SHARE MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.share-copy-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.share-input {
  flex: 1;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.9rem;
  color: #0f172a;
  outline: none;
}

.btn-copy {
  background: #0f172a;
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 0 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-modal-close {
  width: 100%;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ============================================================
   CLEAN LUXURY FOOTER
   ============================================================ */
.footer {
  margin-top: 5rem;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
  padding: 4rem 1.5rem 2rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.02);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand-col .footer-desc {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
  margin: 1rem 0;
  max-width: 380px;
}

.footer-contact {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-contact a {
  color: var(--accent-gold-hover);
  font-weight: 600;
  text-decoration: none;
}

.footer-col h4 {
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--accent-gold-hover);
}

.footer-bottom {
  max-width: 1100px;
  margin: 3rem auto 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.88rem;
}

/* ============================================================
   MOBILE-FIRST ENHANCEMENTS (Fast 60fps & Touch Friendly)
   ============================================================ */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .main-wrapper {
    padding: 0.75rem 0.5rem 2.5rem 0.5rem !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  .content-grid {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .player-section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
  }

  /* Fixed, Perfect Mobile Player Sizing - Frame never breaks or shifts */
  .player-container {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: 52vh !important;
    min-height: 195px !important;
    border-radius: 8px !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .video-element {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  /* Prevent ads from expanding mobile viewport */
  .ad-slot-container {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .ad-slot-container iframe,
  .ad-slot-container ins,
  .ad-slot-container div {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .navbar {
    padding: 0.8rem 1rem;
  }

  .nav-link-desktop {
    display: none;
  }

  .nav-links {
    gap: 0.4rem;
  }

  .nav-link {
    font-size: 0.88rem;
    padding: 0.35rem 0.6rem;
  }

  .hero-card {
    padding: 2rem 1.25rem;
    margin-bottom: 1.25rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  .input-form {
    flex-direction: column;
    padding: 0.6rem;
    gap: 0.5rem;
  }

  .input-icon-wrap {
    display: none;
  }

  .url-input {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.6rem 0.25rem;
  }

  .btn-paste {
    width: 100%;
    justify-content: center;
    padding: 0.7rem;
  }

  .btn-resolve {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 1.05rem;
  }

  .contact-grid-layout {
    grid-template-columns: 1fr;
  }

  .content-article, .article-reader-container {
    padding: 2rem 1.25rem;
  }

  .page-title, .single-article-title {
    font-size: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.55rem;
  }

  .section-heading {
    font-size: 1.45rem;
  }

  .steps-grid, .features-four-grid, .devices-grid, .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   HIGH-CPM AD PLACEMENTS & FREQUENCY POPUP SYSTEM
   ============================================================ */

/* 1. Mobile Sticky Anchor 320x50 Banner (Full Proper Size) */
.ad-anchor-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.65);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#ad-anchor-inner {
  width: 320px !important;
  height: 50px !important;
  min-width: 320px !important;
  min-height: 50px !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}

.ad-anchor-bottom iframe {
  width: 320px !important;
  height: 50px !important;
  min-width: 320px !important;
  min-height: 50px !important;
  max-width: 100% !important;
  border: none !important;
  overflow: hidden !important;
  display: block !important;
  margin: 0 auto !important;
}

/* Close button placed nicely on top corner */
.ad-anchor-close {
  position: absolute;
  top: 2px;
  right: 6px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.2s ease;
}

.ad-anchor-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* 2. Frequency 300x250 Countdown Popup Modal */
.ad-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(10, 15, 29, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: adPopupFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes adPopupFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ad-popup-card {
  width: 100%;
  max-width: 350px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 40px rgba(139, 92, 246, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ad-popup-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ad-popup-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ad-sponsor-pill {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  text-transform: uppercase;
}

.ad-timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 600;
}

.timer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 8px #fbbf24;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.ad-popup-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

/* Locked (countdown active) state */
.ad-popup-close-btn.locked {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Unlocked (timer expired) state */
.ad-popup-close-btn.unlocked {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.5);
  animation: unlockGlow 1.5s infinite alternate;
}

.ad-popup-close-btn.unlocked:hover {
  transform: scale(1.04);
  background: #dc2626;
}

@keyframes unlockGlow {
  from { box-shadow: 0 0 6px rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 16px rgba(239, 68, 68, 0.8); }
}

.ad-popup-body {
  padding: 16px;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  overflow: hidden;
}

.ad-popup-footer {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  font-size: 0.7rem;
  color: #64748b;
}

/* 3. Social Bar / Floating Modified Ad Slot */
.ad-social-bar-slot {
  position: fixed;
  bottom: 60px;
  left: 16px;
  right: auto;
  z-index: 9980;
  width: auto;
  max-width: calc(100vw - 32px);
  pointer-events: auto;
  box-sizing: border-box;
}

.ad-floating-card {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(139, 92, 246, 0.15);
  padding: 6px;
  overflow: hidden;
  animation: adFloatIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  max-width: 340px;
}

@keyframes adFloatIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Tiny close button placed tightly on the upper edge for high CPM accidental clicks */
.ad-tiny-close {
  position: absolute;
  top: 2px;
  right: 3px;
  width: 12px;
  height: 12px;
  line-height: 12px;
  font-size: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.35);
  border: none;
  border-radius: 2px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  transition: opacity 0.2s ease;
}

.ad-tiny-close:hover {
  opacity: 0.8;
  color: #fff;
}

@media (max-width: 480px) {
  .ad-social-bar-slot {
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 340px;
    bottom: 60px;
  }
}

/* 4. Universal Zero-Overflow Mobile Containment */
.main-wrapper,
.navbar,
.hero-card,
.details-card,
.playlist-card,
.ad-slot-container,
.ad-anchor-bottom,
.footer {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.ad-slot-container iframe,
.ad-banner-slot iframe,
.ad-anchor-bottom iframe,
.ad-social-bar-slot iframe {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 5. Slot Containers */
.ad-slot-container {
  width: 100%;
  margin: 1.5rem auto;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* ============================================================
   RESPONSIVE VIDEO PLAYER FIX (Never breaks on any mobile view)
   ============================================================ */
.player-container {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 72vh !important;
  min-height: 220px !important;
  background: #000000 !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
  box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.video-element {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important; /* Locks landscape, portrait 9:16 and custom sizes without breaking layout */
  background: #000000 !important;
}

@media (max-width: 640px) {
  .player-container {
    aspect-ratio: 16 / 9 !important;
    max-height: 52vh !important;
    min-height: 200px !important;
  }
}

/* ============================================================
   HIGH-CPM 300x250 FLOATING POPUP OVERLAY & 2 CLOSE BUTTONS
   ============================================================ */
.player-ad-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  animation: modalOverlayFade 0.25s ease-out;
}

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

.ad-overlay-inner {
  position: relative;
  background: #0f172a;
  border: 2px solid rgba(245, 158, 11, 0.65);
  border-radius: 16px;
  padding: 14px;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: modalPopupZoom 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

@keyframes modalOverlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopupZoom {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(24px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Live 5-Second Wait Timer Bar */
.ad-overlay-timer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 6px 10px;
  border-radius: 8px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.ad-timer-badge-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ad-timer-pulse-icon {
  font-size: 0.95rem;
  animation: pulse 1s infinite alternate;
}

.ad-timer-text {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fbbf24;
}

.ad-timer-seconds {
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  background: #f59e0b;
  padding: 2px 7px;
  border-radius: 4px;
  min-width: 24px;
  text-align: center;
  display: inline-block;
}

/* Success state when 5s timer completes */
.ad-overlay-timer-bar.unlocked {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
}
.ad-overlay-timer-bar.unlocked .ad-timer-text {
  color: #34d399;
}
.ad-overlay-timer-bar.unlocked .ad-timer-seconds {
  background: #10b981;
}

.ad-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-sponsored-tag {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.ad-close-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* FAKE Close button (looks like Skip Ad, opens ad link & closes overlay) */
.btn-fake-close {
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-fake-close:hover {
  background: #f59e0b;
  color: #000000;
}

/* REAL Close button (unlocked only after 5s countdown completes) */
.btn-real-close {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: 1px solid #ef4444;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  animation: pulse 1.5s infinite;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-real-close:hover {
  background: #b91c1c;
  transform: scale(1.04);
}

.ad-300x250-content {
  width: 300px;
  height: 250px;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border-radius: 6px;
  cursor: pointer;
}

/* 10-Second Countdown Modal on Ad Click */
.ad-countdown-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  color: #ffffff;
}

.ad-countdown-modal.hidden {
  display: none !important;
}

.countdown-seconds-badge {
  font-size: 2.2rem;
  font-weight: 800;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid #f59e0b;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.countdown-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.countdown-desc {
  font-size: 0.82rem;
  color: #94a3b8;
}

/* Social Bar Container */
.ad-social-bar-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}
.ad-social-bar-container.hidden {
  display: none !important;
}

