/* fanart.css — fan art gallery (requires theme.css)
   Page chrome base lives in theme.css; only per-page orb palette + the
   inline link in .page-header a are kept here. */

.orb1 { --c: #a0ccf0; width: 520px; height: 520px; top: -150px; left: -150px; opacity: 0.3; animation: orb-drift1 20s ease-in-out infinite; }
.orb2 { --c: #b0d4e8; width: 400px; height: 400px; bottom: -80px; right: -100px; opacity: 0.28; animation: orb-drift2 24s ease-in-out infinite; }

.page-header a {
  color: var(--blue2); text-decoration: none;
  border-bottom: 1px solid rgba(var(--blue-rgb), 0.3);
  padding-bottom: 1px;
}
.page-header a:hover { border-color: var(--blue2); }

/* ── Gallery grid (masonry-like with columns) ── */
.gallery {
  max-width: 900px;
  margin: 0 auto;
  columns: 3;
  column-gap: 12px;
  position: relative; z-index: 1;
}
@media (max-width: 640px) { .gallery { columns: 2; } }
@media (max-width: 400px) { .gallery { columns: 1; max-width: 100%; } }

.art-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--surface);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border: 1px solid var(--surface-hover);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease-out, box-shadow .22s, border-color .22s;
}
.art-card:hover {
  box-shadow: 0 10px 28px rgba(var(--blue-rgb), 0.12);
  border-color: var(--surface-strong);
}
.art-card img, .art-card video {
  width: 100%; display: block;
  transition: transform .3s;
}
.art-card:hover img, .art-card:hover video { transform: scale(1.03); }

/* ── Media thumb wrappers ── */
.art-thumb { position: relative; overflow: hidden; }
.art-thumb video { pointer-events: none; }
.art-thumb-audio {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--blue2) 0%, #2e4a66 100%);
  display: flex; align-items: center; gap: 10px;
}
.art-thumb-iframe {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex; align-items: center; justify-content: center;
}
.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: background .2s;
}
.art-card:hover .play-overlay { background: rgba(0,0,0,0.35); }
.play-overlay svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.play-overlay-audio {
  position: static; background: none;
  flex-shrink: 0;
}
.audio-label {
  color: rgba(255,255,255,0.9); font-size: 12px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.art-meta {
  padding: 8px 11px 10px;
}
.art-title {
  font-size: 12px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-artist {
  font-size: 11px; color: var(--text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,20,40,0.85);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.lightbox.show { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 90vw; max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  object-fit: contain;
}
.lb-close {
  position: absolute; top: 16px; right: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.15);
  color: #fff; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
/* Lightbox chrome is always on a dark backdrop, so hues here stay
   white-transparent regardless of the active theme — don't use
   --surface-* tokens (they flip in dark mode and become invisible). */
.lb-close:hover { background: rgba(255,255,255,0.3); }
.lb-info {
  margin-top: 12px; text-align: center;
  color: rgba(255,255,255,0.72); font-size: 13px;
}
.lb-info a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}
.lb-info a:hover { color: #fff; border-color: #fff; }

/* ── Lightbox media ── */
.lb-video-wrap video {
  max-width: 90vw; max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  background: #000;
}
.lb-audio-wrap {
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 32px 40px;
  backdrop-filter: blur(12px);
}
.lb-audio-wrap audio { width: 320px; max-width: 80vw; }

/* ── Lightbox iframe ── */
.lb-iframe-wrap {
  width: 90vw; max-width: 960px;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  background: #000;
}
.lb-iframe-wrap iframe {
  width: 100%; height: 100%;
  border: none;
}

/* ── Skeleton ── */
.skeleton-art {
  break-inside: avoid; margin-bottom: 12px;
  border-radius: 14px; overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid var(--surface-muted);
}
.skeleton-art-img {
  width: 100%; aspect-ratio: 3/4;
  background: var(--accent-gradient);
  animation: sk-pulse 1.2s ease-in-out infinite;
}
/* Mix of shapes so the skeleton doesn't look like three identical rectangles. */
.skeleton-art-img.ar-4-5 { aspect-ratio: 4/5; }
.skeleton-art-img.ar-1-1 { aspect-ratio: 1/1; }
.skeleton-art-meta { padding: 8px 11px 10px; }
.skeleton-art-line {
  height: 9px; border-radius: 5px;
  background: rgba(var(--blue-rgb), 0.08);
  animation: sk-pulse 1.2s ease-in-out infinite;
}
.skeleton-art-line.w50 { width: 50%; }
.skeleton-art-line.w30 { width: 30%; margin-top: 5px; }
/* sk-pulse lives in theme.css */

/* ── Empty ── */
.empty-hint {
  text-align: center; color: var(--text3);
  font-size: 13px; padding: 40px 0;
  position: relative; z-index: 1;
}

/* ── Mobile ── */
@media (max-width: 375px) {
  /* .page-wrap padding override lives in theme.css */
  .lightbox img { max-width: 95vw; max-height: 75vh; }
  .lb-video-wrap video { max-width: 95vw; max-height: 75vh; }
  .lb-iframe-wrap { width: 95vw; }
  .lb-close { width: 28px; height: 28px; font-size: 14px; top: 12px; right: 12px; }
}
