/* ==========================================================================
   EonCraft — The Pokémon SMP
   Shared theme (v2) — performance-first, distinct identity
   Cosmic aurora: cyan / indigo / violet
   ========================================================================== */

:root {
  --eon-cyan: #22d3ee;
  --eon-indigo: #6366f1;
  --eon-violet: #a855f7;
  --eon-bg: #05060f;
}

html { scroll-behavior: smooth; }

/* ---- Background: static (no fixed-attachment repaint on scroll) ---------- */
body {
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(1100px 760px at 90% 0%, rgba(168, 85, 247, 0.20), transparent 58%),
    radial-gradient(1000px 700px at 50% 108%, rgba(99, 102, 241, 0.26), transparent 62%),
    linear-gradient(180deg, #070812 0%, #0a0c1a 45%, #05060e 100%);
  background-color: #05060e;
}

/* Gentle one-time page fade (cheap, no layout thrash) */
body { animation: pageFadeIn 0.5s ease-out both; }
@keyframes pageFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- Static starfield (no animation, no scroll cost) -------------------- */
.pixel-stars {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px,  rgba(255,255,255,0.9) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 140px 90px, rgba(103,232,249,0.8) 50%, transparent 50%),
    radial-gradient(1px 1px at 250px 50px,     rgba(255,255,255,0.7) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 330px 130px, rgba(168,85,247,0.7) 50%, transparent 50%),
    radial-gradient(1px 1px at 90px 160px,      rgba(165,180,252,0.6) 50%, transparent 50%);
  background-size: 360px 360px;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

/* ---- Entrance animations (transform/opacity only = compositor cheap) ---- */
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fadeInBlur { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
.anim-fade-up   { animation: fadeUp .55s cubic-bezier(0.16, 1, 0.3, 1) both; }
.anim-fade-delay-1 { animation-delay: .10s; }
.anim-fade-delay-2 { animation-delay: .20s; }
.anim-fade-delay-3 { animation-delay: .30s; }
.anim-fade-blur { animation: fadeInBlur .6s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ---- Top loading bar ---------------------------------------------------- */
#top-loader {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, #22d3ee, #6366f1, #a855f7);
  z-index: 9999;
  transition: width .25s ease-out, opacity .4s ease-out;
}

/* ---- Buttons: sleek modern pill (distinct from the chunky pixel base) --- */
.pixel-btn {
  position: relative;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.pixel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.5), 0 0 0 1px rgba(165, 180, 252, 0.45);
  filter: brightness(1.06) saturate(1.05);
}
.pixel-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* ---- Card hover: clean lift, glowing edge (no wiggle/rotate) ------------ */
.wiggle-hover { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.wiggle-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 28px rgba(99, 102, 241, 0.16);
}

.gallery-card { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  border-color: rgba(165, 180, 252, 0.4);
}

/* ---- Section bands ------------------------------------------------------ */
.eon-section {
  background: linear-gradient(180deg, rgba(9, 11, 24, 0.72) 0%, rgba(5, 6, 14, 0.72) 100%);
  border-top: 1px solid rgba(99, 102, 241, 0.14);
}

/* ---- Kill expensive backdrop blur (major FPS win) ----------------------- */
/* The sticky header + dozens of cards used backdrop-filter: blur(24px),
   which repaints every scroll frame. Replace with solid translucency. */
.backdrop-blur-xl { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.backdrop-blur-sm { -webkit-backdrop-filter: blur(2px) !important; backdrop-filter: blur(2px) !important; }
header.backdrop-blur-xl,
header { background-color: rgba(8, 10, 22, 0.92) !important; }

/* ---- Toast notification ------------------------------------------------- */
.notification {
  position: fixed; top: 90px; right: 20px;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #fff; padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4);
  z-index: 100; display: flex; gap: 8px; align-items: center;
  font-size: 0.75rem;
  animation: slideIn .2s ease-out, fadeOut .3s ease-in 2.4s forwards;
}
@keyframes slideIn { from { transform: translateX(200px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(200px); } }

/* ---- Soft float (single element, compositor cheap) --------------------- */
.float-soft { animation: floatSoft 7s ease-in-out infinite alternate; will-change: transform; }
@keyframes floatSoft { 0% { transform: translate3d(0, 0, 0); } 100% { transform: translate3d(0, -8px, 0); } }

/* ---- Modal / lightbox --------------------------------------------------- */
.backdrop-hidden  { opacity: 0; pointer-events: none; }
.backdrop-visible { opacity: 1; pointer-events: auto; }
.modal-scale-in { transform: translateY(10px) scale(0.98); opacity: 0; }
.modal-scale-in.modal-open { transform: translateY(0) scale(1); opacity: 1; }
.lightbox-zoom-in  { animation: lightboxZoomIn 0.25s ease-out; }
@keyframes lightboxZoomIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.lightbox-zoom-out { animation: lightboxZoomOut 0.2s ease-in; }
@keyframes lightboxZoomOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.85); } }

/* ---- CTA pulse (single small button; transform/box-shadow) ------------- */
.cta-pulse { position: relative; animation: ctaPulse 2.4s ease-out infinite; }
@keyframes ctaPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

/* ---- Gradient text ------------------------------------------------------ */
.eon-gradient-text {
  background: linear-gradient(90deg, #67e8f9, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- Signature accent: gradient rule under section headings ------------- */
.eon-rule {
  height: 3px; width: 46px; border-radius: 999px; margin: 10px auto 0;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
}

/* ---- Respect reduced-motion -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .float-soft, .cta-pulse { animation: none !important; }
}
