/* ═══════════════════════════════════════════════════════════════════════════
   style.css — Immersive Adult-Nightlife GIF Wall
   Dark · Neon · Seductive · Pinterest-Masonry
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Box Model ───────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design Tokens ───────────────────────────────────────────────────────── */
:root {
  --bg-base:          #08080d;
  --neon-pink:        #ff2d78;
  --neon-violet:      #b24bff;
  --neon-blue:        #2d8cff;
  --neon-crimson:     #c0003c;
  --glass-bg:         rgba(6, 4, 16, 0.74);
  --glass-border:     rgba(178, 75, 255, 0.16);
  --gap:              6px;
  --radius:           6px;
  --notice-min-h:     58px;
  --text-muted:       rgba(255, 255, 255, 0.45);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-base);
  color: #fff;
  /* System-first font stack — no blocking external request */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
               'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ATMOSPHERIC BACKGROUND
   Fixed behind everything, CSS-only, zero JS
   ═══════════════════════════════════════════════════════════════════════════ */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Layered neon blobs — crimson, violet, electric-blue accents */
  background:
    radial-gradient(ellipse 75% 55% at 12% 18%, rgba(150, 0, 55, 0.24)  0%, transparent 68%),
    radial-gradient(ellipse 60% 45% at 88% 8%,  rgba(95, 0, 170, 0.20)  0%, transparent 64%),
    radial-gradient(ellipse 55% 65% at 50% 92%, rgba(18, 0, 85, 0.28)   0%, transparent 70%),
    radial-gradient(ellipse 40% 32% at 74% 58%, rgba(0, 28, 130, 0.13)  0%, transparent 62%),
    radial-gradient(ellipse 30% 40% at 28% 72%, rgba(120, 0, 90, 0.12)  0%, transparent 58%);
  animation: bgDrift 22s ease-in-out infinite alternate;
}

@keyframes bgDrift {
  0% {
    background:
      radial-gradient(ellipse 75% 55% at 12% 18%, rgba(150, 0, 55, 0.24)  0%, transparent 68%),
      radial-gradient(ellipse 60% 45% at 88% 8%,  rgba(95, 0, 170, 0.20)  0%, transparent 64%),
      radial-gradient(ellipse 55% 65% at 50% 92%, rgba(18, 0, 85, 0.28)   0%, transparent 70%),
      radial-gradient(ellipse 40% 32% at 74% 58%, rgba(0, 28, 130, 0.13)  0%, transparent 62%),
      radial-gradient(ellipse 30% 40% at 28% 72%, rgba(120, 0, 90, 0.12)  0%, transparent 58%);
  }
  50% {
    background:
      radial-gradient(ellipse 80% 60% at 20% 28%, rgba(170, 0, 65, 0.30)  0%, transparent 68%),
      radial-gradient(ellipse 65% 50% at 82% 14%, rgba(110, 0, 190, 0.26) 0%, transparent 64%),
      radial-gradient(ellipse 60% 55% at 45% 88%, rgba(25, 0, 100, 0.32)  0%, transparent 70%),
      radial-gradient(ellipse 45% 38% at 68% 62%, rgba(0, 38, 150, 0.17)  0%, transparent 62%),
      radial-gradient(ellipse 35% 45% at 32% 68%, rgba(140, 0, 105, 0.15) 0%, transparent 58%);
  }
  100% {
    background:
      radial-gradient(ellipse 70% 50% at 8%  22%, rgba(130, 0, 48, 0.22)  0%, transparent 68%),
      radial-gradient(ellipse 58% 42% at 92% 4%,  rgba(82, 0, 155, 0.18)  0%, transparent 64%),
      radial-gradient(ellipse 52% 68% at 55% 95%, rgba(14, 0, 78, 0.25)   0%, transparent 70%),
      radial-gradient(ellipse 38% 30% at 78% 54%, rgba(0, 22, 118, 0.11)  0%, transparent 62%),
      radial-gradient(ellipse 28% 38% at 24% 76%, rgba(108, 0, 82, 0.11)  0%, transparent 58%);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CSS-ONLY FLOATING PARTICLES
   Pure CSS — no canvas, no JS, zero performance cost
   ═══════════════════════════════════════════════════════════════════════════ */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.p {
  position: absolute;
  bottom: -6px;
  border-radius: 50%;
  opacity: 0;
  animation: floatUp linear infinite;
  filter: blur(0.5px);
}

/* Individual particle tuning */
.p1  { width: 3px; height: 3px; left:  8%; background: var(--neon-pink);   animation-duration: 13s; animation-delay:  0s;   }
.p2  { width: 2px; height: 2px; left: 23%; background: var(--neon-violet); animation-duration: 17s; animation-delay:  3.2s; }
.p3  { width: 4px; height: 4px; left: 38%; background: var(--neon-blue);   animation-duration: 11s; animation-delay:  1.4s; }
.p4  { width: 2px; height: 2px; left: 52%; background: var(--neon-pink);   animation-duration: 15s; animation-delay:  5.1s; }
.p5  { width: 3px; height: 3px; left: 67%; background: var(--neon-violet); animation-duration: 12s; animation-delay:  2.3s; }
.p6  { width: 2px; height: 2px; left: 79%; background: var(--neon-blue);   animation-duration: 16s; animation-delay:  4.0s; }
.p7  { width: 3px; height: 3px; left: 91%; background: var(--neon-pink);   animation-duration: 14s; animation-delay:  6.5s; }
.p8  { width: 2px; height: 2px; left: 44%; background: #ff7a9a;            animation-duration: 18s; animation-delay:  0.7s; }

@keyframes floatUp {
  0%   { transform: translateY(0)    translateX(0);   opacity: 0;   }
  8%   { opacity: 0.65; }
  88%  { opacity: 0.35; }
  100% { transform: translateY(-102vh) translateX(18px); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STICKY NEON NOTICE STRIP
   Padded center · 18px font · glassmorphic · prominent neon glow
   ═══════════════════════════════════════════════════════════════════════════ */
#notice {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  backdrop-filter: blur(20px) saturate(180%) brightness(0.65);
  -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(0.65);
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
  box-shadow:
    0 1px 0   rgba(255, 45, 120, 0.08),
    0 4px 30px rgba(178, 75, 255, 0.12),
    0 8px 50px rgba(0, 0, 0, 0.5);
}

.notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;   /* Centered in container */
  text-align: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 16px 24px;        /* Padded center in */
  max-width: 1200px;
  margin: 0 auto;
}

/* Pulsing decorative star */
.notice-star {
  color: var(--neon-pink);
  font-size: 14px;
  flex-shrink: 0;
  text-shadow: 0 0 10px rgba(255, 45, 120, 0.85);
  animation: starBlink 3.5s ease-in-out infinite;
}

@keyframes starBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  48%       { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.85); }
  52%       { opacity: 1; transform: scale(1.15); }
  54%       { opacity: 0.5; transform: scale(0.9); }
  56%       { opacity: 1; transform: scale(1); }
}

.notice-text {
  font-size: clamp(15px, 1.8vw, 18px); /* 18px prominent readable font */
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* The glowing email address — main CTA */
.notice-email {
  color: var(--neon-pink);
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-shadow:
    0 0 8px  rgba(255, 45, 120, 0.95),
    0 0 20px rgba(255, 45, 120, 0.65),
    0 0 42px rgba(255, 45, 120, 0.35);
  animation: emailGlow 6s ease-in-out infinite;
  transition: text-shadow 0.25s ease, color 0.25s ease;
  word-break: break-all;     /* prevents overflow on tiny screens */
}

.notice-email:hover,
.notice-email:focus-visible {
  color: #fff;
  text-shadow:
    0 0 6px  #fff,
    0 0 14px rgba(255, 45, 120, 1),
    0 0 32px rgba(255, 45, 120, 0.85),
    0 0 65px rgba(255, 45, 120, 0.55);
  outline: none;
}

@keyframes emailGlow {
  0%, 100% {
    text-shadow:
      0 0 8px  rgba(255, 45, 120, 0.95),
      0 0 20px rgba(255, 45, 120, 0.65),
      0 0 42px rgba(255, 45, 120, 0.35);
  }
  45%, 55% {
    text-shadow:
      0 0 12px rgba(255, 45, 120, 1.00),
      0 0 30px rgba(255, 45, 120, 0.85),
      0 0 60px rgba(255, 45, 120, 0.50),
      0 0 100px rgba(255, 45, 120, 0.25);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN — GALLERY CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */
#main {
  position: relative;
  z-index: 1;
  padding: 8px var(--gap) 48px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PINTEREST-STYLE MASONRY GALLERY
   CSS columns — the only technique that preserves natural GIF aspect ratios
   without any JavaScript layout calculation.
   ═══════════════════════════════════════════════════════════════════════════ */
#gallery {
  columns: 5;
  column-gap: var(--gap);
  width: 100%;
  /* Orphan control: never leave lone items at top of a column */
  orphans: 1;
  widows: 1;
}

/* ── Responsive column counts ────────────────────────────────────────────── */

/* Large desktop: 5 columns (>= 1400px — default above) */

/* Standard desktop: 4 columns */
@media (max-width: 1399px) {
  #gallery { columns: 4; }
}

/* Tablet landscape: 3 columns */
@media (max-width: 1023px) {
  #gallery { columns: 3; }
}

/* Tablet portrait: 2–3 columns */
@media (max-width: 767px) {
  #gallery { columns: 2; }
}

/* Mobile: always 2 columns
   Minimum practical column width ≈ 150px at 320px viewport */
@media (max-width: 479px) {
  #gallery { columns: 2; column-gap: 4px; }
  #main    { padding-left: 4px; padding-right: 4px; }
}

/* Edge case: truly tiny screen (< 300px) — 1 column to prevent overflow */
@media (max-width: 299px) {
  #gallery { columns: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GIF ITEM CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.gif-item {
  /* These four rules are the heart of CSS masonry correctness */
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: var(--gap);

  /* Visual treatment */
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;

  /* Dark placeholder visible while image loads */
  background: rgba(18, 6, 32, 0.75);
  min-height: 120px;          /* shimmer has something to fill before img loads */

  /* Hover transition registered here (outside @media) so it's GPU-composited */
  will-change: transform;
}

/* Loading shimmer — disappears once image is ready */
.gif-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(130, 30, 180, 0.14) 50%,
    transparent 70%
  );
  background-size: 250% 100%;
  animation: shimmerSlide 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmerSlide {
  0%   { background-position:  200% center; }
  100% { background-position: -200% center; }
}

/* Once loaded, hide shimmer and remove min-height lock */
.gif-item.gif-loaded::before {
  display: none;
}
.gif-item.gif-loaded {
  min-height: 0;
  background: transparent;
}

/* The actual image — starts invisible, fades in on load */
.gif-item img {
  width: 100%;
  height: auto;           /* NEVER override — preserves natural aspect ratio */
  display: block;
  border-radius: var(--radius);
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.gif-item img.loaded {
  opacity: 1;
}

/* ── Desktop hover effects (only on devices with a real pointer) ─────────── */
@media (hover: hover) and (pointer: fine) {
  .gif-item {
    transition: transform 0.20s ease, box-shadow 0.20s ease;
  }

  .gif-item:hover {
    transform: scale(1.025);
    z-index: 10;
    box-shadow:
      0 0 0 1px rgba(255, 45, 120, 0.20),
      0 6px 32px rgba(178, 75, 255, 0.22),
      0 12px 64px rgba(255, 45, 120, 0.12);
  }

  .gif-item:hover img {
    filter: brightness(1.07) saturate(1.08);
    transition: filter 0.20s ease;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
#footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px 20px;
  border-top: 1px solid rgba(178, 75, 255, 0.10);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.35);
}

#footer a {
  color: rgba(255, 45, 120, 0.60);
  transition: color 0.22s ease, text-shadow 0.22s ease;
}

#footer a:hover,
#footer a:focus-visible {
  color: var(--neon-pink);
  text-shadow: 0 0 14px rgba(255, 45, 120, 0.65);
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREFERS-REDUCED-MOTION
   All decorative animations silenced. Page remains fully functional.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .bg-layer      { animation: none !important; }
  .p             { display: none !important; }
  .notice-star   { animation: none !important; }
  .notice-email  { animation: none !important; }
  .gif-item      { transition: none !important; will-change: auto; }
  .gif-item::before { animation: none !important; }
  .gif-item img  { transition: none !important; opacity: 1 !important; }
}
