/* ============================================================
   PREMIUM VIDEO ZONE — STYLESHEET (Compact Mobile)
   ============================================================ */
:root {
  --primary: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
  --bg-main: #0f0f23;
  --bg-card: #16162a;
  --bg-nav: rgba(22, 22, 42, 0.97);
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border: 1px solid rgba(255,255,255,0.07);
  --btn-h: 42px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; padding: 0; }

body {
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'Poppins', 'Hind Siliguri', sans-serif;
  padding-bottom: 85px;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 480px; margin: 0 auto; padding: 10px; }

/* ── HEADER ── */
.header {
  background: linear-gradient(135deg, #1a0533, #1e1e30, #1a1230);
  padding: 16px 18px; border-radius: 18px; text-align: center;
  border: 1px solid rgba(168,85,247,0.18); margin-bottom: 12px;
  box-shadow: 0 4px 24px rgba(139,92,246,0.12);
  position: relative; overflow: hidden;
}
.header::before {
  content: ''; position: absolute; top: -50px; left: -50px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.12), transparent 70%);
  pointer-events: none;
}
.title {
  font-size: 19px; font-weight: 900; letter-spacing: 0.5px;
  background: linear-gradient(135deg, #c084fc, #f472b6, #a78bfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; position: relative;
}
.subtitle { font-size: 10px; color: #7c6fa0; margin-top: 4px; letter-spacing: 2px; text-transform: uppercase; }

/* ── SEARCH ── */
.search-wrapper { position: relative; margin-bottom: 12px; }
.search-input {
  width: 100%; padding: 11px 18px; padding-right: 46px;
  border-radius: 50px; background: #1e1e32;
  border: 1px solid rgba(139,92,246,0.18); color: white;
  font-size: 13px; outline: none; transition: 0.25s; font-family: inherit;
}
.search-input:focus { border-color: #8b5cf6; background: #222240; box-shadow: 0 0 0 3px rgba(139,92,246,0.1); }
.search-input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute; right: 4px; top: 4px;
  background: var(--primary-gradient); width: 34px; height: 34px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: white; font-size: 13px;
}

/* ── FILTERS ── */
.filter-scroll {
  display: flex; gap: 7px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-btn {
  position: relative; padding: 6px 14px;
  background: var(--bg-card); border: var(--border);
  color: #aaa; border-radius: 50px; font-size: 12px;
  white-space: nowrap; cursor: pointer; margin-top: 6px;
  font-family: inherit; transition: 0.2s;
}
.filter-btn.active { background: var(--primary-gradient); color: white; border: none; }
.badge {
  position: absolute; top: -5px; right: -3px;
  background: #ef4444; color: white; font-size: 8px; font-weight: 800;
  height: 16px; min-width: 16px; padding: 0 3px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg-main); z-index: 10;
}

/* ── CARDS ── */
.cards { display: flex; flex-direction: column; gap: 11px; }

.card {
  background: var(--bg-card); border-radius: 14px;
  overflow: hidden; border: var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}

/* Tap ripple overlay on whole card */
.card-overlay {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(139,92,246,0); border-radius: 14px;
  pointer-events: none; transition: background 0.18s ease;
}
.card.tapped .card-overlay { background: rgba(139,92,246,0.18); }

.banner-wrapper {
  width: 100%; overflow: hidden; border-radius: 10px;
  margin: 4px 0; text-align: center; background: #000;
}
.banner-wrapper img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

/* ── THUMBNAIL ── */
.media { position: relative; padding-bottom: 52%; background: #000; cursor: pointer; }
.media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.25s ease;
}
.card:active .media img { transform: scale(1.02); }
.media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,15,35,0.82) 0%, rgba(15,15,35,0.1) 50%, transparent 100%);
  pointer-events: none; z-index: 1;
}

/* ── CLICKABLE PLAY ICON (triggers ad → then watch) ── */
.media-play-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(139,92,246,0.88); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; z-index: 3;
  box-shadow: 0 0 0 7px rgba(139,92,246,0.2), 0 4px 16px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: pulse-ring 2.5s ease-out infinite;
}
.media-play-icon:active {
  transform: translate(-50%, -50%) scale(0.9);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.3);
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(139,92,246,0.45), 0 4px 16px rgba(0,0,0,0.4); }
  60%  { box-shadow: 0 0 0 12px rgba(139,92,246,0), 0 4px 16px rgba(0,0,0,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(139,92,246,0), 0 4px 16px rgba(0,0,0,0.4); }
}

.heart-btn {
  position: absolute; top: 8px; right: 8px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; transition: transform 0.15s;
}
.heart-btn:active { transform: scale(0.82); }

.cat-tag {
  position: absolute; top: 8px; left: 8px; z-index: 4;
  font-size: 9px; font-weight: 700; color: white;
  background: rgba(139,92,246,0.82); padding: 2px 8px;
  border-radius: 20px; backdrop-filter: blur(4px);
  letter-spacing: 0.4px; text-transform: uppercase;
}

/* ── META ── */
.meta { padding: 9px 11px 11px; }
.meta-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 8px; margin-bottom: 9px;
}
.meta h3 {
  margin: 0; font-size: 13px; line-height: 1.4;
  font-weight: 700; flex: 1; color: #ede9ff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.view-count-badge {
  font-size: 10px; color: #9ca3af;
  background: rgba(255,255,255,0.04); padding: 3px 7px;
  border-radius: 5px; display: flex; align-items: center;
  gap: 4px; white-space: nowrap; border: var(--border); flex-shrink: 0;
}

/* ── ACTION BUTTONS — same size, compact ── */
.actions { display: flex; gap: 7px; }

/* Both buttons share these base styles */
.watch-btn, .download-btn {
  flex: 1;
  height: var(--btn-h);
  border: none; border-radius: 10px;
  cursor: pointer; font-family: inherit;
  position: relative; overflow: hidden;
  transition: transform 0.12s, box-shadow 0.12s;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-size: 11px; font-weight: 800; color: white;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.watch-btn:active, .download-btn:active {
  transform: scale(0.96);
}

/* Shimmer sweep */
.watch-btn::before, .download-btn::before {
  content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  animation: shimmer 2.8s infinite;
  pointer-events: none;
}
.download-btn::before { animation-delay: 1.4s; }
@keyframes shimmer { 0%{left:-80%} 100%{left:180%} }

.watch-btn {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 3px 14px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.watch-btn:active { box-shadow: 0 1px 6px rgba(37,99,235,0.3); }

.download-btn {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 3px 14px rgba(16,185,129,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
}
.download-btn:active { box-shadow: 0 1px 6px rgba(16,185,129,0.3); }

/* Icon circle inside button */
.btn-icon-wrap {
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; flex-shrink: 0;
}

/* ── INFO BOX / TUTORIAL ── */
.info-box { background: var(--bg-card); border-radius: 14px; padding: 16px; border: var(--border); margin-bottom: 12px; }
.step { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.step-num {
  background: #2d2d44; color: #a855f7; width: 22px; height: 22px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 11px; flex-shrink: 0; margin-top: 1px;
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 8px; left: 8px; right: 8px;
  background: var(--bg-nav); backdrop-filter: blur(14px);
  border-radius: 18px; border: var(--border);
  display: flex; justify-content: space-around;
  padding: 7px 10px; max-width: 480px; margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 100;
}
.nav-item {
  background: none; border: none; color: #6b7280;
  cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px; padding: 4px 12px;
  border-radius: 10px; transition: color 0.2s;
}
.nav-item i { font-size: 17px; transition: 0.2s; }
.nav-text { font-size: 9px; font-weight: 600; font-family: 'Hind Siliguri', sans-serif; }
.nav-item.active { color: #ec4899; background: rgba(236,72,153,0.08); }
.nav-item.active i { transform: translateY(-2px); filter: drop-shadow(0 0 6px rgba(236,72,153,0.6)); }

/* ── LOADING OVERLAY ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(10,10,22,0.96); z-index: 999;
  display: none; flex-direction: column; align-items: center; justify-content: center;
}
.loader {
  border: 3px solid rgba(255,255,255,0.08); border-top: 3px solid #a855f7;
  border-radius: 50%; width: 40px; height: 40px;
  animation: spin 0.85s linear infinite; margin-bottom: 14px;
  box-shadow: 0 0 18px rgba(168,85,247,0.3);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RETRY MODAL ── */
.retry-overlay {
  position: fixed; inset: 0; background: rgba(10,10,22,0.95);
  z-index: 998; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.retry-overlay.active { display: flex; }
.retry-box {
  background: #1a1a2e; border: 1px solid rgba(239,68,68,0.28);
  border-radius: 18px; padding: 26px 22px;
  max-width: 300px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.retry-icon { font-size: 40px; margin-bottom: 12px; }
.retry-title { font-size: 17px; font-weight: 800; color: #f87171; margin-bottom: 7px; }
.retry-body { font-size: 13px; color: #9ca3af; line-height: 1.6; margin-bottom: 20px; }
.retry-btn {
  width: 100%; padding: 12px; border-radius: 11px; border: none;
  background: var(--primary-gradient); color: white;
  font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}
.retry-cancel {
  width: 100%; padding: 10px; border-radius: 11px;
  border: var(--border); background: transparent; color: #6b7280;
  font-weight: 600; font-size: 12px; cursor: pointer;
  font-family: inherit; margin-top: 8px;
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 95px; left: 50%; transform: translateX(-50%);
  background: #10b981; color: white; padding: 7px 18px;
  border-radius: 50px; font-size: 12px; font-weight: 600;
  display: none; z-index: 300; white-space: nowrap;
}

/* ── SINGLE VIEW ── */
.single-view {
  position: fixed; inset: 0; background: var(--bg-main);
  z-index: 150; overflow-y: auto; padding: 12px; display: none;
}
.single-view.active { display: block; }

/* ── UTILITIES ── */
.hidden { display: none; }
.fadeIn { animation: fadeIn 0.28s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── RESPONSIVE ── */
@media (max-width: 360px) {
  .title { font-size: 16px; }
  .meta h3 { font-size: 12px; }
  .watch-btn, .download-btn { font-size: 10px; gap: 4px; }
  .btn-icon-wrap { width: 20px; height: 20px; font-size: 9px; }
  --btn-h: 38px;
}
@media (min-width: 420px) {
  .app { padding: 12px 14px; }
  .meta h3 { font-size: 14px; }
}



.download-btn.locked:active { box-shadow: 0 1px 6px rgba(75,85,99,0.25); }

/* Ad counter dots — bottom-right corner of the button */




/* ── DOWNLOAD LOCK — text counter ── */
.download-btn.locked {
  background: linear-gradient(135deg, #374151, #4b5563);
  box-shadow: 0 3px 14px rgba(75,85,99,0.3);
  position: relative;
}
.dl-counter-text {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 9px;
  font-weight: 900;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
  line-height: 1;
}

/* ── WATCH NOW LOCK ── */
.watch-btn.locked {
  background: linear-gradient(135deg, #1e3a5f, #1e40af);
  box-shadow: 0 3px 14px rgba(30,64,175,0.3);
  position: relative;
}
.watch-btn.locked:active { box-shadow: 0 1px 6px rgba(30,64,175,0.2); }

/* ── UNIFIED COUNTER TEXT (both buttons) ── */
.btn-counter-text {
  position: absolute;
  bottom: 4px;
  right: 8px;
  font-size: 9px;
  font-weight: 900;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
  line-height: 1;
}
