/* LinkzVR — streamer theme: crimson hair, sapphire eyes, pure black */
:root {
  --bg: #050506;
  --bg-elevated: #0c0c10;
  --bg-card: rgba(16, 16, 22, 0.72);
  --bg-card-solid: #121218;
  --border: rgba(255, 255, 255, 0.08);
  --border-hot: rgba(220, 38, 55, 0.45);
  --text: #f2f2f5;
  --text-muted: #9a9aa8;
  --red: #e1062c;
  --red-deep: #9b0b22;
  --red-glow: rgba(225, 6, 44, 0.45);
  --blue: #3db8ff;
  --blue-soft: rgba(61, 184, 255, 0.18);
  --purple: #9146ff; /* Twitch */
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(225, 6, 44, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(61, 184, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(145, 70, 255, 0.08), transparent 50%),
    var(--bg);
}

body.has-bg::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("../assets/background.png") center / cover no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  color: #fff;
}

/* —— Layout —— */
.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(5, 5, 6, 0.78);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand img {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 12px var(--red-glow));
}
.brand span {
  background: linear-gradient(135deg, #fff 20%, var(--red) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Viewer Spicy mode control (right of Linkz name) — whole box is clickable */
.spicy-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.15rem;
  padding: 0.28rem 0.65rem 0.28rem 0.35rem;
  border: 1px solid var(--border, #252c38);
  border-radius: 999px;
  background: rgba(12, 14, 18, 0.65);
  color: var(--text-muted, #8b95a8);
  cursor: pointer;
  line-height: 1.15;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}
.spicy-mode-toggle:hover {
  border-color: rgba(225, 6, 44, 0.45);
  background: rgba(225, 6, 44, 0.1);
  color: var(--text, #e8ecf3);
}
.spicy-mode-toggle.is-active {
  border-color: rgba(255, 120, 40, 0.65);
  background: rgba(225, 6, 44, 0.16);
  color: #ffc9a8;
  box-shadow: 0 0 18px rgba(255, 80, 0, 0.35);
}
.spicy-mode-label {
  white-space: nowrap;
  user-select: none;
}
.spicy-mode-toggle .spicy-flame-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  line-height: 1;
  pointer-events: none; /* parent button handles clicks */
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.spicy-mode-toggle.is-active .spicy-flame-btn {
  background: rgba(225, 6, 44, 0.2);
  border-color: rgba(255, 120, 40, 0.45);
  box-shadow: 0 0 12px rgba(255, 80, 0, 0.4);
}
.spicy-flame-icon {
  font-size: 1.2rem;
  filter: grayscale(0.4) brightness(0.95);
  transition: filter 0.15s ease, transform 0.15s ease;
  display: block;
}
.spicy-mode-toggle.is-active .spicy-flame-icon,
.spicy-mode-toggle:hover .spicy-flame-icon {
  filter: none;
  transform: scale(1.06);
}
@media (max-width: 520px) {
  .spicy-mode-label {
    font-size: 0.65rem;
  }
  .spicy-mode-toggle {
    padding-right: 0.5rem;
    gap: 0.28rem;
  }
}

/* Age confirm modal */
.spicy-age-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.spicy-age-modal[hidden] {
  display: none !important;
}
.spicy-age-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.spicy-age-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  text-align: center;
  padding: 1.5rem 1.35rem 1.65rem;
  border-color: var(--border-hot);
  box-shadow: 0 0 40px var(--red-glow);
}
.spicy-age-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}
.spicy-age-actions {
  margin-top: 1.15rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}
.spicy-age-actions .btn {
  width: 100%;
  justify-content: center;
}
body.spicy-modal-open {
  overflow: hidden;
}

/* Site background when viewer Spicy mode is on — fill the browsing window */
body.spicy-unlocked {
  background-color: #050506;
  background-image: none;
  min-height: 100vh;
  min-height: 100dvh;
}
/* Spicy image on the fixed full-viewport layer (not the old site bg) */
body.spicy-unlocked::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: -2;
  pointer-events: none;
  background-color: #050506;
  background-image: var(--spicy-bg-image, none);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover; /* fit / fill the window */
  background-attachment: fixed;
}
/* Soft vignette so text stays readable */
body.spicy-unlocked::after {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  background: linear-gradient(
    180deg,
    rgba(5, 5, 6, 0.35) 0%,
    rgba(5, 5, 6, 0.5) 40%,
    rgba(5, 5, 6, 0.72) 100%
  ) !important;
}
/* Hide default site background.png while spicy is on */
body.spicy-unlocked.has-bg::after {
  /* keep vignette above; do not use background.png */
  background-image: linear-gradient(
    180deg,
    rgba(5, 5, 6, 0.35) 0%,
    rgba(5, 5, 6, 0.5) 40%,
    rgba(5, 5, 6, 0.72) 100%
  ) !important;
  background-size: auto !important;
  opacity: 1 !important;
}
/* Hide Linkz logo image in the header during spicy mode */
body.spicy-unlocked .brand img,
body.spicy-unlocked .brand > img {
  display: none !important;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links .btn-nav-login {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-hot);
  color: #ffb4bf;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(225, 6, 44, 0.08);
}
.nav-links .btn-nav-login:hover {
  color: #fff;
  border-color: var(--red);
  background: rgba(225, 6, 44, 0.18);
}
.approve-card-art .approve-card-media.is-art {
  /* Fixed preview box — never grow to full image resolution */
  width: 100%;
  max-width: min(100%, 420px);
  height: min(50vh, 420px);
  max-height: min(50vh, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm, 10px);
  background: #0a0a0e;
  border: 1px solid var(--border);
  box-sizing: border-box;
}
.approve-card-art .approve-card-media.is-art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.approve-card-request {
  grid-template-columns: 1fr !important;
}

/* Admin dashboard */
.dash-queue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}
.dash-queue-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.12s ease;
  margin: 0;
}
a.dash-queue-card:hover {
  border-color: var(--border-hot);
  transform: translateY(-2px);
  color: inherit;
}
.dash-queue-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.dash-queue-count {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}
.dash-queue-go {
  font-size: 0.8rem;
  color: var(--blue);
  margin-top: 0.25rem;
}
.dash-spicy-card .btn {
  align-self: flex-start;
  margin-top: 0.25rem;
}
.dash-upload-card {
  border-color: rgba(61, 184, 255, 0.35);
}
.dash-upload-card:hover {
  border-color: var(--blue);
}
.dash-queue-icon {
  font-size: 1.75rem;
  line-height: 1.2;
}
.dash-section {
  margin-bottom: 2.5rem;
}

/* Contributor upload — Spicy tagging rules */
.spicy-guidance {
  border-color: rgba(225, 6, 44, 0.45);
  background: linear-gradient(135deg, rgba(225, 6, 44, 0.12), rgba(10, 10, 14, 0.9));
  padding: 1rem 1.15rem;
}
.spicy-guidance-title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #ff8a9a;
  letter-spacing: 0.02em;
}
.spicy-guidance-body {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
}
.spicy-guidance-body strong {
  color: #fff;
}
.dash-section .section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.dash-section .section-head h2 {
  margin: 0 0 0.25rem;
}
.dash-section .section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}
.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(225, 6, 44, 0.15);
}
.nav-links a.cta {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
  box-shadow: 0 0 24px var(--red-glow);
}
.nav-links a.cta:hover {
  filter: brightness(1.08);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(8, 8, 12, 0.96);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    display: flex;
  }
}

main {
  padding-bottom: 4rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
}
.site-footer .social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.site-footer a.pill {
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
}
.site-footer a.pill:hover {
  border-color: var(--border-hot);
  color: #fff;
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: 4.5rem 0 3rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 5rem 0 4rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.85rem;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #888;
  box-shadow: none;
  flex-shrink: 0;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  margin-right: 0.35rem;
}
.live-badge.is-live {
  color: #fff;
  border-color: rgba(255, 59, 74, 0.55);
  background: rgba(225, 6, 44, 0.22);
}
.live-badge.is-live .live-dot {
  background: #ff3b4a;
  box-shadow: 0 0 0 0 rgba(255, 59, 74, 0.6);
  animation: pulse 1.6s infinite;
}
.live-badge.is-offline .live-dot {
  background: #666;
  animation: none;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(255, 59, 74, 0);
  }
}

/* Schedule */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.schedule-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 1rem 1.05rem;
  backdrop-filter: blur(8px);
}
.schedule-day {
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.schedule-time {
  margin-top: 0.35rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.schedule-label {
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.schedule-empty {
  color: var(--text-muted);
}

/* Featured video */
.featured-video {
  padding: 1rem;
}
.featured-empty {
  margin: 0;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem;
}
.featured-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .featured-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
  }
}
.featured-player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-hot);
}
.featured-player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.featured-meta h3 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}
.featured-meta p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}
.admin-settings-panel {
  margin-bottom: 1.5rem;
}
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}
.admin-schedule-text {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.85rem;
  resize: vertical;
}
.video-card-thumb.has-poster img,
.video-queue-thumb.has-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--red), #ff6b8a 45%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  color: #fff;
  box-shadow: 0 8px 28px var(--red-glow);
}
.btn-primary:hover {
  color: #fff;
  filter: brightness(1.06);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: #fff;
}
.btn-twitch {
  background: var(--purple);
  color: #fff;
}
.btn-twitch:hover {
  color: #fff;
  filter: brightness(1.08);
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}
.stat {
  min-width: 6.5rem;
}
.stat strong {
  display: block;
  font-size: 1.45rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-card {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border-hot);
  box-shadow: var(--shadow), 0 0 40px var(--red-glow);
  background: var(--bg-elevated);
  aspect-ratio: 16 / 10;
}
.hero-card iframe,
.hero-card .twitch-placeholder,
.hero-card .twitch-fallback {
  width: 100%;
  height: 100%;
  min-height: 240px;
  border: 0;
}
.twitch-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #1a0a10, #0a0a12 60%);
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem;
}
.twitch-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(160deg, #1a0a12, #0a0a12 65%);
  color: var(--text-muted);
}
.twitch-fallback-msg {
  margin: 0;
  max-width: 28rem;
  line-height: 1.45;
  color: #d0d0d8;
}
.twitch-fallback-msg code {
  color: var(--blue);
  font-size: 0.9em;
}
.twitch-fallback-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #888;
}
.twitch-fallback-hint code {
  color: #bbb;
}

/* —— Sections —— */
section {
  padding: 2.5rem 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}
.section-head p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  max-width: 36rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  border-color: var(--border-hot);
  transform: translateY(-2px);
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.card .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(225, 6, 44, 0.12);
  color: var(--red);
  font-weight: 800;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  backdrop-filter: blur(10px);
}

.prose {
  color: var(--text-muted);
  max-width: 70ch;
}
/* Full-width content cards (home community, about blocks, etc.) match .wrap siblings */
.panel.prose {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.prose p {
  margin: 0 0 1rem;
}
.prose p:last-child {
  margin-bottom: 0;
}
.prose strong {
  color: var(--text);
}

/* —— Social —— */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.social-card:hover {
  border-color: var(--red);
  background: rgba(225, 6, 44, 0.08);
  color: #fff;
}
.social-card .badge,
.social-card .social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.social-card .social-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}
/* Brand glyph icons sit in a circular chip */
.social-card .social-icon-brand {
  background: #0a0a0e;
  border-color: rgba(255, 255, 255, 0.12);
}
/* Full-bleed circular Linkz logo (fallback / custom links) */
.social-card .social-icon.is-logo {
  padding: 0;
  border-color: rgba(225, 6, 44, 0.35);
  background: #0a0a0e;
}
.social-card .social-icon.is-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.social-card:hover .social-icon-brand {
  border-color: rgba(225, 6, 44, 0.45);
  box-shadow: 0 0 0 1px rgba(225, 6, 44, 0.15);
}
.social-card:hover .social-icon.is-logo {
  border-color: var(--red);
}
.social-card strong {
  display: block;
  font-size: 0.95rem;
}
.social-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* —— FAQ —— */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.65rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--red);
  font-size: 1.2rem;
  font-weight: 400;
}
.faq details[open] summary::after {
  content: "−";
}
.faq details[open] summary {
  border-bottom: 1px solid var(--border);
}
.faq .answer {
  padding: 1rem 1.15rem 1.2rem;
  color: var(--text-muted);
}

/* —— Rules —— */
.rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rule;
}
.rules-list li {
  counter-increment: rule;
  position: relative;
  padding: 1rem 1rem 1rem 3.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.rules-list li:last-child {
  border-bottom: 0;
}
.rules-list li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 0.75rem;
  top: 1rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--red);
  letter-spacing: 0.04em;
}

/* —— Gallery —— */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}
.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.gallery a.gallery-item,
.gallery figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0a0e;
  aspect-ratio: 3 / 4;
  position: relative;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery a.gallery-item:hover img {
  transform: scale(1.05);
}
.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem 0.65rem;
  font-size: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
}
/* Admin-only Share to X under each gallery thumb */
.gallery-share-x {
  display: none;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
}
body.is-admin .gallery-share-x {
  display: inline-flex;
}

.nsfw-banner {
  border: 1px solid rgba(225, 6, 44, 0.5);
  background: rgba(225, 6, 44, 0.1);
  color: #ffb4bf;
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

/* —— Page hero strip —— */
.page-hero {
  padding: 2.75rem 0 1.25rem;
}
.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}
.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0;
}
.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.chip.red {
  border-color: var(--border-hot);
  color: #ff8a9a;
}
.chip.blue {
  border-color: rgba(61, 184, 255, 0.4);
  color: var(--blue);
}

.lore-block {
  white-space: pre-line;
  color: var(--text-muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

/* —— About (combined Lore + FAQ + Rules) —— */
.about-hero {
  padding-bottom: 0.75rem;
}
.about-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  padding: 0.65rem 0 0.75rem;
  margin-bottom: 0.25rem;
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 6, 0.92) 60%,
    rgba(5, 5, 6, 0.75) 85%,
    transparent
  );
  backdrop-filter: blur(10px);
}
.about-toc a {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16, 16, 22, 0.85);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.about-toc a:hover {
  color: #fff;
  border-color: rgba(61, 184, 255, 0.45);
}
.about-toc a.is-active {
  color: #fff;
  border-color: var(--red);
  background: rgba(225, 6, 44, 0.18);
  box-shadow: 0 0 0 1px rgba(225, 6, 44, 0.2);
}
.about-section {
  padding: 1.75rem 0 2.25rem;
  scroll-margin-top: calc(var(--nav-h) + 3.25rem);
}
.about-section-alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-section-head {
  margin-bottom: 1.25rem;
}
.about-section-head h2 {
  margin: 0.15rem 0 0.4rem;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  letter-spacing: -0.02em;
}
.about-section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
}
.about-block {
  margin-bottom: 1.75rem;
}
.about-block:last-child {
  margin-bottom: 0;
}
.about-block h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.about-lead {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.about-block .traits {
  margin: 0.75rem 0 1rem;
}
.about-block .section-head {
  margin-bottom: 0.85rem;
}
.about-block .section-head h3 {
  margin: 0;
}
.about-faq details {
  margin-bottom: 0.5rem;
}
.about-rules-panel {
  padding: 0.25rem 0.35rem;
}
.about-rules-panel .rules-list li {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.contact-card address {
  font-style: normal;
  color: var(--text-muted);
  line-height: 1.8;
}
.contact-card strong {
  color: var(--text);
}

/* —— Utilities —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hot), transparent);
  margin: 0.5rem 0 1.5rem;
}

/* —— Admin bar & edit mode —— */
#admin-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(8, 8, 12, 0.94);
  border-top: 1px solid var(--border-hot);
  backdrop-filter: blur(12px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
  padding: 0.65rem 1rem;
}
.admin-bar-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.admin-who {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-right: auto;
}
.admin-who strong {
  color: var(--text);
}
.admin-status {
  width: min(100%, var(--max));
  margin: 0.35rem auto 0;
  font-size: 0.85rem;
  color: var(--blue);
}
body.is-editing {
  padding-bottom: 5.5rem;
}
body.is-editing [data-edit],
body.is-editing [data-edit-html] {
  outline: 1px dashed rgba(225, 6, 44, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
  min-height: 1em;
  cursor: text;
}
body.is-editing [data-edit]:focus,
body.is-editing [data-edit-html]:focus {
  outline: 2px solid var(--red);
  background: rgba(225, 6, 44, 0.06);
}
.admin-upload-panel {
  margin: 0 0 1.25rem;
}
.admin-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  /* Bottom-align so labeled fields (category) line up with bare inputs/buttons */
  align-items: flex-end;
}
.admin-upload-form input[type="file"],
.admin-upload-form input[type="text"] {
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  height: 2.5rem;
  box-sizing: border-box;
}
.admin-upload-form input[type="text"] {
  min-width: 12rem;
  flex: 1;
}
.admin-upload-form .btn {
  height: 2.5rem;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-upload-form .admin-upload-label {
  margin: 0;
}
.admin-upload-form .admin-upload-label select {
  height: 2.5rem;
  box-sizing: border-box;
  min-width: 12rem;
}
.gallery-item {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0a0a0e;
  aspect-ratio: 3 / 4;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
}
.gallery-del {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: none;
}
body.is-editing .gallery-del,
#admin-bar ~ * .gallery-del {
  display: grid;
  place-items: center;
}
/* show delete when admin bar present (logged in) */
#admin-bar ~ main .gallery-del,
main .gallery-del {
  display: none;
}
body:has(#admin-bar) .gallery-del {
  display: grid;
  place-items: center;
}
.gallery-spicy-badge {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(225, 6, 44, 0.9);
  color: #fff;
  pointer-events: none;
}
.gallery-spicy-toggle,
.gallery-feature-toggle {
  position: absolute;
  z-index: 3;
  display: none; /* only when admin is signed in */
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}
.gallery-spicy-toggle {
  left: 0.35rem;
  bottom: 0.35rem;
}
.gallery-feature-toggle {
  left: 0.35rem;
  bottom: 1.85rem;
}
.gallery-feature-toggle input,
.gallery-spicy-toggle input {
  margin: 0;
  accent-color: var(--red);
}
body.is-admin .gallery-spicy-toggle,
body.is-editing .gallery-spicy-toggle,
body.is-admin .gallery-feature-toggle,
body.is-editing .gallery-feature-toggle {
  display: flex;
}
.gallery-feature-badge {
  position: absolute;
  right: 0.35rem;
  top: 0.35rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(61, 184, 255, 0.9);
  color: #050506;
  pointer-events: none;
}
/* Never show classify UI to pure public viewers */
body:not(.is-admin) .gallery-spicy-toggle,
body:not(.is-admin) .gallery-feature-toggle,
body:not(.is-admin) .gallery-spicy-badge,
body:not(.is-admin) .video-spicy-check,
body:not(.is-admin) .video-spicy-badge,
body:not(.is-admin) .video-card-actions {
  display: none !important;
}
/* Public can see Featured star badge on images */
body:not(.is-admin) .gallery-feature-badge {
  display: block;
}

/* Featured AI Works / Fan Art slider — centered above the page gallery */
.featured-slider-section {
  margin-bottom: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.featured-slider-section .section-head {
  width: 100%;
  justify-content: center;
  text-align: center;
}
.featured-slider-section .section-head p {
  margin-left: auto;
  margin-right: auto;
}
.featured-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-hot);
  background: #0a0a0e;
  aspect-ratio: 16 / 9;
  /* When max-height caps the box, width shrinks with aspect-ratio — keep it centered */
  width: min(100%, calc(min(62vh, 520px) * 16 / 9));
  max-width: 100%;
  max-height: min(62vh, 520px);
  margin-inline: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.featured-slider-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.55s ease;
  will-change: transform;
}
.featured-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  background: #000;
}
.featured-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.featured-slide-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
}
.featured-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.featured-slider-nav:hover {
  background: rgba(225, 6, 44, 0.55);
  border-color: var(--red);
}
.featured-slider-nav.prev {
  left: 0.65rem;
}
.featured-slider-nav.next {
  right: 0.65rem;
}
.featured-slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  pointer-events: none;
}
.featured-slider-dot {
  pointer-events: auto;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}
.featured-slider-dot.is-active {
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
}
.video-card-actions .btn.is-featured-vid {
  border-color: rgba(61, 184, 255, 0.65);
  color: var(--blue);
  font-weight: 700;
}
.gallery-spicy-toggle input {
  margin: 0;
  accent-color: var(--red);
}
#admin-spicy-toggle.is-spicy-on {
  border-color: rgba(225, 6, 44, 0.65);
  color: #ff8a9a;
  background: rgba(225, 6, 44, 0.12);
  font-weight: 700;
}
.admin-spicy-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(225, 6, 44, 0.45);
  border-radius: 8px;
  background: rgba(225, 6, 44, 0.08);
  height: 2.5rem;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
}
.admin-spicy-check input {
  accent-color: var(--red);
  margin: 0;
}
.video-spicy-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ff8a9a;
  margin-right: 0.35rem;
  cursor: pointer;
}
.video-spicy-check input {
  accent-color: var(--red);
  margin: 0;
}
.video-card {
  position: relative;
}
.video-spicy-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(225, 6, 44, 0.92);
  color: #fff;
  pointer-events: none;
}
.gallery-del:hover {
  background: var(--red);
}

/* —— Lightbox viewer —— */
body.lightbox-open {
  overflow: hidden;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.lightbox:not([hidden]) {
  pointer-events: auto;
}
.lightbox[hidden] {
  display: none !important;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}
.lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  z-index: 4;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(12, 12, 16, 0.85);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lightbox-close:hover {
  background: var(--red);
  border-color: transparent;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 3rem;
  height: 3.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(12, 12, 16, 0.75);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lightbox-nav:hover {
  background: rgba(225, 6, 44, 0.85);
  border-color: transparent;
}
.lightbox-prev {
  left: 0.75rem;
}
.lightbox-next {
  right: 0.75rem;
}
.lightbox-stage {
  position: relative;
  z-index: 2;
  width: min(96vw, 1200px);
  height: min(82vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
  touch-action: none;
  border-radius: 12px;
}
.lightbox-stage.is-zoomed {
  cursor: grab;
}
.lightbox-stage.is-dragging {
  cursor: grabbing;
}
/* Natural pixel size; JS scales from "fit entire image" → zoom to fill stage & beyond */
.lightbox-img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  object-fit: none;
  transform-origin: center center;
  transition: transform 0.08s ease-out;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  /* Avoid layout jump before first fit transform */
  will-change: transform;
}
.lightbox-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  padding: 0.85rem 1rem 1.1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #e8e8ee;
  font-size: 0.9rem;
  pointer-events: none;
}
.lightbox-title {
  font-weight: 600;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-counter {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.lightbox-hint {
  color: #777;
  font-size: 0.78rem;
  width: 100%;
  text-align: center;
}
@media (max-width: 640px) {
  .lightbox-nav {
    width: 2.5rem;
    height: 3rem;
    font-size: 1.6rem;
  }
  .lightbox-prev {
    left: 0.35rem;
  }
  .lightbox-next {
    right: 0.35rem;
  }
  .lightbox-hint {
    display: none;
  }
  .lightbox-stage {
    width: 100vw;
    height: 75vh;
  }
}

/* —— AI Works age / NSFW gate —— */
.aiworks-gate {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
  border-color: var(--border-hot);
  box-shadow: 0 0 40px var(--red-glow);
}
.aiworks-gate .nsfw-banner {
  text-align: left;
  margin-bottom: 1.25rem;
}
.aiworks-gate-lead {
  color: var(--text-muted);
  margin: 0 0 1.35rem;
  line-height: 1.55;
}
.aiworks-gate-lead strong {
  color: #ff8a9a;
}
.aiworks-confirm {
  min-width: min(100%, 22rem);
  font-size: 1rem;
  padding: 0.9rem 1.4rem;
  letter-spacing: 0.02em;
}
.aiworks-gate-back {
  margin: 1.15rem 0 0;
  font-size: 0.9rem;
}
.aiworks-gate-back a {
  color: var(--text-muted);
}
.aiworks-gate-back a:hover {
  color: #fff;
}
body.aiworks-locked #gallery-personal,
body.aiworks-locked #gallery-fangen {
  display: none !important;
}
body.videos-spicy-locked #videos-library-content {
  display: none !important;
}
.video-cat-btn[data-cat="spicy"] {
  border-color: rgba(225, 6, 44, 0.45);
}
.video-cat-btn[data-cat="spicy"].is-active {
  border-color: var(--red);
  box-shadow: 0 0 0 1px rgba(225, 6, 44, 0.25);
}
.gallery-section .section-head {
  margin-bottom: 1rem;
}
.gallery-empty {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  padding: 1rem 0;
}
/* Fan Gen submitter filter */
.fangen-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0;
}
.fangen-filter-bar .admin-upload-label {
  margin: 0;
  min-width: 14rem;
}
.fangen-filter-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* AI Works gallery pagination (18 per page) */
.gallery-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.85rem 0.5rem 0;
  border-top: 1px solid var(--border);
}
.gallery-pager-status {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  min-width: 12rem;
}
.gallery-pager .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.admin-upload-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.admin-upload-label select {
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  min-width: 12rem;
}
.admin-upload-label input[type="text"],
.admin-upload-label textarea {
  color: var(--text);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  width: 100%;
  font: inherit;
  resize: vertical;
}
body.has-admin-bar {
  padding-bottom: 4.5rem;
}
.admin-footer-links {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.admin-footer-links a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}
.admin-footer-links a:hover {
  text-decoration: underline;
}
.admin-footer-sep {
  margin: 0 0.45rem;
  opacity: 0.5;
}
.pending-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  margin-left: 0.25rem;
}

/* —— Admin stats dashboard —— */
.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
}
.stats-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.stats-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.stats-card.is-hot {
  border-color: rgba(225, 6, 44, 0.55);
  box-shadow: 0 0 0 1px rgba(225, 6, 44, 0.15);
}
.stats-card-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.stats-card-value {
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 0.25rem;
  line-height: 1.15;
}
.stats-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}
.stats-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin-bottom: 1.1rem;
}
@media (max-width: 900px) {
  .stats-grid-2 {
    grid-template-columns: 1fr;
  }
}
.stats-panel {
  margin: 0;
}
.stats-heading {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.stats-sub {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.stats-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.stats-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  min-height: 160px;
  padding-top: 0.5rem;
  overflow-x: auto;
}
.stats-chart-col {
  flex: 1 1 0;
  min-width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.stats-chart-bars {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.stats-bar-pv,
.stats-bar-vis {
  display: block;
  width: 45%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
}
.stats-bar-pv {
  background: linear-gradient(180deg, var(--blue), rgba(61, 184, 255, 0.35));
}
.stats-bar-vis {
  background: linear-gradient(180deg, var(--red), rgba(225, 6, 44, 0.35));
}
.stats-chart-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  writing-mode: horizontal-tb;
  transform: none;
}
.stats-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.stats-bar-row {
  display: grid;
  grid-template-columns: minmax(5rem, 7.5rem) 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.88rem;
}
.stats-bar-name {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-bar-track {
  height: 0.55rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.stats-bar-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--blue));
  border-radius: 999px;
  min-width: 2px;
}
.stats-bar-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  text-align: right;
}
.stats-table-wrap {
  overflow-x: auto;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.stats-table th,
.stats-table td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
}
.stats-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stats-table code {
  font-size: 0.85em;
}
.stats-table a {
  color: var(--blue);
  text-decoration: none;
}
.contrib-members-table {
  width: 100%;
  min-width: 640px;
}
.contrib-members-table th:last-child,
.contrib-members-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.contrib-members-actions .btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}
.contrib-status-ok {
  color: #6dffa8;
  font-weight: 600;
  font-size: 0.85rem;
}
.contrib-status-wait {
  color: #ffc86d;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
}

.stats-table a:hover {
  text-decoration: underline;
}

/* —— Video edit modal (admin) —— */
.video-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.video-edit-modal[hidden] {
  display: none !important;
}
.video-edit-dialog {
  width: min(100%, 440px);
  max-height: min(90vh, 640px);
  overflow: auto;
  margin: 0;
}
.video-edit-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 4rem;
  background: var(--bg-input, #0f1319);
  border: 1px solid var(--border, #252c38);
  border-radius: 8px;
  color: var(--text, #e8ecf3);
  padding: 0.5rem 0.65rem;
  font: inherit;
}
body.video-edit-open {
  overflow: hidden;
}

/* —— Approve videos (admin queue) —— */
.approve-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.approve-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
}
/*
 * Match /videos theater main column:
 * wrap max 1120px − sidebar 320px − gap ≈ 780px player width.
 */
.approve-card-player,
.approve-card-media:not(.is-art) {
  width: 100%;
  max-width: min(100%, 780px);
}
.approve-card-player .video-player-wrap,
.approve-card-media:not(.is-art).video-player-wrap {
  width: 100%;
  max-width: 100%;
}
.approve-card-player .video-player-wrap.is-portrait,
.approve-card-media.is-portrait {
  margin: 0 auto;
  max-width: min(100%, 420px);
}
/* Dashboard raw <video> (no wrap) — force same box as theater */
.approve-card-media:not(.is-art):not(.video-player-wrap) {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-hot);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.approve-card-media:not(.is-art):not(.video-player-wrap).is-portrait {
  aspect-ratio: 9 / 16;
  max-width: min(100%, 420px);
  max-height: min(78vh, 720px);
}
.approve-card-media:not(.is-art) video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}
.approve-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: min(100%, 780px);
}
.approve-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.approve-hint {
  opacity: 0.85;
}
.approve-actions {
  margin-top: 0.35rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* —— Video categories —— */
.video-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.video-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.video-cat-btn:hover {
  color: #fff;
  border-color: rgba(225, 6, 44, 0.45);
}
.video-cat-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-deep));
  border-color: transparent;
  box-shadow: 0 6px 20px var(--red-glow);
}
.video-cat-count {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  min-width: 1.4rem;
  text-align: center;
}
.video-cat-btn.is-active .video-cat-count {
  background: rgba(0, 0, 0, 0.28);
}
.video-now-cat {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

/* —— YouTube-style video gallery —— */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem 1rem;
}
.video-grid.is-shorts-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  position: relative;
}
.video-card.is-draggable {
  cursor: grab;
}
.video-card.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}
.video-card.is-drag-over {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  border-radius: 12px;
}
.video-drag-handle {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 3;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  border-radius: 6px;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  letter-spacing: -0.05em;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.video-grid.is-reorderable .video-card-thumb {
  cursor: grab;
}
.video-card-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0e;
  cursor: pointer;
  border: 1px solid var(--border);
}
.video-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.video-play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.15s ease, transform 0.15s ease;
}
.video-card-thumb:hover .video-play-badge {
  background: var(--red);
  transform: translate(-50%, -50%) scale(1.06);
}
.video-card-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}
.video-card-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.video-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
/* Must beat .video-card-actions { display:flex } so public never sees Edit/Spicy controls */
.video-card-actions[hidden] {
  display: none !important;
}
.video-card-actions .btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}
.video-empty {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.video-theater {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 1000px) {
  .video-theater {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}
.video-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-hot);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  margin-inline: auto;
}
/* Shorts — portrait player */
.video-player-wrap.is-portrait {
  aspect-ratio: 9 / 16;
  max-width: min(100%, 420px);
  max-height: min(78vh, 720px);
}
.video-theater.is-portrait {
  justify-items: center;
}
@media (min-width: 1000px) {
  .video-theater.is-portrait {
    grid-template-columns: minmax(280px, 420px) 1fr;
  }
}
.video-player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}
/* Chrome/Edge: hide download for non-admins (paired with controlslist=nodownload) */
body:not(.is-admin) video::-webkit-media-controls-download-button {
  display: none !important;
}
.video-card-thumb.is-portrait,
.video-queue-thumb.is-portrait {
  aspect-ratio: 9 / 16;
}
.video-card.is-shorts .video-card-thumb {
  max-height: 360px;
}
.video-now-meta {
  margin-top: 0.9rem;
}
.video-now-meta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}
.video-now-desc {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  white-space: pre-wrap;
}
.video-now-info {
  margin: 0;
  font-size: 0.85rem;
  color: #777;
}
.video-side-heading {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.video-queue {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding-right: 0.25rem;
}
.video-queue-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.65rem;
  align-items: center;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 0.35rem;
  cursor: pointer;
  color: inherit;
}
.video-queue-item:hover,
.video-queue-item.is-active {
  border-color: var(--border-hot);
  background: rgba(225, 6, 44, 0.08);
}
.video-queue-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #0a0a0e;
}
.video-queue-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.video-queue-thumb .video-play-badge {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.65rem;
}
.video-queue-meta strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
}
.video-queue-meta small {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.video-queue-empty {
  margin: 0;
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* —— Like + share —— */
.video-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.55rem;
}
.video-social-player {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.video-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.video-like-btn:hover:not(:disabled) {
  border-color: rgba(225, 6, 44, 0.55);
  color: #fff;
}
.video-like-btn.is-liked,
.video-like-btn:disabled.is-liked {
  border-color: rgba(225, 6, 44, 0.55);
  background: rgba(225, 6, 44, 0.15);
  color: #ff8a9a;
  cursor: default;
}
.video-like-heart {
  font-size: 1.05rem;
  line-height: 1;
  color: var(--red);
}
.video-like-count {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 1ch;
}
.video-like-btn.is-liked .video-like-count {
  color: #ffb4bf;
}
.video-share {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}
.video-share-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.15rem;
}
.video-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.28rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}
a.video-share-btn:hover,
button.video-share-btn:hover {
  color: #fff;
  border-color: var(--blue);
  background: rgba(61, 184, 255, 0.12);
}
