/* dashboard.css */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --bg:        #0D0D0F;
  --bg2:       #141416;
  --bg3:       #1C1C1F;
  --bg4:       #242428;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --text:      #F0F0F2;
  --text2:     #9A9AA8;
  --text3:     #5C5C6A;
  --accent:    #E24B4A;
  --accent2:   #FF6B35;
  --purple:    #6366F1;
  --green:     #10B981;
  --amber:     #F59E0B;
  --radius:    10px;
  --radius-lg: 14px;
  --sidebar-w: 220px;
  --font-head: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.logo-icon {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(226,75,74,0.12); color: var(--accent); }
.nav-item .ti { font-size: 16px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  background: rgba(99,102,241,0.15);
  color: var(--purple);
  padding: 2px 6px; border-radius: 4px;
  text-transform: uppercase;
}

.sidebar-bottom {
  padding: 14px 10px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 10px;
}

.usage-widget { padding: 0 4px; }
.usage-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text3); margin-bottom: 6px;
}
.usage-plan {
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
}
.usage-plan.free    { background: rgba(255,255,255,0.07); color: var(--text3); }
.usage-plan.pro     { background: rgba(99,102,241,0.15);  color: var(--purple); }
.usage-plan.agency  { background: rgba(16,185,129,0.15);  color: var(--green); }
.usage-bar-track {
  height: 4px; background: var(--bg4);
  border-radius: 2px; overflow: hidden; margin-bottom: 4px;
}
.usage-bar-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; transition: width 0.4s ease;
  width: 0%;
}
.usage-numbers { font-size: 11px; color: var(--text3); text-align: right; }

.upgrade-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-radius: var(--radius);
  padding: 9px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; transition: opacity 0.15s;
}
.upgrade-btn:hover { opacity: 0.88; }

.login-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); border-radius: var(--radius);
  padding: 9px 12px; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: background 0.15s;
}
.login-btn:hover { background: var(--bg4); }

.user-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 4px;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.user-avatar-placeholder {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name  { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 10px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { color: var(--text3); font-size: 14px; flex-shrink: 0; text-decoration: none; }
.logout-btn:hover { color: var(--accent); }

/* ── MAIN ────────────────────────────────────────────── */

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR ──────────────────────────────────────────── */

.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.hamburger {
  display: none; background: none; border: none;
  color: var(--text2); font-size: 18px; cursor: pointer;
}
.topbar-controls { display: flex; align-items: center; gap: 10px; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.region-wrap {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 10px; height: 36px;
  color: var(--text2);
}
.region-wrap select {
  background: transparent; border: none; color: var(--text);
  font-size: 13px; font-family: var(--font-body); cursor: pointer; outline: none;
}
.region-wrap select option { background: var(--bg3); }

.search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0 12px; height: 36px;
  flex: 1; max-width: 340px; color: var(--text2);
}
.search-wrap input {
  background: transparent; border: none; color: var(--text);
  font-size: 13px; font-family: var(--font-body); outline: none; flex: 1; width: 100%;
}
.search-wrap input::placeholder { color: var(--text3); }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 15px;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--bg3); color: var(--text); }

.refresh-time { font-size: 11px; color: var(--text3); }

/* ── TAB PANELS ──────────────────────────────────────── */

.tab-panel { display: none; padding: 24px; }
.tab-panel.active { display: block; }

.panel-header { margin-bottom: 20px; }
.panel-header h1 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.5px; margin-bottom: 12px;
}
.panel-subtitle { font-size: 13px; color: var(--text2); margin-top: -8px; }

/* ── CATEGORY CHIPS ──────────────────────────────────── */

.cat-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.chip {
  height: 30px; padding: 0 14px;
  border-radius: 99px; border: 1px solid var(--border2);
  background: transparent; color: var(--text2);
  font-size: 12px; font-family: var(--font-body);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.chip:hover { background: var(--bg3); color: var(--text); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── STATS ROW ───────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; align-items: center; gap: 12px;
}
.stat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: color-mix(in srgb, var(--sc) 12%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--sc); font-size: 18px; flex-shrink: 0;
}
.stat-val {
  font-family: var(--font-head); font-size: 20px; font-weight: 700;
  letter-spacing: -0.5px; line-height: 1;
}
.stat-label { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── VIDEOS GRID ─────────────────────────────────────── */

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.video-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.video-card:hover { border-color: var(--border2); transform: translateY(-2px); }

.thumb-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg3); }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.video-card:hover .thumb-wrap img { transform: scale(1.04); }

.rank-tag {
  position: absolute; top: 7px; left: 7px;
  background: rgba(0,0,0,0.72); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; backdrop-filter: blur(4px);
}
.rank-tag.top3 { background: var(--accent); }
.dur-tag {
  position: absolute; bottom: 7px; right: 7px;
  background: rgba(0,0,0,0.78); color: #fff;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
}

.video-body { padding: 10px 12px 12px; }
.video-title {
  font-size: 12.5px; font-weight: 500; line-height: 1.45;
  color: var(--text); display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 8px;
}
.video-meta {
  display: flex; justify-content: space-between; align-items: center;
}
.video-ch {
  font-size: 11px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58%;
}
.video-views { font-size: 11px; color: var(--text3); white-space: nowrap; }

/* ── CHANNELS ────────────────────────────────────────── */

.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.channel-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; transition: border-color 0.15s;
}
.channel-card:hover { border-color: var(--border2); }
.channel-thumb {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0; background: var(--bg4);
}
.channel-thumb-ph {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.channel-name { font-size: 13.5px; font-weight: 600; }
.channel-subs { font-size: 11px; color: var(--text3); margin-top: 2px; }
.channel-videos-badge {
  margin-left: auto; flex-shrink: 0;
  font-size: 10px; color: var(--accent);
  background: rgba(226,75,74,0.1); padding: 3px 8px; border-radius: 5px;
}

/* ── COMPARE ─────────────────────────────────────────── */

.compare-chart { margin-top: 8px; }
.compare-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.compare-label { font-size: 12px; color: var(--text2); width: 110px; flex-shrink: 0; }
.compare-track { flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.compare-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.compare-num { font-size: 11px; color: var(--text3); width: 52px; text-align: right; flex-shrink: 0; }

.compare-section-title {
  font-family: var(--font-head); font-size: 14px; font-weight: 600;
  margin-bottom: 14px; margin-top: 20px;
  display: flex; align-items: center; gap: 8px;
}
.compare-section-title:first-child { margin-top: 0; }

/* ── KEYWORD ─────────────────────────────────────────── */

.keyword-add-row { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; }

.keyword-track-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.kw-text { font-size: 14px; font-weight: 600; flex: 1; }
.kw-region { font-size: 11px; color: var(--text3); }
.kw-stat { font-size: 12px; color: var(--text2); }
.kw-del { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 14px; }
.kw-del:hover { color: var(--accent); }

.search-result-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: border-color 0.15s;
}
.search-result-card:hover { border-color: var(--border2); }
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* ── PRO GATE ────────────────────────────────────────── */

.pro-gate {
  display: flex; align-items: flex-start; gap: 12px;
  background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px;
  font-size: 13px;
}
.pro-gate .ti { font-size: 18px; color: var(--purple); flex-shrink: 0; margin-top: 1px; }
.pro-gate strong { display: block; font-weight: 600; margin-bottom: 2px; }
.pro-gate p { color: var(--text2); line-height: 1.5; }
.pro-gate a { color: var(--purple); text-decoration: none; }
.pro-gate a:hover { text-decoration: underline; }

/* ── MODAL ───────────────────────────────────────────── */

.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); z-index: 200;
  align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 16px; width: 100%; max-width: 680px;
  max-height: 88vh; overflow-y: auto;
  position: relative; padding: 24px;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg3); border: none; color: var(--text2);
  cursor: pointer; font-size: 14px; display: flex;
  align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--bg4); color: var(--text); }

/* video modal content */
.modal-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.modal-channel { font-size: 13px; color: var(--text2); margin-bottom: 14px; }
.modal-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.modal-stat { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text2); }
.modal-stat .ti { color: var(--accent); }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.modal-tag {
  font-size: 11px; background: var(--bg3); color: var(--text2);
  padding: 3px 8px; border-radius: 5px;
}
.modal-watch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  border-radius: var(--radius); padding: 10px 18px;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
  transition: background 0.15s;
}
.modal-watch-btn:hover { background: #C93C3B; }


.modal-watch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}

.modal-watch-btn:hover {
  background: #C93C3B;
}

.modal-adfree-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;
  border-radius: var(--radius);

  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;

  background: linear-gradient(135deg,#8b5cf6,#7c3aed);
  box-shadow: 0 4px 14px rgba(124,58,237,.35);

  transition: all .25s ease;
}

.modal-adfree-btn:hover {
  background: linear-gradient(135deg,#7c3aed,#6d28d9);
  transform: translateY(-2px);
}

/* upgrade modal */
.upgrade-modal-box { max-width: 820px; }
.upgrade-header { text-align: center; margin-bottom: 24px; }
.upgrade-header .ti { font-size: 36px; color: var(--amber); }
.upgrade-header h2 { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin-top: 8px; }
.upgrade-header p  { font-size: 13px; color: var(--text2); margin-top: 4px; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.plan-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px; position: relative;
}
.plan-card-highlight {
  background: rgba(226,75,74,0.06);
  border-color: rgba(226,75,74,0.35);
}
.plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  white-space: nowrap;
}
.plan-name { font-size: 12px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.plan-price { font-family: var(--font-head); font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--text2); }
.plan-features { list-style: none; margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.plan-features li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text2); }
.plan-features li .ti { font-size: 13px; color: var(--green); flex-shrink: 0; }
.plan-features li.off .ti { color: var(--text3); }
.plan-features li.off { color: var(--text3); }
.plan-btn { width: 100%; height: 38px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600; cursor: pointer; transition: opacity 0.15s; }
.plan-btn-primary { background: var(--accent); color: #fff; border: none; }
.plan-btn-primary:hover { opacity: 0.88; }
.plan-btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--text); }
.plan-btn-outline:hover { background: var(--bg4); }

/* ── BUTTONS ─────────────────────────────────────────── */

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--radius);
  background: var(--accent); color: #fff; border: none;
  font-size: 13px; font-weight: 600; font-family: var(--font-body);
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.btn-primary:hover { background: #C93C3B; }

/* ── STATES ──────────────────────────────────────────── */

.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px;
  padding: 60px 20px; color: var(--text3); font-size: 13px;
  grid-column: 1 / -1;
}
.spinner-lg {
  width: 28px; height: 28px;
  border: 2.5px solid var(--bg3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 60px 20px; color: var(--text3);
  font-size: 13px; text-align: center;
}
.empty-state .ti { font-size: 36px; }

/* ── TOAST ───────────────────────────────────────────── */

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--border2);
  padding: 9px 18px; border-radius: var(--radius);
  font-size: 13px; color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4); z-index: 999;
  display: none; white-space: nowrap; max-width: 90vw;
}
.toast.err { border-color: rgba(226,75,74,0.4); color: #ff8a89; }

/* ── RESPONSIVE ──────────────────────────────────────── */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
  }
  .main { margin-left: 0; }
  .hamburger { display: flex; align-items: center; }
  .tab-panel { padding: 16px; }
  .videos-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .panel-header h1 { font-size: 18px; }
  .topbar { padding: 12px 16px; }
}

/* ── SORT BAR ────────────────────────────────────────── */

.sort-bar {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.sort-label {
  font-size: 12px; color: var(--text3);
  display: flex; align-items: center; gap: 4px;
  margin-right: 4px; white-space: nowrap;
}
.sort-chip {
  height: 26px; padding: 0 10px;
  border-radius: 99px; border: 1px solid var(--border);
  background: transparent; color: var(--text3);
  font-size: 11.5px; font-family: var(--font-body);
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.sort-chip:hover  { background: var(--bg3); color: var(--text2); }
.sort-chip.active { background: var(--bg3); color: var(--text); border-color: var(--border2); }

/* ── VIRAL BADGES (on card) ──────────────────────────── */

.viral-tag {
  position: absolute; top: 7px; right: 7px;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  backdrop-filter: blur(4px);
}
.viral-tag.viral-fire   { background: rgba(226,75,74,0.85);  color: #fff; }
.viral-tag.viral-bolt   { background: rgba(245,158,11,0.85); color: #fff; }
.viral-tag.viral-rising { background: rgba(99,102,241,0.85); color: #fff; }

/* ── CARD STATS ROW ──────────────────────────────────── */

.video-card-stats {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 7px; flex-wrap: wrap;
}
.vcs-item {
  display: flex; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--text3); white-space: nowrap;
}
.vcs-item .ti { font-size: 10px; }

.viral-score-pill {
  margin-left: auto; flex-shrink: 0;
  font-size: 10px; font-weight: 700;
  background: var(--bg3); color: var(--text3);
  padding: 2px 6px; border-radius: 4px; letter-spacing: 0.3px;
}

/* ── MODAL ENHANCEMENTS ──────────────────────────────── */

.modal-viral-badge {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
  backdrop-filter: blur(6px);
}
.modal-viral-badge.viral-fire   { background: rgba(226,75,74,0.9);  color: #fff; }
.modal-viral-badge.viral-bolt   { background: rgba(245,158,11,0.9); color: #fff; }
.modal-viral-badge.viral-rising { background: rgba(99,102,241,0.9); color: #fff; }

.modal-channel {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text2); margin-bottom: 14px;
}
.modal-ago {
  margin-left: auto; font-size: 11px; color: var(--text3);
  background: var(--bg3); padding: 2px 8px; border-radius: 4px;
}

/* Engagement rate bar */
.modal-eng-section {
  background: var(--bg3); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px;
}
.modal-eng-header {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--text2); margin-bottom: 10px;
}
.modal-eng-track {
  height: 6px; background: var(--bg4);
  border-radius: 3px; overflow: visible; position: relative; margin-bottom: 18px;
}
.modal-eng-fill {
  height: 100%; border-radius: 3px; transition: width 0.5s ease;
  position: relative; z-index: 1;
}
.modal-eng-markers {
  position: absolute; top: 10px; left: 0; right: 0;
  display: flex; pointer-events: none;
}
.modal-eng-markers span {
  position: absolute; font-size: 9px; color: var(--text3);
  transform: translateX(-50%);
}

/* Velocity */
.modal-velocity {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text2);
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius); padding: 9px 14px; margin-bottom: 12px;
}
.modal-velocity strong { color: var(--text); }

/* Share row */
.modal-share-row {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap; margin-bottom: 14px;
}
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--radius);
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text2); font-size: 12.5px; font-family: var(--font-body);
  cursor: pointer; text-decoration: none; transition: background 0.15s;
  white-space: nowrap;
}
.share-btn:hover { background: var(--bg4); color: var(--text); }
.share-wa { color: #25D366; border-color: rgba(37,211,102,0.25); }
.share-wa:hover { background: rgba(37,211,102,0.08); }

/* Related videos */
.modal-related-title {
  font-size: 12px; font-weight: 600; color: var(--text2);
  margin: 16px 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.modal-related-list { display: flex; flex-direction: column; gap: 8px; }
.modal-related-item {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg3); border-radius: var(--radius);
  padding: 8px; cursor: pointer; transition: background 0.15s;
}
.modal-related-item:hover { background: var(--bg4); }
.modal-related-item img {
  width: 80px; height: 45px; object-fit: cover;
  border-radius: 5px; flex-shrink: 0;
}
.rel-thumb-ph {
  width: 80px; height: 45px; background: var(--bg4);
  border-radius: 5px; flex-shrink: 0;
}
.modal-related-body { flex: 1; min-width: 0; }
.modal-related-title-sm {
  font-size: 12px; font-weight: 500; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 4px;
}
.modal-related-views { font-size: 11px; color: var(--text3); display: flex; align-items: center; gap: 4px; }