/* ============================================================
   VIRAL ZONE — MAIN STYLESHEET
   ============================================================ */
:root {
  --primary: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #8b5cf6, #ec4899);
  --watch-gradient: linear-gradient(135deg, #06b6d4, #3b82f6);
  --download-gradient: linear-gradient(135deg, #10b981, #059669);
  --bg-main: #0f0f23;
  --bg-card: #1a1a2e;
  --bg-nav: rgba(30, 30, 48, 0.95);
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border: 1px solid rgba(255,255,255,0.08);
}

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

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-main);
  font-family: 'Poppins', 'Hind Siliguri', sans-serif;
  padding-bottom: 90px;
}

.app { max-width: 500px; margin: 0 auto; padding: 12px; }

/* ── HEADER ── */
.header {
  background: linear-gradient(to bottom, #1e1e30, #151525);
  padding: 20px; border-radius: 16px; text-align: center;
  border: var(--border); margin-bottom: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.title { font-size: 26px; font-weight: 800; color: #a855f7; margin: 0; letter-spacing: 1px; }
.subtitle { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ── SEARCH ── */
.search-wrapper { position: relative; margin-bottom: 15px; }
.search-input {
  width: 100%; padding: 14px 20px; padding-right: 50px;
  border-radius: 50px; background: #232336;
  border: var(--border); color: white; font-size: 14px; outline: none; transition: 0.3s;
}
.search-input:focus { border-color: #8b5cf6; background: #2a2a40; }
.search-input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute; right: 5px; top: 5px;
  background: var(--primary); width: 38px; height: 38px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: white; font-size: 14px;
}

/* ── FILTERS ── */
.filter-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 5px; margin-bottom: 15px; scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-btn {
  position: relative; padding: 8px 18px;
  background: var(--bg-card); border: var(--border);
  color: #ccc; border-radius: 50px; font-size: 13px;
  white-space: nowrap; cursor: pointer; margin-top: 8px; margin-right: 5px;
  font-family: inherit;
}
.filter-btn.active {
  background: var(--primary-gradient); color: white;
  border: none; padding: 9px 19px;
}
.badge {
  position: absolute; top: -6px; right: -2px;
  background: #ef4444; color: white; font-size: 9px; font-weight: bold;
  height: 18px; min-width: 18px; padding: 0 4px; border-radius: 10px;
  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: 15px; }
.card {
  background: var(--bg-card); border-radius: 16px;
  overflow: hidden; border: var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.banner-wrapper {
  width: 100%; overflow: hidden; border-radius: 12px;
  margin: 5px 0; text-align: center; background: #000;
}
.banner-wrapper img { max-width: 100%; height: auto; display: block; margin: 0 auto; }

.media { position: relative; padding-bottom: 56.25%; background: black; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heart-btn {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  border: none; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
}

.meta { padding: 15px; }
.meta-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.meta h3 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; flex: 1; }
.view-count-badge {
  font-size: 11px; color: #9ca3af;
  background: rgba(255,255,255,0.05); padding: 4px 8px;
  border-radius: 6px; display: flex; align-items: center;
  gap: 5px; white-space: nowrap; border: 1px solid rgba(255,255,255,0.05);
}

/* ── ACTION BUTTONS ── */
.actions { display: flex; gap: 10px; }
.watch-btn {
  flex: 1; padding: 12px; border-radius: 10px; border: none;
  background: var(--watch-gradient); color: white;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(59,130,246,0.35); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: opacity 0.2s; font-family: inherit;
}
.watch-btn:active { opacity: 0.85; }

.download-btn {
  flex: 1; padding: 12px; border-radius: 10px; border: none;
  background: var(--download-gradient); color: white;
  font-weight: 700; font-size: 13px; text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(16,185,129,0.35); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: opacity 0.2s; font-family: inherit;
}
.download-btn:active { opacity: 0.85; }

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

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 10px; left: 10px; right: 10px;
  background: var(--bg-nav); backdrop-filter: blur(10px);
  border-radius: 20px; border: var(--border);
  display: flex; justify-content: space-around;
  padding: 8px 12px; max-width: 500px; margin: 0 auto;
  box-shadow: 0 10px 40px 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: 3px;
}
.nav-item i { font-size: 18px; transition: 0.3s; }
.nav-text { font-size: 10px; font-weight: 500; font-family: 'Hind Siliguri', sans-serif; }
.nav-item.active { color: #ec4899; }
.nav-item.active i { transform: translateY(-2px); }
.nav-item.active::after {
  content: ''; position: absolute; bottom: -4px; left: 50%;
  transform: translateX(-50%); width: 4px; height: 4px;
  background: #ec4899; border-radius: 50%;
}

/* ── LOADING OVERLAY ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 999;
  display: none; flex-direction: column; align-items: center; justify-content: center;
}
.loader {
  border: 4px solid #f3f3f3; border-top: 4px solid #a855f7;
  border-radius: 50%; width: 40px; height: 40px;
  animation: spin 1s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

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

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

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