/* ═══════════════════════════════════════════════
   WOOCHAN FAN SITE — GLOBAL DESIGN SYSTEM
   ═══════════════════════════════════════════════
   
   Theme: Dark terminal / retro-futuristic
   Inspired by: designprompts.dev/terminal
   Vibe: Modern, clean, slightly artistic — 
         digital interface meets fan culture
   
   ─── HOW TO UPDATE THE THEME ───
   1. Change CSS custom properties below
   2. All pages update automatically
   3. No page-level color/font overrides allowed
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&family=Inter:wght@300;400;500;600&display=swap');

:root {
  /* ── Typography ── */
  --font-mono: 'Share Tech Mono', monospace;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'VT323', monospace;

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.8125rem;  /* 13px */
  --text-base: 0.9375rem;/* 15px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.5rem;     /* 24px */
  --text-2xl: 2rem;      /* 32px */
  --text-3xl: 3rem;      /* 48px */
  --text-4xl: 4.5rem;    /* 72px */

  --leading-tight: 1.15;
  --leading-normal: 1.65;
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.05em;
  --tracking-wider: 0.12em;
  --tracking-mono: 0.02em;

  /* ── Color Palette — Dark Terminal ── */
  --color-bg: #0a0a0a;
  --color-bg-alt: #111111;
  --color-bg-elevated: #161616;
  --color-surface: #1a1a1a;
  --color-surface-hover: #222222;

  --color-text: #eef2ee;
  --color-text-secondary: #a8aea8;
  --color-text-muted: #747c74;

  /* Primary accent — terminal green */
  --color-accent: #00ff41;
  --color-accent-dim: #00cc33;
  --color-accent-hover: #33ff66;
  --color-accent-subtle: rgba(0, 255, 65, 0.06);
  --color-accent-glow: rgba(0, 255, 65, 0.15);

  /* Secondary accent — warm amber (for highlights, badges) */
  --color-highlight: #ffaa00;
  --color-highlight-soft: rgba(255, 170, 0, 0.08);

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.16);
  --color-border-accent: rgba(0, 255, 65, 0.15);

  /* ── Spacing Scale ── */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.5rem;    /* 24px */
  --space-6: 2rem;      /* 32px */
  --space-8: 3rem;      /* 48px */
  --space-10: 4rem;     /* 64px */
  --space-12: 5rem;     /* 80px */
  --space-16: 8rem;     /* 128px */

  /* ── Layout ── */
  --max-width: 1200px;
  --content-padding: var(--space-5);

  /* ── Cards ── */
  --card-radius: 8px;
  --card-shadow: 0 0 0 1px var(--color-border);
  --card-shadow-hover: 0 0 0 1px var(--color-border-accent), 0 4px 24px rgba(0, 255, 65, 0.04);
  --card-border: 1px solid var(--color-border);
  --card-padding: var(--space-5);

  /* ── Transitions ── */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* ── Nav ── */
  --nav-height: 56px;
  --nav-bg: rgba(10, 10, 10, 0.85);
  --nav-blur: 16px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

.site-loading-overlay[hidden] {
  display: none;
}

.site-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.site-loading-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.site-loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.28);
}

.site-loading-card img {
  width: min(170px, 46vw);
  height: auto;
  animation: site-loading-pulse 1.4s ease-in-out infinite;
}

.site-loading-meter {
  width: min(220px, 60vw);
  height: 2px;
  overflow: hidden;
  background: rgba(0, 255, 65, 0.14);
}

.site-loading-meter::before {
  content: '';
  display: block;
  width: 42%;
  height: 100%;
  background: var(--color-accent);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.7);
  animation: site-loading-scan 1s ease-in-out infinite;
}

@keyframes site-loading-pulse {
  0%, 100% { opacity: 0.78; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

@keyframes site-loading-scan {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(245%); }
}

/* ── Shared pixel lightbox controls ── */
.pixel-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 30px;
  height: 30px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 0;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  filter: drop-shadow(0 0 3px rgba(0, 255, 65, 0.85));
  transition: filter var(--duration-fast), transform var(--duration-fast);
}

.pixel-lightbox-close:hover {
  filter: drop-shadow(0 0 6px rgba(0, 255, 65, 0.95));
  transform: scale(1.04);
}

.pixel-lightbox-close::before,
.pixel-lightbox-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  background: var(--color-accent);
  pointer-events: none;
}

.pixel-lightbox-close::before {
  transform: translate(-50%, -50%);
  box-shadow:
    -8px -8px 0 var(--color-accent),
    -4px -4px 0 var(--color-accent),
    4px 4px 0 var(--color-accent),
    8px 8px 0 var(--color-accent),
    8px -8px 0 var(--color-accent),
    4px -4px 0 var(--color-accent),
    -4px 4px 0 var(--color-accent),
    -8px 8px 0 var(--color-accent);
}

.pixel-lightbox-close::after {
  display: none;
}

.pixel-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 36px;
  height: 56px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.75);
  transition: background var(--duration-fast), border-color var(--duration-fast), transform var(--duration-fast);
}

.pixel-lightbox-nav:hover {
  background: transparent;
  transform: translateY(-50%) scale(1.08);
}

.pixel-lightbox-nav--prev {
  left: max(-68px, calc(-5vw - 22px));
}

.pixel-lightbox-nav--next {
  right: max(-68px, calc(-5vw - 22px));
}

@media (max-width: 768px) {
  .pixel-lightbox-close {
    top: 8px;
    right: 8px;
  }

  .pixel-lightbox-nav {
    top: auto;
    bottom: -56px;
    width: 36px;
    height: 36px;
    transform: none;
    font-size: 32px;
  }

  .pixel-lightbox-nav:hover {
    transform: none;
  }

  .pixel-lightbox-nav--prev {
    left: calc(50% - 62px);
  }

  .pixel-lightbox-nav--next {
    right: calc(50% - 62px);
  }
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Selection ── */
::selection {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}

/* ── Scrollbar (webkit) ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* ── Utility: terminal-style prefix ── */
.terminal-prefix::before {
  content: '> ';
  color: var(--color-accent);
  opacity: 0.6;
}

/* ── Utility: glow text ── */
.glow {
  text-shadow: 0 0 20px var(--color-accent-glow), 0 0 40px rgba(0, 255, 136, 0.05);
}

/* ── Utility: mono text ── */
.mono {
  font-family: var(--font-mono);
  letter-spacing: var(--tracking-mono);
}
