/* ============================================================
   CamZone Template 01 — Style System
   System font stack, dark premium theme
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono",
    Menlo, Consolas, monospace;

  /* Colors — Dark palette */
  --bg-base:       #07070f;
  --bg-surface:    #0d0d1a;
  --bg-elevated:   #13132b;
  --bg-card:       #0f0f20;
  --bg-card-hover: #141430;

  /* Borders */
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(255,255,255,0.14);
  --border-accent: rgba(168,85,247,0.35);

  /* Accent — violet → fuchsia */
  --accent:        #a855f7;
  --accent-2:      #f059a6;
  --accent-grad:   linear-gradient(135deg, #a855f7 0%, #f059a6 100%);
  --accent-glow:   0 0 24px rgba(168,85,247,0.35), 0 0 48px rgba(240,89,166,0.15);

  /* Semantic */
  --live:          #22c55e;
  --live-pulse:    rgba(34,197,94,0.4);
  --gold:          #f59e0b;
  --blue:          #3b82f6;

  /* Text */
  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-dim:      #7a8da0;  /* new: min 4.5:1 on dark bg, replaces muted for interactive UI */
  --text-muted:    #475569;  /* decorative only — do NOT use on interactive text */

  /* Sizing */
  --header-h:    60px;
  --sidebar-w:   228px;
  --mobile-nav-h: 60px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  /* Transitions */
  --t-fast:  150ms cubic-bezier(.4,0,.2,1);
  --t-base:  250ms cubic-bezier(.4,0,.2,1);
  --t-slow:  400ms cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }


/* ============================================================
   AGE VERIFICATION MODAL
   ============================================================ */
.age-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-base);

  /* Subtle noise texture via radial gradient */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(168,85,247,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(240,89,166,0.08) 0%, transparent 60%);
}

.age-modal.hidden { display: none; }

.age-modal__content {
  max-width: 480px;
  width: 100%;
  padding: 3rem 2.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  text-align: center;
  box-shadow: 0 0 80px rgba(168,85,247,0.15), 0 24px 64px rgba(0,0,0,0.5);
  animation: modal-in var(--t-slow) forwards;
}

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

.age-modal__logo {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.age-modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}

.age-modal__text {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.age-modal__buttons {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  padding: .5rem 1.125rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1;
  transition: all var(--t-fast);
  white-space: nowrap;
}

.btn--sm  { padding: .375rem .875rem; font-size: .8125rem; }
.btn--lg  { padding: .75rem 1.75rem;  font-size: 1rem; border-radius: var(--radius-md); }

.btn--primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 2px 12px rgba(168,85,247,0.35);
}
.btn--primary:hover {
  box-shadow: 0 4px 20px rgba(168,85,247,0.55);
  filter: brightness(1.08);
}
.btn--primary:active { filter: brightness(.95); }

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.04);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-accent);
}
.btn--outline:hover {
  background: rgba(168,85,247,0.08);
  border-color: var(--accent);
}


/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(7,7,15,.88);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 100%;
  padding: 0 1.25rem;
}

/* Hamburger */
.header__menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.header__menu-toggle:hover { background: rgba(255,255,255,0.06); }
.header__menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-base);
  transform-origin: center;
}
.header__menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__menu-toggle.is-active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.header__menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.04em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  flex-shrink: 0;
}
.header__logo-icon {
  -webkit-text-fill-color: transparent;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Search */
.header__search { flex: 1; max-width: 480px; margin: 0 auto; }

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-form__input {
  width: 100%;
  height: 36px;
  padding: 0 2.5rem 0 .875rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: .875rem;
  transition: all var(--t-fast);
  outline: none;
}
.search-form__input::placeholder { color: var(--text-dim); }
.search-form__input:focus {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}
.search-form__btn {
  position: absolute;
  right: .5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color var(--t-fast);
}
.search-form__btn:hover { color: var(--accent); }

/* Nav */
.header__nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.header__online {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--text-dim);
  margin-right: .25rem;
}
.header__online strong { color: var(--live); }

.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 var(--live-pulse);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 var(--live-pulse); }
  70%  { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}


/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100dvh;
}


/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  transition: transform var(--t-base);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Mobile: hidden by default */
@media (max-width: 899px) {
  .header__menu-toggle { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }
  .sidebar.is-open { transform: translateX(0); }
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--t-base);
}
.sidebar-overlay.is-visible {
  display: block;
  opacity: 1;
}

.sidebar__inner { padding: .75rem 0 5rem; }

.sidebar__section-title {
  padding: 1rem 1rem .5rem;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.sidebar__nav { display: flex; flex-direction: column; gap: 1px; }

.sidebar__link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 0;
  transition: all var(--t-fast);
  position: relative;
}
.sidebar__link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}
.sidebar__link.is-active {
  color: var(--text-primary);
  background: rgba(168,85,247,0.1);
}
.sidebar__link.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent-grad);
  border-radius: 0 3px 3px 0;
}

.sidebar__link-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .7;
}
.sidebar__link.is-active .sidebar__link-icon { opacity: 1; }

.sidebar__badge {
  margin-left: auto;
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  padding: 1px 6px;
  border-radius: 20px;
}

/* Tags cloud */
.sidebar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  padding: .5rem 1rem 1rem;
}

.sidebar__tag {
  font-size: .75rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  transition: all var(--t-fast);
}
.sidebar__tag:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: rgba(168,85,247,0.06);
}


/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  padding-bottom: calc(var(--mobile-nav-h) + 1rem);
}

@media (max-width: 899px) {
  .main { margin-left: 0; }
}


/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(7,7,15,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.filter-bar__inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-bar__inner::-webkit-scrollbar { display: none; }

.filter-group {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.filter-select {
  height: 32px;
  padding: 0 .625rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .8125rem;
  outline: none;
  transition: all var(--t-fast);
  cursor: pointer;
}
.filter-select:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.filter-select:focus {
  border-color: var(--border-accent);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}
.filter-select option { background: var(--bg-elevated); }

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

/* Chips */
.filter-chips {
  display: flex;
  align-items: center;
  gap: .375rem;
  flex-shrink: 0;
}

.chip {
  height: 30px;
  padding: 0 .875rem;
  border-radius: 20px;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
  white-space: nowrap;
}
.chip:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.07);
}
.chip.is-active {
  color: #fff;
  background: var(--accent-grad);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(168,85,247,0.35);
}

.filter-sort-label {
  font-size: .75rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-count {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}


/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.25rem .75rem;
}

.section-header__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
}

.section-header__live {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--live);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.section-header__live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse-dot 2s infinite;
}

.section-header__count {
  margin-left: auto;
  font-size: .8125rem;
  color: var(--text-secondary);
}


/* ============================================================
   CAM GRID
   ============================================================ */
.cam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  /* CLS fix: reserve space before JS renders cards */
  min-height: 50vh;
  contain: layout;
}

/* Wide screens: fix max columns */
@media (min-width: 1600px) {
  .cam-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (min-width: 1300px) and (max-width: 1599px) {
  .cam-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 900px) and (max-width: 1299px) {
  .cam-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 899px) {
  .cam-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
  .cam-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   CAM CARD
   ============================================================ */
.cam-card {
  position: relative;
  background: var(--bg-card);
  overflow: hidden;
  container-type: inline-size;
  transition: background var(--t-fast);
}
.cam-card:hover {
  background: var(--bg-card-hover);
  z-index: 2;
}

/* Full-card link wrapper — replaces role=button on article */
.cam-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  outline-offset: -2px;
}

/* Thumbnail */
.cam-card__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.cam-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.cam-card:hover .cam-card__img {
  transform: scale(1.04);
}

/* Placeholder gradient (shown when no image) */
.cam-card__placeholder {
  position: absolute;
  inset: 0;
  transition: transform var(--t-slow);
}
.cam-card:hover .cam-card__placeholder {
  transform: scale(1.04);
}

/* Gradient overlay at bottom */
.cam-card__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,.7) 100%
  );
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.cam-card:hover .cam-card__thumb::after {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,.85) 100%
  );
}

/* Live badge */
.cam-card__live {
  position: absolute;
  top: .5rem;
  left: .5rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: 2px 7px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--live);
  text-transform: uppercase;
  z-index: 2;
}
.cam-card__live::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 var(--live-pulse);
  animation: pulse-dot 1.5s infinite;
}

/* HD badge */
.cam-card__hd {
  position: absolute;
  top: .5rem;
  right: .5rem;
  padding: 1px 5px;
  background: rgba(59,130,246,.85);
  border-radius: 3px;
  font-size: .5625rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: #fff;
  text-transform: uppercase;
  z-index: 2;
}

/* VR badge */
.cam-card__vr {
  position: absolute;
  top: .5rem;
  right: .5rem;
  padding: 1px 6px;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  border-radius: 3px;
  font-size: .5625rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: #fff;
  text-transform: uppercase;
  z-index: 2;
}

/* Both HD + VR possible → shift */
.cam-card__hd + .cam-card__vr,
.cam-card__vr + .cam-card__hd {
  top: 1.75rem;
}

/* Viewers */
.cam-card__viewers {
  position: absolute;
  bottom: .5rem;
  left: .5rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.85);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.cam-card__viewers svg { opacity: .7; }

/* Private badge */
.cam-card__pvt {
  position: absolute;
  bottom: .5rem;
  right: .5rem;
  padding: 1px 6px;
  background: rgba(240,89,166,.85);
  border-radius: 3px;
  font-size: .5625rem;
  font-weight: 700;
  color: #fff;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Goal bar */
.cam-card__goal {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,.1);
  z-index: 2;
}
.cam-card__goal-fill {
  height: 100%;
  background: var(--accent-grad);
  transition: width .5s ease;
}

/* Info section */
.cam-card__info {
  padding: .5rem .625rem .5625rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.cam-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.cam-card__name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  transition: color var(--t-fast);
}
.cam-card:hover .cam-card__name { color: var(--accent); }

.cam-card__age {
  font-size: .75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.cam-card__meta {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .6875rem;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cam-card__meta svg { flex-shrink: 0; opacity: .6; }

.cam-card__tags {
  display: flex;
  justify-content: flex-end;
  gap: .25rem;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}
.cam-card__tag {
  flex: 0 0 auto;
  overflow: hidden;
  font-size: .625rem;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 6px;
  white-space: nowrap;
  transition: all var(--t-fast);
}
.cam-card:hover .cam-card__tag {
  color: var(--accent);
  border-color: rgba(168,85,247,.25);
}

.cam-card__tag:nth-child(n + 3) {
  display: none;
}

@container (max-width: 180px) {
  .cam-card__tag:nth-child(n + 2) {
    display: none;
  }
}

/* Hover: glow ring */
.cam-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 0;
  transition: border-color var(--t-fast);
  pointer-events: none;
  z-index: 3;
}
.cam-card:hover::after {
  border-color: rgba(168,85,247,.25);
}


/* ============================================================
   LOAD MORE
   ============================================================ */
.load-more {
  display: flex;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.load-more-spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(168,85,247,.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.load-more-spinner.is-visible { display: block; }

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


/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.04) 50%,
    transparent 100%
  );
  animation: shimmer 1.6s infinite;
  transform: translateX(-100%);
}
@keyframes shimmer {
  to { transform: translateX(100%); }
}

.skeleton-card {
  background: var(--bg-card);
}
.skeleton-card .skeleton-thumb {
  aspect-ratio: 4/3;
  background: rgba(255,255,255,.05);
}
.skeleton-card .skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: rgba(255,255,255,.05);
  margin: .5rem .625rem .25rem;
}
.skeleton-card .skeleton-line--short {
  width: 60%;
  height: 8px;
  margin-bottom: .625rem;
}


/* ============================================================
   MOBILE BOTTOM NAV
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--mobile-nav-h);
  background: rgba(7,7,15,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 0 .5rem;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 899px) {
  .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}

.mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  flex: 1;
  height: 100%;
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav__item:active { opacity: .7; }
.mobile-nav__item.is-active { color: var(--accent); }

.mobile-nav__item svg {
  width: 22px; height: 22px;
}

/* Join CTA in mobile nav */
.mobile-nav__join {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-grad);
  box-shadow: 0 4px 16px rgba(168,85,247,.5);
  margin: 0 .25rem;
  flex-shrink: 0;
}
.mobile-nav__join svg { color: #fff; }


/* ============================================================
   SEARCH AUTOCOMPLETE
   ============================================================ */
.autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  overflow: hidden;
  z-index: 500;
}
.autocomplete__item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .875rem;
  font-size: .875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--t-fast);
}
.autocomplete__item:hover {
  background: rgba(255,255,255,.05);
  color: var(--text-primary);
}
.autocomplete__label {
  font-size: .6875rem;
  color: var(--text-muted);
  padding: .375rem .875rem .25rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.autocomplete__tag {
  font-size: .6875rem;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  border-radius: 20px;
  padding: 1px 7px;
}


/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: calc(var(--mobile-nav-h) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
@media (min-width: 900px) {
  .toast-container {
    bottom: 1.5rem;
    left: auto;
    right: 1.5rem;
    transform: none;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: .875rem;
  color: var(--text-primary);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  pointer-events: auto;
  animation: toast-in .25s ease forwards;
}
.toast.is-exit { animation: toast-out .2s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-4px); }
}


/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.no-results {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
  color: var(--text-muted);
  font-size: .875rem;
  gap: .75rem;
}
.no-results svg {
  width: 40px; height: 40px;
  opacity: .3;
}


/* ============================================================
   SCROLLBAR GLOBAL
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.14); }


/* ============================================================
   FOCUS VISIBLE
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ============================================================
   SEO TEXT BLOCK
   ============================================================ */
.seo-block {
  margin-left: var(--sidebar-w);
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 3rem 2.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}

/* subtle top-right ambient glow */
.seo-block::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,.07) 0%, transparent 70%);
  pointer-events: none;
}

@media (max-width: 899px) {
  .seo-block { margin-left: 0; padding: 2rem 1.25rem 1.75rem; }
}

.seo-block__inner {
  max-width: 900px;
}

.seo-block__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.seo-block__lead {
  font-size: .9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 720px;
}

.seo-block__lead b {
  color: var(--text-primary);
  font-weight: 600;
}

/* Feature cards grid */
.seo-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.seo-feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.seo-feature:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.seo-feature__icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(168,85,247,.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .75rem;
  color: var(--accent);
  flex-shrink: 0;
}

.seo-feature__title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .375rem;
  letter-spacing: -.01em;
}

.seo-feature__text {
  font-size: .8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Second paragraph row */
.seo-block__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .seo-block__body { grid-template-columns: 1fr; gap: 1rem; }
}

.seo-block__body-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .5rem;
  letter-spacing: -.015em;
}

.seo-block__body-section p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.seo-block__body-section p b {
  color: var(--text-primary);
  font-weight: 600;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-left: var(--sidebar-w);
  border-top: 1px solid var(--border);
  background: var(--bg-base);
  padding-bottom: calc(var(--mobile-nav-h) + 1rem);
}

@media (max-width: 899px) {
  .footer { margin-left: 0; }
}

/* Top strip */
.footer__top {
  padding: 2.25rem 2.5rem 2rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem 3rem;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 860px) {
  .footer__top {
    grid-template-columns: 1fr;
    padding: 1.75rem 1.25rem 1.5rem;
    gap: 1.5rem;
  }
}

/* Brand column */
.footer__brand {}

.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -.04em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: .75rem;
}

.footer__tagline {
  font-size: .8125rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 200px;
}

.footer__social {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all var(--t-fast);
}
.footer__social-link:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  background: rgba(168,85,247,.08);
}

/* Link columns grid */
.footer__links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem 1rem;
}

@media (max-width: 640px) {
  .footer__links {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem .75rem;
  }
}

.footer__col-title {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .875rem;
}

.footer__col-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer__col-link {
  font-size: .8125rem;
  color: var(--text-secondary);
  transition: color var(--t-fast);
  line-height: 1.4;
}
.footer__col-link:hover { color: var(--accent); }

/* Bottom bar */
.footer__bottom {
  padding: 1.25rem 2.5rem;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

@media (max-width: 860px) {
  .footer__bottom { padding: 1.25rem 1.25rem; }
}

.footer__bottom-left {
  display: flex;
  flex-direction: column;
  gap: .625rem;
  flex: 1;
  min-width: 260px;
}

.footer__copyright {
  font-size: .8125rem;
  color: var(--text-dim);
}

.footer__disclaimer {
  font-size: .6875rem;
  /* No opacity: .7 — that compounds with text-muted and kills contrast */
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 640px;
}

.footer__disclaimer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--t-fast);
}
.footer__disclaimer a:hover { color: var(--text-secondary); }

/* Badges row */
.footer__badges {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}

.footer__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: rgba(255,255,255,.03);
  text-transform: uppercase;
  white-space: nowrap;
}

.footer__badge--18 {
  color: #ef4444;
  border-color: rgba(239,68,68,.3);
  background: rgba(239,68,68,.06);
}

.footer__badge--rta {
  font-size: .5625rem;
  letter-spacing: .04em;
  color: var(--text-muted);
}

/* Quick cats strip above footer top */
.footer__cats {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
}

@media (max-width: 860px) {
  .footer__cats { padding: .875rem 1.25rem; }
}

.footer__cat-link {
  /* Touch target: min 24×24px per WCAG 2.5.8 */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 2px;
  font-size: .75rem;
  color: var(--text-secondary);
  transition: color var(--t-fast);
  line-height: 1.3;
}
.footer__cat-link::before {
  content: '#';
  opacity: .5;
  margin-right: 1px;
}
.footer__cat-link:hover { color: var(--accent); }


/* ============================================================
   ROOM PAGE (PLAYER & CHAT)
   ============================================================ */
.room-container {
  padding: 1.25rem;
  max-width: 1600px;
  margin: 0 auto;
}

.room-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .room-grid { grid-template-columns: 1fr; }
}

.player-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-box__video-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 50%, #831843 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-align: center;
  padding: 2rem;
}

.player-box__play-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(168,85,247,0.5);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform var(--t-fast);
}
.player-box__play-icon:hover { transform: scale(1.08); }

.player-status-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.player-status-badge--live {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}
.player-status-badge--offline {
  background: rgba(100, 116, 139, 0.9);
  color: #fff;
}

.player-controls-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: .75rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.room-meta {
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.room-meta__header h1 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .25rem;
}

.room-meta__tags {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.room-actions {
  display: flex;
  gap: .75rem;
}

@media (max-width: 640px) {
  .room-meta {
    flex-direction: column;
    align-items: stretch;
  }
  .room-actions {
    width: 100%;
    margin-top: 0.75rem;
  }
  .room-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Chat component */
.chat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 600px;
}

@media (max-width: 1024px) {
  .chat-card { height: 450px; }
}

.chat-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .9375rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.chat-msg {
  font-size: .8125rem;
  line-height: 1.4;
}

.chat-msg__user {
  font-weight: 700;
  color: var(--accent);
  margin-right: .35rem;
}

.chat-msg__text {
  color: var(--text-primary);
}

.chat-input-area {
  padding: .875rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .5rem;
}

.chat-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .5rem .75rem;
  color: var(--text-primary);
  font-size: .875rem;
}
.chat-input:focus { border-color: var(--border-accent); outline: none; }


/* ============================================================
   OFFLINE MODAL POPUP
   ============================================================ */
.offline-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
}
.offline-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.offline-modal__box {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  text-align: center;
}

.offline-modal__close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: .5rem;
  border-radius: 50%;
}
.offline-modal__close:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.offline-modal__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.offline-modal__title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: .5rem;
}

.offline-modal__subtitle {
  color: var(--text-secondary);
  font-size: .9375rem;
  margin-bottom: 1.5rem;
}

.offline-recs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .offline-recs-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   CONTACT & PRIVACY PAGES
   ============================================================ */
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.page-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .5rem;
}

.page-header__desc {
  color: var(--text-secondary);
  font-size: 1rem;
}

.legal-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: .9375rem;
}

.legal-content h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 .75rem;
}

.legal-content p { margin-bottom: 1.25rem; }

.legal-content ul {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.legal-content li { margin-bottom: .5rem; }

/* Contact Form */
.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .5rem;
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .75rem 1rem;
  color: var(--text-primary);
  font-size: .9375rem;
  font-family: inherit;
  transition: border-color var(--t-fast);
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--border-accent);
  outline: none;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* Cloudflare Turnstile Box Mockup */
.turnstile-box {
  background: #111118;
  border: 1px solid #2d2d3a;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 320px;
}

.turnstile-box__checkbox {
  width: 24px; height: 24px;
  accent-color: var(--accent);
  cursor: pointer;
}

.turnstile-box__label {
  font-size: .8125rem;
  color: var(--text-primary);
  flex: 1;
}

.turnstile-box__logo {
  font-size: .6875rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
