/* ==================== CSS VARIABLES ==================== */

:root {
  --bg1: #0b0f14;
  --bg2: #0e141c;
  --card: #151a23;
  
  --accent: #5fd0ff;
  --accent2: #5fd0ff;
  
  --text: #e6f7ff;
  --muted: #7fb8d6;
}

/* ==================== FONTS ==================== */

@font-face {
  font-family: 'Orbitron';
  src: url('/fonts/orbitron.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* ==================== TITLE GLOW ==================== */

#title.title-glow-active svg {
  filter:
    drop-shadow(0 0 6px rgba(95, 208, 255, 0.45))
    drop-shadow(0 0 14px rgba(95, 208, 255, 0.18));
}

/* ==================== NAV BACK BUTTON ==================== */

.nav-back {
  margin: 0 0 28px;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.nav-back a {
  display: inline-block;
  padding: 0.5rem 1rem;
  
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: 1px;
  
  border: 1px solid #5fd0ff;
  color: transparent;
  text-decoration: none;
  position: relative;
  
  background: rgba(255, 255, 255, 0.01);
  
  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.08),
    0 0 6px rgba(95, 208, 255, 0.35);
  
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
  
  touch-action: manipulation;
}

.nav-back a.button-drawing {
  color: transparent;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.nav-back.button-render-active {
  opacity: 1;
  transform: translateY(0);
}

.nav-back a.button-morphing {
  border-color: rgba(127, 227, 255, 0.9);
  box-shadow:
    0 0 6px rgba(127, 227, 255, 0.5),
    0 0 14px rgba(95, 208, 255, 0.25);
  transition:
    background 150ms ease-out,
    box-shadow 150ms ease-out,
    border-color 150ms ease-out,
    color 150ms ease-out;
}

.nav-back a.button-ready {
  color: #5fd0ff;
  border-color: #5fd0ff;
  background: rgba(255, 255, 255, 0.015);
}

.button-svg-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: opacity 220ms ease-out;
}

.button-svg-overlay svg {
  display: block;
  max-width: 100%;
  transform-origin: center;
}

.nav-back a.button-ready .button-svg-overlay {
  opacity: 0;
}

.nav-back a:hover {
  background: rgba(255, 255, 255, 0.04);
  
  box-shadow:
    0 0 10px rgba(95, 208, 255, 0.75),
    0 0 20px rgba(255, 255, 255, 0.12);
}

.nav-back a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.nav-ready .nav-back {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== BOX MORPHING ANIMATION ==================== */

.box-morphing {
  border-color: rgba(127, 227, 255, 0.9) !important;
  box-shadow:
    0 0 8px rgba(127, 227, 255, 0.6),
    0 0 16px rgba(95, 208, 255, 0.3),
    0 0 24px rgba(95, 208, 255, 0.15) !important;
  transition:
    box-shadow 150ms ease-out,
    border-color 150ms ease-out;
}

.box-ready {
  border-color: #5fd0ff !important;
  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.08),
    0 0 6px rgba(95, 208, 255, 0.35);
  transition:
    box-shadow 150ms ease-out,
    border-color 150ms ease-out;
}
