/* ==========================================================================
   ASTRAEA // DEEP SPACE & COSMIC ARTIFACT ARCHIVE - CORE STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=JetBrains+Mono:wght@300;400;500;700&family=Orbitron:wght@400;600;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --color-space-bg: #030508;
  --color-mars-orange: #ff5722;
  --color-mars-glow: rgba(255, 87, 34, 0.4);
  --color-earth-blue: #00bcd4;
  --color-accent-gold: #ffb300;
  --color-hologram-cyan: #00ffcc;
  --glass-bg: rgba(10, 16, 26, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.2);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-space-bg);
  color: #f1f5f9;
  overflow-x: hidden;
  user-select: none;
  touch-action: pan-y;
}

/* Custom Typography */
.font-display {
  font-family: 'Orbitron', 'Syne', sans-serif;
}
.font-mono-code {
  font-family: 'JetBrains Mono', monospace;
}
.font-editorial {
  font-family: 'Syne', sans-serif;
}
.font-classical {
  font-family: 'Cinzel', serif;
}

/* WebGL Fullscreen Canvas */
#canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto;
  cursor: grab;
}
#canvas-container:active {
  cursor: grabbing;
}

/* Subtle Architectural Grid Lines matching Reference Design */
.editorial-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  opacity: 0.15;
}
.editorial-grid-line {
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  height: 100%;
}

/* Cosmic Vignette Overlay */
.cosmic-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 75% 50%, rgba(255, 87, 34, 0.04) 0%, transparent 60%),
              radial-gradient(circle at center, transparent 40%, rgba(3, 5, 8, 0.85) 100%);
}

/* Main UI Overlays Layer */
#ui-layer {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  pointer-events: none;
}
#ui-layer > * {
  pointer-events: auto;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
}
.glass-panel-hover {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-panel-hover:hover {
  border-color: var(--glass-border-hover);
  background: rgba(18, 27, 44, 0.75);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

/* Glowing Elements & Badges */
.badge-cosmic {
  background: rgba(255, 87, 34, 0.12);
  border: 1px solid rgba(255, 87, 34, 0.35);
  color: #ff784e;
  box-shadow: 0 0 15px rgba(255, 87, 34, 0.15);
}

.glow-orange {
  box-shadow: 0 0 25px rgba(255, 87, 34, 0.4);
}
.glow-orange:hover {
  box-shadow: 0 0 40px rgba(255, 87, 34, 0.65);
}

.glow-cyan {
  box-shadow: 0 0 25px rgba(0, 255, 204, 0.35);
}

/* Action Buttons */
.btn-primary {
  background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 87, 34, 0.5);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Custom Range Input */
input[type=range] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  height: 4px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ff5722;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 87, 34, 0.8);
  transition: transform 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(3, 5, 8, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff5722;
}

/* Pulse & Rotation Keyframes */
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: slowSpin 30s linear infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}
.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}
