/* ═══════════════════════════════════════════════════════════════════════════
   ReactHub — Visual Boost Layer
   Overrides base style.css with premium design upgrades
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Extra variables ──────────────────────────────────────────────────────── */
:root {
  --glow-red:    rgba(255, 68,  68, .25);
  --glow-red-s:  rgba(255, 68,  68, .12);
  --glass-bg:    rgba(15, 15, 15, .82);
  --glass-border:rgba(255,255,255,.07);
  --card-bg:     #161616;
  --card-radius: 12px;
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
}

/* ── Custom scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar              { width: 5px; height: 5px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: #2e2e2e; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover  { background: var(--accent); }

/* ── Header — glassmorphism ───────────────────────────────────────────────── */
header {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border) !important;
}

.logo {
  font-size: 1.4rem;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #ff4444 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.logo span {
  -webkit-text-fill-color: transparent;
}

.search-wrap input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.search-wrap input:focus {
  background: rgba(255,255,255,.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-red-s);
}

/* ── Stats bar with gradient divider ─────────────────────────────────────── */
.stats-bar {
  background: linear-gradient(180deg, #1c1c1c 0%, #161616 100%);
  position: relative;
}
.stats-bar::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--accent) 70%, transparent 100%);
  opacity: .35;
}
.stat-num {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.stat-item.active .stat-num,
.stat-item:hover .stat-num { color: var(--accent); }

/* ── Filters bar — glass ──────────────────────────────────────────────────── */
.filters-bar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border) !important;
}

/* ── Filter chips — bounce + glow ────────────────────────────────────────── */
.filter-chip, .lang-chip, .cat-chip, .sort-chip, .topic-chip, .type-tab {
  transition: all .22s var(--ease-bounce);
}
.filter-chip:hover:not(.active),
.lang-chip:hover:not(.active),
.cat-chip:hover:not(.active) {
  transform: translateY(-2px);
}
.filter-chip.active,
.lang-chip.active,
.cat-chip.active,
.type-tab.active {
  box-shadow: 0 4px 18px var(--glow-red);
}

/* ── Surprise button ──────────────────────────────────────────────────────── */
.btn-surprise {
  background: linear-gradient(135deg, #ff4444 0%, #ff7700 100%) !important;
  box-shadow: 0 4px 22px rgba(255, 68, 68, .4);
  transition: opacity .2s, transform .2s, box-shadow .2s !important;
}
.btn-surprise:hover {
  opacity: 1 !important;
  transform: scale(1.05) !important;
  box-shadow: 0 6px 32px rgba(255, 68, 68, .55) !important;
}
@keyframes surprisePulse {
  0%, 100% { box-shadow: 0 4px 22px rgba(255, 68, 68, .4); }
  50%       { box-shadow: 0 4px 32px rgba(255, 68, 68, .65); }
}
.btn-surprise { animation: surprisePulse 2.5s ease-in-out infinite; }
.btn-surprise:hover { animation: none; }

/* ── Reaction cards ───────────────────────────────────────────────────────── */
.reaction-card {
  background: var(--card-bg);
  border: 1px solid #222;
  border-radius: var(--card-radius) !important;
  transition: transform .28s var(--ease-bounce),
              box-shadow .28s ease,
              border-color .28s ease !important;
  will-change: transform;
}
.reaction-card:hover {
  transform: translateY(-7px) scale(1.01) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.55),
              0 0 0 1px rgba(255,68,68,.25),
              0 4px 20px var(--glow-red);
  border-color: rgba(255, 68, 68, .35) !important;
}

/* Thumbnail */
.reaction-thumb {
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  overflow: hidden;
}
.reaction-thumb img {
  transition: transform .4s var(--ease-smooth) !important;
}
.reaction-card:hover .reaction-thumb img {
  transform: scale(1.06) !important;
}

/* Play overlay — gradient instead of plain black */
.play-overlay {
  background: linear-gradient(
    135deg,
    rgba(255, 68, 68, .1) 0%,
    rgba(0, 0, 0, .5) 100%
  ) !important;
}

/* Play button — pulsing ring */
.play-btn {
  width: 60px !important;
  height: 60px !important;
  background: rgba(255, 68, 68, .92) !important;
  box-shadow: 0 0 0 0 rgba(255, 68, 68, .5);
  border-radius: 50% !important;
}
@keyframes ringPulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,68,68,.55); }
  70%  { box-shadow: 0 0 0 18px rgba(255,68,68,0); }
  100% { box-shadow: 0 0 0 0   rgba(255,68,68,0); }
}
.reaction-card:hover .play-btn {
  animation: ringPulse 1.2s ease-out infinite;
}

/* Lang badge — glassmorphism */
.lang-badge {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0,0,0,.65) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 6px !important;
  font-size: 9px !important;
  letter-spacing: .1em;
  font-weight: 800 !important;
}

/* Duration badge */
.duration-badge {
  background: rgba(0,0,0,.78) !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  letter-spacing: .02em;
}

/* Card info */
.reaction-info { padding: 14px !important; }
.reaction-title {
  font-size: 13.5px !important;
  letter-spacing: -.01em;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.section-header h2,
.topic-main-header h2,
.trending-head h2,
.browse-section-header h2 {
  letter-spacing: -.02em;
}
.section-header h2::after {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: var(--accent);
  margin-top: 5px;
  border-radius: 1px;
}

/* ── Card entrance animation ──────────────────────────────────────────────── */
@keyframes cardFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.card-wrap {
  animation: cardFadeUp .45s var(--ease-smooth) both;
}
/* Stagger first 8 cards */
.card-wrap:nth-child(1)  { animation-delay: .03s; }
.card-wrap:nth-child(2)  { animation-delay: .07s; }
.card-wrap:nth-child(3)  { animation-delay: .11s; }
.card-wrap:nth-child(4)  { animation-delay: .15s; }
.card-wrap:nth-child(5)  { animation-delay: .19s; }
.card-wrap:nth-child(6)  { animation-delay: .23s; }
.card-wrap:nth-child(7)  { animation-delay: .27s; }
.card-wrap:nth-child(8)  { animation-delay: .31s; }

/* Cards loaded later (via IntersectionObserver in app.js) */
.card-wrap.is-hidden {
  opacity: 0;
  transform: translateY(20px) scale(.98);
  animation: none;
}
.card-wrap.is-visible {
  animation: cardFadeUp .45s var(--ease-smooth) both;
}

/* ── Topic cards — shine sweep ────────────────────────────────────────────── */
.topic-card-img {
  overflow: hidden;
  position: relative;
}
.topic-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,.09) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  transition: transform .5s ease;
}
.topic-card:hover .topic-card-img::after {
  transform: translateX(100%);
}
.topic-card:hover {
  transform: translateY(-4px) scale(1.02) !important;
}

/* ── Modal — premium glass ────────────────────────────────────────────────── */
.modal-backdrop {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0,0,0,.78) !important;
}
.modal {
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 40px 100px rgba(0,0,0,.85),
              0 0 0 1px rgba(255,68,68,.08) !important;
  border-radius: 16px !important;
}
.modal-video {
  border-radius: 16px 16px 0 0 !important;
}
.modal-ep-btn:hover:not(:disabled) {
  box-shadow: 0 4px 14px var(--glow-red);
}

/* ── Topic hero ───────────────────────────────────────────────────────────── */
.topic-hero {
  background: linear-gradient(180deg,
    rgba(255,68,68,.05) 0%,
    var(--bg) 100%) !important;
  border-bottom: 1px solid rgba(255,68,68,.12) !important;
}
.topic-hero-img {
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  border-color: rgba(255,68,68,.25) !important;
}
.topic-hero-info h1 {
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Reactor sidebar items ────────────────────────────────────────────────── */
.reactor-item {
  transition: background .18s, outline-color .18s, transform .18s var(--ease-bounce) !important;
}
.reactor-item:hover {
  transform: translateX(3px);
}
.reactor-item.active {
  outline-color: var(--accent) !important;
  background: rgba(255,68,68,.07) !important;
}

/* ── Trending page overview stats ────────────────────────────────────────── */
.overview-stat {
  background: linear-gradient(135deg, #1a1a1a 0%, #141414 100%) !important;
  border: 1px solid #222 !important;
  transition: transform .25s var(--ease-bounce), box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.overview-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #ff8c00);
  opacity: .7;
}
.overview-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(255,68,68,.15);
}
.overview-num {
  background: linear-gradient(135deg, #ff4444 0%, #ff8c00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.4rem !important;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination a {
  transition: all .2s var(--ease-bounce);
}
.pagination a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--glow-red);
}

/* ── Browse section header underline ──────────────────────────────────────── */
.browse-section-header h2 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO BANNER
   ══════════════════════════════════════════════════════════════════════════ */
.hero-banner {
  position: relative;
  height: 420px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 0;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  transform: scale(1.03);
  transition: transform 8s ease;
  filter: brightness(.55);
}
.hero-banner:hover .hero-bg { transform: scale(1.06); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10,10,10,.92) 0%,
    rgba(10,10,10,.55) 55%,
    rgba(10,10,10,.1)  100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 48px;
  max-width: 640px;
}
.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
  width: fit-content;
}
.hero-title {
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -.02em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.hero-sep { color: rgba(255,255,255,.3); }
.hero-cat { color: rgba(255,255,255,.55); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  letter-spacing: -.01em;
}
.hero-play-btn:hover {
  background: var(--accent-h);
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(255,68,68,.5);
}
.hero-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
  border: 1px solid rgba(255,255,255,.2);
}
.hero-info-btn:hover { background: rgba(255,255,255,.2); }

/* ══════════════════════════════════════════════════════════════════════════
   NETFLIX CONTENT ROWS
   ══════════════════════════════════════════════════════════════════════════ */
.content-row {
  padding: 28px 0 8px;
}
.content-row + .content-row { padding-top: 12px; }

.row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.row-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.row-see-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .15s;
  opacity: .85;
}
.row-see-all:hover { opacity: 1; text-decoration: underline; }
.row-see-all span { display: inline-block; transition: transform .2s; }
.row-see-all:hover span { transform: translateX(3px); }

.row-scroll-wrap {
  position: relative;
  overflow: hidden;
}
.row-scroll-wrap::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 14px;
  width: 80px;
  background: linear-gradient(to left, var(--bg), transparent);
  pointer-events: none;
  z-index: 1;
}
.row-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 14px;
  padding-top: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.row-track::-webkit-scrollbar { display: none; }

/* Row cards */
.row-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  border-radius: var(--card-radius) !important;
}
@media (max-width: 600px) { .row-card { flex: 0 0 200px; } }

/* ══════════════════════════════════════════════════════════════════════════
   CONTINUE WATCHING
   ══════════════════════════════════════════════════════════════════════════ */
.cw-section {
  padding: 20px 0 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.row-clear-btn {
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s;
  padding: 0;
}
.row-clear-btn:hover { color: var(--accent); }

.cw-card {
  position: relative;
}
.cw-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.15);
  z-index: 2;
}
.cw-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 0 0 0 var(--card-radius);
}
.cw-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  background: rgba(0,0,0,.7);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
  z-index: 3;
}
.cw-card:hover .cw-remove { opacity: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   LIVE SEARCH DROPDOWN
   ══════════════════════════════════════════════════════════════════════════ */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #1e1e1e;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
  overflow: hidden;
  z-index: 300;
  animation: dropIn .15s var(--ease-smooth);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.search-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s;
}
.search-dropdown-item:hover { background: rgba(255,255,255,.05); }
.search-dropdown-item:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,.04); }
.sd-thumb {
  width: 72px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #111;
}
.sd-info { flex: 1; min-width: 0; }
.sd-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.sd-sub { font-size: 11px; color: var(--muted); }
.sd-footer {
  padding: 10px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  background: rgba(255,68,68,.04);
  cursor: pointer;
  transition: background .12s;
}
.sd-footer:hover { background: rgba(255,68,68,.08); }

/* ── Responsive tweaks ────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .reaction-card:hover {
    transform: translateY(-4px) !important;
  }
  .topic-card:hover {
    transform: translateY(-2px) !important;
  }
  .hero-banner { height: 300px; }
  .hero-content { padding-bottom: 28px; }
}
