/* ── FAN ART PAGE STYLES ── */

:root {
  /* Matching the light theme of the rest of the site */
  --gallery-bg: #ffffff;
  --gallery-card: rgba(255, 255, 255, 0.85);
  --gallery-text: var(--text);
  --gallery-text-soft: var(--text-soft);
  --gallery-accent: var(--green);
  --gallery-border: rgba(17, 17, 17, 0.06);
}

/* Base style follows global.css, but we can refine here */
.fanart-page {
  /* Using the same background as global.css */
}

/* Hero Section - Matching about.html and assets.html */
.fanart-hero {
  padding: 120px 20px 60px;
  text-align: center;
}

.fanart-hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: 12px;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero-gradient-text {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fanart-hero p {
  font-size: 1.25rem;
  color: var(--text-soft);
  max-width: 600px;
  margin: 18px auto 0;
  font-weight: 700;
}

/* Masonry Gallery */
.gallery-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 100px;
}

.gallery-grid {
  columns: 3;
  column-gap: 24px;
  width: 100%;
}

@media (max-width: 1100px) {
  .gallery-grid {
    columns: 2;
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    columns: 1;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 24px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gallery-card);
  border: 1px solid var(--gallery-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 64px rgba(0, 200, 83, 0.12);
  border-color: rgba(0, 200, 83, 0.2);
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  transform: translateY(10px);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-item-info {
  transform: translateY(0);
}

.artist-name {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Download Button on Card */
.btn-gallery-download {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 16px rgba(0, 200, 83, 0.3);
}

.btn-gallery-download:hover {
  transform: scale(1.1);
  background: var(--green-dark);
}

.btn-gallery-download svg {
  width: 18px;
  height: 18px;
}

/* Lightbox Modal - Keeping it dark for focus */
.fanart-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 40px;
}

.fanart-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img-wrapper {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.fanart-lightbox.active .lightbox-img-wrapper {
  transform: scale(1);
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(17, 17, 17, 0.05);
  border: 1px solid rgba(17, 17, 17, 0.05);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(17, 17, 17, 0.1);
  transform: rotate(90deg);
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-lightbox-download {
    padding: 12px 24px;
    background: var(--green);
    color: var(--white);
    border-radius: 999px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 28px rgba(0, 200, 83, 0.25);
    transition: all 0.2s ease;
}

.btn-lightbox-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0, 200, 83, 0.35);
    background: var(--green-dark);
}

.lightbox-caption {
  text-align: center;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
}

/* Staggered Animations */
.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }
.gallery-item:nth-child(5) { transition-delay: 0.25s; }
.gallery-item:nth-child(6) { transition-delay: 0.3s; }
