/* ===== SELENE MOONLIGHT OS — Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Inter:wght@300;400;500;600&family=Noto+Sans+SC:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #07070d;
  --bg-panel: rgba(12, 12, 22, 0.72);
  --bg-glass: rgba(14, 14, 26, 0.55);
  --text: #eaeaf0;
  --text-dim: #7a7a90;
  --text-muted: #55556a;
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.45);
  --cyan: #22d3ee;
  --cyan-glow: rgba(34, 211, 238, 0.35);
  --silver: #e2e8f0;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #f87171;
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(168, 85, 247, 0.25);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 72px;
  --footer-h: 56px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ===== HEADER ===== */
.os-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(7, 7, 13, 0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.os-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 140px;
}

.os-logo {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--purple);
  box-shadow: 0 0 12px var(--purple-glow);
}

.os-name {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.os-name small {
  color: var(--text-dim);
  font-size: 0.7rem;
  margin-left: 0.2rem;
}

.os-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.os-nav a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding: 0.65rem 1.25rem;
  min-height: 44px;
  border-radius: 12px;
  transition: all 0.25s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.os-nav a:hover { color: var(--text); }

.os-nav a.active {
  color: var(--text);
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
}

/* Glass pill buttons — header */
.os-glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(234, 234, 240, 0.88);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color 0.25s, background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.os-glass-btn:hover {
  color: var(--text);
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 6px 28px rgba(168, 85, 247, 0.2);
  transform: translateY(-1px);
}

.os-glass-btn.active {
  color: var(--text);
  background: rgba(168, 85, 247, 0.28);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.25);
}

.os-glass-btn-accent {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(34, 211, 238, 0.14));
  border-color: rgba(168, 85, 247, 0.45);
}

.os-glass-btn-icon {
  min-width: 46px;
  padding: 0.65rem;
  border-radius: 14px;
}

.os-glass-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.6rem 1rem;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: var(--cyan);
  letter-spacing: 0.1em;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(34, 211, 238, 0.08);
}

.os-header-glass {
  height: var(--nav-h);
  padding: 0 clamp(1rem, 3vw, 2rem);
  background: rgba(7, 7, 13, 0.42);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.os-header-glass .os-nav {
  gap: 0.45rem;
  padding: 0.35rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.os-header-glass .os-nav a {
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
}

.os-header-glass .os-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: none;
  box-shadow: none;
}

.os-header-glass .os-nav a.active {
  background: rgba(168, 85, 247, 0.32);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.2);
}

.os-header-glass .os-utils {
  gap: 0.55rem;
}

.os-header-glass .os-logo {
  width: 36px;
  height: 36px;
  font-size: 0.68rem;
}

.os-header-glass .os-name {
  font-size: 0.95rem;
}

.os-utils {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 140px;
  justify-content: flex-end;
}

.os-sound, .os-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  cursor: pointer;
}

.os-cta {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.25rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 999px;
  color: var(--text);
  transition: all 0.3s;
  white-space: nowrap;
}

.os-header-minimal {
  background: linear-gradient(180deg, rgba(7,7,13,0.75) 0%, rgba(7,7,13,0.2) 70%, transparent 100%);
  border-bottom: none;
}

.os-cta-minimal {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.os-cta-minimal:hover {
  border-color: rgba(168,85,247,0.45);
}

.os-cta:hover {
  background: rgba(168, 85, 247, 0.15);
  box-shadow: 0 0 24px var(--purple-glow);
}

.nav-moon {
  width: 22px; height: 22px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.25s;
  border: none;
  background: none;
  padding: 0;
  display: grid;
  place-items: center;
}

.os-glass-btn-icon.nav-moon {
  width: auto;
  height: auto;
}

.os-glass-btn-icon.nav-moon svg {
  width: 22px;
  height: 22px;
}

.nav-moon:hover { opacity: 0.8; transform: scale(1.15); }

/* ===== FOOTER STATUS BAR ===== */
.os-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(7, 7, 13, 0.75);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.os-scroll-boot {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  animation: bootPulse 2s ease-in-out infinite;
}

.os-scroll-boot .arrow {
  width: 20px; height: 20px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
}

@keyframes bootPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.os-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.os-pill {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.os-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}

.os-pill.blue .dot { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.os-pill.green .dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.os-pill.yellow .dot { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.os-pill.red .dot { background: var(--red); box-shadow: 0 0 6px var(--red); }

.os-copy {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ===== CHAT ORB WIDGET ===== */
.os-chat-widget {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.os-chat-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.os-orb {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(168,85,247,0.5), rgba(34,211,238,0.2) 60%, rgba(7,7,13,0.8));
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text);
  box-shadow: 0 0 40px var(--purple-glow), inset 0 0 20px rgba(168,85,247,0.1);
  animation: orbPulse 3s ease-in-out infinite;
  transition: transform 0.3s;
}

.os-orb:hover { transform: scale(1.08); }

@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 30px var(--purple-glow); }
  50% { box-shadow: 0 0 60px var(--purple-glow), 0 0 80px var(--cyan-glow); }
}

.os-chat-status {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ===== SIDE VERTICAL TEXT ===== */
.os-side-label {
  position: fixed;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  white-space: nowrap;
  z-index: 50;
  pointer-events: none;
}

/* ===== GLASS TERMINAL PANEL ===== */
.os-terminal {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.os-terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.8rem;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}

.os-terminal-bar .online {
  color: var(--purple);
  display: flex; align-items: center; gap: 0.3rem;
}

.os-terminal-bar .online::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  animation: statusBlink 1.5s infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.os-terminal-body {
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  color: var(--text-dim);
}

.os-terminal-body .prompt { color: var(--purple); }
.os-terminal-body .val { color: var(--cyan); }
.os-terminal-body .hi { color: var(--text); }

/* ===== BUTTONS ===== */
.os-btn {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 0.7rem 1.8rem;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s;
}

.os-btn:hover {
  background: rgba(168, 85, 247, 0.12);
  box-shadow: 0 0 30px var(--purple-glow);
}

.os-btn-fill {
  background: linear-gradient(135deg, rgba(168,85,247,0.3), rgba(34,211,238,0.15));
  border-color: rgba(168, 85, 247, 0.6);
}

/* ===== BOOT LOADER ===== */
.boot-loader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1.5rem;
  transition: opacity 0.8s, visibility 0.8s;
}

.boot-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.2em;
  color: var(--text);
  text-shadow: 0 0 40px var(--purple-glow);
}

.boot-progress {
  width: 240px; height: 2px;
  background: rgba(255,255,255,0.08);
}

.boot-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 0.3s;
}

.boot-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.boot-lines {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 60px;
}

body.loading { overflow: hidden; }

/* misc */
.easter-hotspot {
  position: fixed; bottom: 60px; left: 8px;
  width: 16px; height: 16px;
  opacity: 0; z-index: 9999; cursor: default;
}

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s, transform 0.7s;
}
.reveal.visible { opacity: 1; transform: none; }

#particle-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.25;
}

.scanlines {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 9998;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
  opacity: 0.4;
}

::selection { background: rgba(168, 85, 247, 0.3); }

@media (max-width: 1100px) {
  .os-header-glass .os-nav a {
    padding: 0.6rem 0.85rem;
    font-size: 0.72rem;
    min-height: 42px;
  }
  .os-glass-btn { padding: 0.6rem 1rem; font-size: 0.72rem; min-height: 42px; }
}

@media (max-width: 900px) {
  .os-nav { display: none; }
  .os-sound, .os-lang { display: none; }
  .os-side-label { display: none; }
  .os-chat-widget { right: 1rem; }
  .os-orb { width: 56px; height: 56px; font-size: 0.55rem; }
  .os-pills { display: none; }
  .os-copy { display: none; }
}

@media (max-width: 600px) {
  .os-utils .os-cta,
  .os-utils .os-glass-btn-accent { display: none; }
  .os-glass-chip { font-size: 0.62rem; padding: 0.5rem 0.7rem; min-height: 40px; }
}
