/* ═══════════════════════════════════════════════════════════════
   FIGHTPORN — dark theme
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #060606;
  --bg-2: #0d0d0d;
  --panel: #111113;
  --panel-2: #17171a;
  --line: #232326;
  --text: #f2f2f2;
  --muted: #8b8b93;
  --dim: #5a5a62;
  --red: #e50914;
  --red-bright: #ff2233;
  --red-dark: #b0060f;
  --yellow: #ffd400;
  --green: #2ecc71;
  --font-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.hidden { display: none !important; }

/* The `hidden` attribute must always win — even over `display: flex` on the
   same element. Without this, a class like .player-overlay { display:flex }
   silently overrides hidden and the modal shows up on page load with no way
   to close it. */
[hidden] { display: none !important; }

/* ─────────────────────────── TOP BAR ─────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 6, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-globe {
  font-size: 26px;
  filter: grayscale(0.2);
  display: inline-block;
  animation: spin-slow 24s linear infinite;
}

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

.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: #fff;
  white-space: nowrap;
}

.logo-text em {
  font-style: normal;
  color: var(--red-bright);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-link {
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: 6px;
  transition: color 0.18s ease, background 0.18s ease;
  position: relative;
}

.nav-link:hover { color: #fff; background: var(--panel); }

.nav-link.active { color: #fff; }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color 0.18s, background 0.18s, transform 0.12s;
}

.icon-btn:hover { border-color: var(--red); background: var(--panel-2); transform: translateY(-1px); }

.btn-hot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--red);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 0 18px rgba(229, 9, 20, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-hot:hover { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 28px rgba(229, 9, 20, 0.55); }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: pulse 1.8s infinite;
}

.btn-hot .pulse-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
  70% { box-shadow: 0 0 0 9px rgba(46, 204, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* search bar */
.search-bar {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.search-bar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-body);
}

.search-bar input::placeholder { color: var(--dim); }

.search-hint {
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.5px;
}

/* ─────────────────────────── TICKER ─────────────────────────── */

.ticker {
  background: var(--red);
  overflow: hidden;
  white-space: nowrap;
  padding: 7px 0;
  border-bottom: 1px solid #000;
}

.ticker-track {
  display: inline-block;
  animation: ticker 28s linear infinite;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 3px;
  color: #fff;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─────────────────────────── HERO ─────────────────────────── */

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(229, 9, 20, 0.22), transparent 55%),
    linear-gradient(180deg, #0a0a0a 0%, #050505 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 30%, transparent 75%);
}

.hero-shell {
  position: relative;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 64px 24px 56px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  padding: 8px 16px;
  border-radius: 6px;
  margin-bottom: 22px;
  box-shadow: 0 4px 24px rgba(229, 9, 20, 0.4);
}

.hero-badge .pulse-dot { background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,0.6); animation: pulse 1.6s infinite; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.2vw, 52px);
  line-height: 1.12;
  max-width: 900px;
  text-transform: uppercase;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.hero-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.hero-meta .views { color: var(--yellow); font-weight: 800; }

.btn-play-hero {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #000;
  border: none;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 2px;
  padding: 15px 30px;
  border-radius: 8px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.btn-play-hero:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 40px rgba(229, 9, 20, 0.45);
}

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

.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.grid-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.grid-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.grid-title::before {
  content: "";
  width: 6px;
  height: 30px;
  background: var(--red);
  border-radius: 3px;
}

.grid-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.sort-pills {
  display: flex;
  gap: 6px;
  background: var(--panel);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
}

.pill {
  padding: 8px 16px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: all 0.18s;
}

.pill:hover { color: #fff; }
.pill.active { background: var(--red); color: #fff; box-shadow: 0 2px 12px rgba(229, 9, 20, 0.4); }

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: all 0.18s;
}

.refresh-btn:hover { border-color: var(--red); color: var(--red-bright); }
.refresh-btn.spinning svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* fight-type filter pills */
.fight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.fight-pill {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: all 0.16s;
}

.fight-pill:hover { border-color: var(--red); color: #fff; transform: translateY(-1px); }
.fight-pill.active {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 3px 16px rgba(229, 9, 20, 0.4);
}

/* tag row */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.tag-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.16s;
}

.tag-chip:hover { border-color: var(--red); color: #fff; }
.tag-chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* offline-mode notice — shown when the WSH feed is down and the grid is
   running on demo cards. Yellow = degraded but browsable, matching the
   LIVE-dot's offline color. */
.offline-note {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: rgba(255, 212, 0, 0.06);
  border: 1px solid rgba(255, 212, 0, 0.35);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 13px 18px;
  margin-bottom: 22px;
  animation: card-in 0.35s ease both;
}

.offline-icon { font-size: 18px; line-height: 1; }

.offline-msg {
  flex: 1;
  min-width: 220px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.offline-msg strong { color: var(--yellow); }

.offline-refresh {
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 212, 0, 0.4);
  background: transparent;
  color: var(--yellow);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.18s;
}

.offline-refresh:hover { background: var(--yellow); color: #000; }
.offline-refresh:disabled { opacity: 0.5; cursor: wait; }

/* video grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1180px) { .grid { grid-template-columns: repeat(3, 1fr); } }
/* With side rails present (1200-1439px viewport) the main column is ~860px
   wide, so 4 columns would cramp cards to ~180px. Drop to 3 while rails
   are shown. */
@media (min-width: 1200px) and (max-width: 1439px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 520px)  { .grid { grid-template-columns: 1fr; } }

/* ─────────────── VIDEO CARD ─────────────── */

.vcard {
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1.2), border-color 0.22s, box-shadow 0.22s;
  animation: card-in 0.4s ease both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.vcard:hover {
  transform: translateY(-5px);
  border-color: var(--red);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(229, 9, 20, 0.25);
}

.vcard:focus-visible {
  outline: 2px solid var(--red-bright);
  outline-offset: 3px;
}

.thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.vcard:hover .thumb-wrap img { transform: scale(1.07); }

.thumb-grad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.vcard:hover .play-overlay { opacity: 1; }

.play-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.7);
  transform: scale(0.7);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1.4), box-shadow 0.25s;
}

.vcard:hover .play-circle { transform: scale(1); box-shadow: 0 0 40px rgba(229, 9, 20, 0.7); animation: pulse-ring 1.6s infinite; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.6); }
  70% { box-shadow: 0 0 0 18px rgba(229, 9, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); }
}

.duration-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 5px;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-stack {
  position: absolute;
  left: 10px;
  top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.source-badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
}

.fight-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 10px rgba(229, 9, 20, 0.5);
}

.source-badge.demo { background: var(--panel-2); color: var(--dim); border: 1px solid var(--line); }

.card-body {
  padding: 14px 16px 16px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
  transition: color 0.18s;
}

.vcard:hover .card-title { color: var(--red-bright); }

.card-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
}

.card-meta .views { color: var(--muted); }

.card-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* skeleton */
.skeleton-card {
  aspect-ratio: 16 / 12;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--line);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ─────────────── LOAD MORE ─────────────── */

.load-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
}

.load-more {
  padding: 15px 44px;
  border-radius: 8px;
  border: 2px solid var(--red);
  background: transparent;
  color: var(--red-bright);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  transition: all 0.2s;
}

.load-more:hover { background: var(--red); color: #fff; box-shadow: 0 6px 30px rgba(229, 9, 20, 0.4); }

.load-status { font-size: 13px; color: var(--dim); min-height: 18px; }

/* ─────────────── AD SLOTS (mid-grid / side rails / bottom) ─────────────── */

.ad-slot { margin-top: 48px; }

.ad-label {
  display: block;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 3px;
  color: var(--dim);
  margin-bottom: 10px;
}

.ad-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  background: var(--panel);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ad-box:hover { border-color: var(--red); box-shadow: 0 0 30px rgba(229, 9, 20, 0.15); }

.ad-box-big {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--muted);
}

.ad-box-contact {
  font-size: 13px;
  font-weight: 700;
  color: var(--red-bright);
  letter-spacing: 0.5px;
}

/* shared banner (side rails + bottom strip) */
.ad-banner,
.ad-box {
  position: relative;
}

.ad-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
  /* min-height animates so a size rotation morphs smoothly as the ad fades
     back in, instead of the grid below snapping up/down */
  transition: opacity 0.35s ease, min-height 0.45s ease, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ad-box {
  transition: opacity 0.35s ease, min-height 0.45s ease, border-color 0.2s, box-shadow 0.2s;
}

/* fade-out phase while a rotating ad swaps its creative */
.ad-fading { opacity: 0; }

/* ── rotating creative size variants ── */
.ad-size-h1 { min-height: 64px; }
.ad-size-h2 { min-height: 96px; }
.ad-size-h3 { min-height: 128px; }

.ad-size-v1 { min-height: 300px; }
.ad-size-v2 { min-height: 380px; }
.ad-size-v3 { min-height: 460px; }

.ad-size-m1 { min-height: 200px; }
.ad-size-m2 { min-height: 260px; }
.ad-size-m3 { min-height: 320px; }

/* ── rotating creative color themes ── */
.ad-theme-classic { background: var(--panel); }

.ad-theme-sponsored {
  border-color: var(--red-dark);
  background: linear-gradient(180deg, #1a0d0e, var(--panel));
}
.ad-theme-sponsored .ad-tag {
  border-color: var(--red);
  color: var(--red-bright);
}

.ad-theme-promoted {
  border-color: #8a6d00;
  background: linear-gradient(180deg, #171503, var(--panel));
}
.ad-theme-promoted .ad-tag {
  border-color: var(--yellow);
  color: var(--yellow);
}

.ad-theme-gradient {
  border-color: #7a1f2a;
  background: linear-gradient(135deg, #1c0d10, #141419 55%, #1d0f06);
}
.ad-theme-gradient .ad-tag {
  border-color: #c2303e;
  color: #ff5a66;
}

/* click counter badge on every ad */
.ad-count {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  line-height: 1.4;
  pointer-events: none;
  white-space: nowrap;
}

.ad-banner:hover .ad-count,
.ad-box:hover .ad-count {
  border-color: var(--red);
  color: var(--red-bright);
}

.ad-banner:hover {
  border-color: var(--red);
  box-shadow: 0 0 34px rgba(229, 9, 20, 0.2);
  transform: translateY(-2px);
}

.ad-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 7px;
}

.ad-text {
  font-family: var(--font-display);
  letter-spacing: 2px;
  color: var(--muted);
}

.ad-contact {
  font-weight: 700;
  color: var(--red-bright);
  font-size: 12px;
  word-break: break-all;
}

/* page shell — main column flanked by sticky side rails */
.page-shell {
  max-width: 1780px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.page-shell .main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
}

.ad-rail {
  flex: 0 0 160px;
  width: 160px;
  position: sticky;
  top: 120px; /* clears the sticky topbar even when the search bar is open */
  margin-top: 40px;
}

.ad-banner-v { padding: 26px 16px; }
.ad-banner-v .ad-text { font-size: 16px; }
.ad-banner-v .ad-contact { font-size: 10px; letter-spacing: 0.2px; }

/* bottom strip — full-width-ish above the footer */
.ad-bottom {
  max-width: 1780px;
  margin: 0 auto;
  padding: 0 24px 36px;
}

.ad-banner-h {
  flex-direction: row;
  gap: 22px;
  padding: 20px 32px;
}

.ad-banner-h .ad-text { font-size: 20px; }
.ad-banner-h .ad-contact { font-size: 15px; }

/* in-grid ad — full-width banner row spanning all grid columns */
.ad-in-grid {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 22px;
  padding: 20px 32px;
}

.ad-in-grid .ad-text { font-size: 20px; }
.ad-in-grid .ad-contact { font-size: 15px; }

/* once the viewport gets too narrow for 160px rails + a usable grid,
   drop the rails and let the bottom + mid-grid ads carry the load */
@media (max-width: 1199px) {
  .ad-rail { display: none; }
  .page-shell { display: block; padding: 0; }
  .page-shell .main { max-width: 1440px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .ad-banner-h,
  .ad-in-grid { flex-direction: column; gap: 8px; text-align: center; }
}

/* ─────────────── FOOTER ─────────────── */

.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 48px 24px 40px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 40px;
}

@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr; gap: 28px; } }

.footer-brand p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 360px;
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: var(--muted); font-size: 13.5px; font-weight: 600; transition: color 0.15s, padding-left 0.15s; }
.footer-links a:hover { color: var(--red-bright); padding-left: 4px; }

.footer-note { color: var(--dim); font-size: 12.5px; line-height: 1.7; }
.footer-note strong { color: var(--muted); }

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

.player-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.22s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.player-shell {
  position: relative;
  width: min(1080px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
  animation: modal-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1.2);
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.player-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.15s;
}

.player-close:hover { background: var(--red); transform: rotate(90deg); }

.player-stage {
  position: relative;
  background: #000;
  /* The stage shrink-wraps whatever the video renders at, capped so it
     never exceeds the modal or the viewport height. No fixed aspect-ratio:
     portrait fights (9:16) get a tall centered box, landscape (16:9) get
     a wide one — exactly like a YouTube/TikTok player. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;    /* skeleton area while metadata loads */
  max-height: 72vh;
  max-width: 100%;
  align-self: center;   /* don't stretch to the shell's full width */
  /* The modal shell is a column flex with max-height — without this it
     squashes the stage below the video's natural height and the video
     spills out of its box. The stage must keep the video's size. */
  flex: 0 0 auto;
}

.player-stage video {
  /* Let the video's OWN intrinsic ratio decide its box: width/height auto
     + max constraints = scales down to fit without ever distorting or
     overflowing. The old fixed height:100% made the stage balloon to the
     video's full resolution (only its top-left corner visible). */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72vh;
  display: block;
  object-fit: contain;
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* skeleton loader for the player (replaces the old spinner) */
.player-skeleton {
  width: 78%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sk {
  border-radius: 6px;
  background: linear-gradient(100deg, #19191d 40%, #25252b 50%, #19191d 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

.sk-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.sk-line { height: 14px; }

.player-info { padding: 22px 26px 26px; overflow-y: auto; }

.player-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.player-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.25;
  text-transform: uppercase;
}

.player-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.player-meta .views { color: var(--yellow); }

.player-tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ─────────────── ANON COMMENTS ─────────────── */

.comments {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.comments-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comments-head h3 {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#commentCount { color: var(--dim); font-size: 12px; font-weight: 700; }

.no-comments {
  color: var(--dim);
  font-size: 13px;
  padding: 12px 0 6px;
}

.comment {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.comment:last-child { border-bottom: none; }
.comment.pending { opacity: 0.55; }

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-name { font-size: 12.5px; font-weight: 800; color: var(--yellow); }
.comment-state { font-size: 10px; font-weight: 700; color: var(--muted); font-style: italic; }
.comment-time { margin-left: auto; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

.comment-body {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-form {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--red); }

.comment-form input { max-width: 280px; }
.comment-form textarea { resize: vertical; min-height: 54px; }

.comment-submit {
  align-self: flex-end;
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.18s;
}

.comment-submit:hover {
  background: var(--red-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.4);
}

.comment-form.sending .comment-submit { opacity: 0.6; pointer-events: none; }

/* toast */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.3, 1.3);
}

.toast.error { border-left-color: var(--red); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--panel-2); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ─────────────── MOBILE TOPBAR FIX ───────────────
   On narrow phones the logo (195px) + actions (135px) + gaps + padding
   exceeded 379px, shaving the LIVE button's edge and overflowing the
   layout. Tighter paddings/gaps + a shrinkable logo keep everything in
   bounds down to ~320px wide. */

@media (max-width: 480px) {
  .topbar-inner { padding: 0 14px; gap: 12px; }
  .logo { gap: 8px; }
  .logo-globe { font-size: 20px; }
  .logo-text { font-size: 15px; letter-spacing: 0.5px; }
  .topbar-actions { gap: 8px; }
  .btn-hot { padding: 7px 10px; font-size: 10px; gap: 5px; }
  .icon-btn { width: 34px; height: 34px; }
  .search-bar-inner { padding: 12px 14px; gap: 10px; }
}

@media (max-width: 360px) {
  .logo-text { font-size: 13.5px; letter-spacing: 0; }
  .logo-globe { font-size: 17px; }
  .btn-hot { padding: 6px 8px; font-size: 9.5px; }
  .icon-btn { width: 30px; height: 30px; }
}

/* ─────────────── AGE GATE ─────────────── */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 3, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}

.age-gate-card {
  width: 100%;
  max-width: 430px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 34px 34px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  animation: rise 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.15) both;
}

.age-gate-icon { font-size: 44px; margin-bottom: 14px; }

.age-gate-card h2 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--red-bright);
  margin-bottom: 12px;
}

.age-gate-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 26px;
}

.age-gate-actions { display: flex; flex-direction: column; gap: 10px; }

.age-gate-actions button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.age-yes {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 6px 24px rgba(229, 9, 20, 0.35);
}

.age-yes:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(229, 9, 20, 0.5); }

.age-no {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--line);
}

.age-no:hover { color: var(--text); }

