/* 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 {
  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;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.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;
}
.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 {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  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;
}
.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 a,
.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: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;
}

.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;
}

.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;
  align-items: center;
}
.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;
}
.admin-upload-form input[type="text"] {
  min-width: 12rem;
  flex: 1;
}
.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-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: grid;
  place-items: center;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  border-radius: 12px;
}
.lightbox-stage.is-dragging,
.lightbox-stage.is-zoomed {
  cursor: grab;
}
.lightbox-stage.is-dragging {
  cursor: grabbing;
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.05s linear;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}
.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;
}
.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;
}
.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;
}

/* —— 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;
  /* Match videos page content column width */
  max-width: 100%;
}
.approve-card-player {
  /* Same footprint as main theater player column */
  width: 100%;
  max-width: min(100%, 900px);
}
.approve-card-player .video-player-wrap {
  /* reuse main player sizing (16:9 / portrait rules) */
  width: 100%;
}
.approve-card-player .video-player-wrap.is-portrait {
  margin: 0 auto;
}
.approve-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: min(100%, 900px);
}
.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;
}
.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;
}
.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);
}
