:root {
  --bg: #04070d;
  --panel: #0a1622;
  --text: #e9f3ff;
  --muted: #7fa3c0;
  --accent: #22d3ee;
  --accent-2: #6366f1;
  --accent-magenta: #ff3b8d;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  /* Cinematic atmosphere — layered cyan + magenta glows over deep navy, like the app. */
  background:
    radial-gradient(60% 45% at 20% 0%, rgba(34, 211, 238, 0.10), transparent 60%),
    radial-gradient(55% 45% at 85% 15%, rgba(255, 59, 141, 0.08), transparent 60%),
    radial-gradient(70% 60% at 50% 110%, rgba(99, 102, 241, 0.10), transparent 60%),
    #04070d;
  background-attachment: fixed;
}
/* Ambient particle canvas sits behind everything. */
#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
/* Fine scanlines + vignette for the cinematic HUD feel. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(160,210,255,0.028) 0 1px, transparent 1px 3px),
    radial-gradient(120% 100% at 50% 50%, transparent 62%, rgba(0,0,0,0.55) 100%);
}
/* Keep real content above the ambient layers. */
.construction, .hero, main, footer, .admin-dot, .lightbox { position: relative; z-index: 2; }

/* Hero */
.hero {
  position: relative;
  padding: clamp(48px, 12vw, 140px) 24px clamp(40px, 8vw, 90px);
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(90, 180, 255, 0.12);
}
.hero-inner { position: relative; z-index: 2; }
.hero-glow {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(34, 211, 238, 0.16), transparent 70%),
    radial-gradient(50% 50% at 80% 20%, rgba(99, 102, 241, 0.14), transparent 70%);
  pointer-events: none;
}
.brand {
  letter-spacing: 0.42em; font-size: 12px; font-weight: 700;
  color: var(--accent); padding-left: 0.42em; margin-bottom: 18px;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.5);
}
.hero h1 {
  margin: 0 0 12px; font-size: clamp(30px, 6vw, 58px); font-weight: 800;
  letter-spacing: -0.01em; line-height: 1.05;
}
.hero .sub { margin: 0 auto; max-width: 560px; color: var(--muted); font-size: clamp(14px, 2vw, 17px); }

/* Gallery */
main { max-width: 1280px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) 20px 60px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}
.tile {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px;
  background: var(--panel); border: 1px solid rgba(90, 180, 255, 0.16);
  cursor: zoom-in; opacity: 0; transform: translateY(10px);
  animation: rise 0.5s ease forwards;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.tile:hover { border-color: rgba(34, 211, 238, 0.55); box-shadow: 0 0 0 1px rgba(34,211,238,0.35), 0 14px 40px -14px rgba(34,211,238,0.5); }
/* Chamber corner brackets, like the app's viewing chambers. */
.tile::before, .tile::after {
  content: ''; position: absolute; width: 14px; height: 14px; z-index: 2; pointer-events: none;
  border-color: rgba(34, 211, 238, 0.7); opacity: 0; transition: opacity 0.3s ease;
}
.tile::before { top: 7px; left: 7px; border-top: 2px solid; border-left: 2px solid; border-top-left-radius: 3px; }
.tile::after { bottom: 7px; right: 7px; border-bottom: 2px solid; border-right: 2px solid; border-bottom-right-radius: 3px; }
.tile:hover::before, .tile:hover::after { opacity: 1; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.tile:hover img { transform: scale(1.05); }
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
  font-size: 12px; color: #dbe8f6;
  background: linear-gradient(to top, rgba(4,7,13,0.85), transparent);
  opacity: 0; transition: opacity 0.25s ease;
}
.tile:hover .cap { opacity: 1; }
@keyframes rise { to { opacity: 1; transform: none; } }

.empty { text-align: center; color: var(--muted); margin-top: 40px; }
code { background: rgba(90,180,255,0.12); padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }

footer {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 28px 20px 40px; border-top: 1px solid rgba(90, 180, 255, 0.1);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(2, 5, 10, 0.94); padding: 24px; cursor: zoom-out;
}
/* CRITICAL: the [hidden] attribute must win over display:flex, or the lightbox
   shows as a permanent dark overlay (with its ✕ and zoom cursor) over the page. */
.lightbox[hidden] { display: none !important; }
.lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 10px; box-shadow: 0 20px 60px -20px rgba(0,0,0,0.8); }
.lb-close {
  position: absolute; top: 16px; right: 18px; background: rgba(255,255,255,0.1); color: #fff;
  border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.lb-close:hover { background: rgba(255,255,255,0.2); }
@media (prefers-reduced-motion: reduce) { .tile { animation: none; opacity: 1; transform: none; } }

/* ── Under Construction splash ── */
html[data-mode='construction'] .hero,
html[data-mode='construction'] main,
html[data-mode='construction'] footer { display: none !important; }
html[data-mode='live'] .construction { display: none !important; }

.construction {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 24px; overflow: hidden;
}
.uc-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 55% at 50% 35%, rgba(34, 211, 238, 0.16), transparent 70%),
    radial-gradient(45% 45% at 75% 65%, rgba(99, 102, 241, 0.14), transparent 70%);
}
.uc-inner {
  position: relative; z-index: 2; max-width: 620px;
  padding: clamp(32px, 6vw, 60px) clamp(24px, 5vw, 52px);
  border-radius: 22px;
  background: rgba(12, 22, 36, 0.55);
  border: 1px solid rgba(90, 180, 255, 0.16);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}

/* Hidden admin entrance — a faint dot in the very top-left; brightens on hover. */
.admin-dot {
  position: fixed; top: 12px; left: 12px; z-index: 60;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(120, 180, 220, 0.10);
  border: 1px solid rgba(120, 180, 220, 0.14);
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.admin-dot:hover { background: var(--accent); box-shadow: 0 0 14px rgba(34, 211, 238, 0.7); }
.uc-badge {
  display: inline-block; margin-bottom: 22px; padding: 7px 16px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.08);
}
.construction h1 { margin: 0 0 14px; font-size: clamp(26px, 5vw, 46px); font-weight: 800; letter-spacing: -0.01em; color: #ffffff; text-shadow: 0 0 30px rgba(34,211,238,0.35); }
.construction .sub { margin: 0 auto 30px; color: #cfe0f2; font-size: clamp(14px, 2vw, 17px); max-width: 460px; }
.uc-bar {
  height: 4px; width: min(320px, 70vw); margin: 0 auto; border-radius: 999px;
  background: rgba(90, 180, 255, 0.14); overflow: hidden;
}
.uc-bar span {
  display: block; height: 100%; width: 40%; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
  animation: ucSweep 2.2s ease-in-out infinite;
}
@keyframes ucSweep { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .uc-bar span { animation: none; width: 100%; } }
