/* ==========================================================================
   MagicTouch — Modern macOS Glassmorphism Design System
   ========================================================================== */

:root {
  --bg-obsidian: #070709;
  --bg-surface: #0f0f14;
  --card-glass: rgba(18, 18, 24, 0.72);
  --card-glass-hover: rgba(28, 28, 38, 0.82);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-glass-bright: rgba(255, 255, 255, 0.18);
  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ed;
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-green: #34c759;
  --text-primary: #f5f5f7;
  --text-secondary: #98989f;
  --text-muted: #636366;
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-obsidian);
  min-height: 100vh;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--card-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12), 0 24px 48px -12px rgba(0, 0, 0, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: var(--border-glass-bright);
}

.glass-pill {
  background: rgba(22, 22, 30, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16), 0 10px 25px -5px rgba(0, 0, 0, 0.45);
}

/* Glow & Ambient Lighting Effects */
.radial-glow-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1200px;
  height: 650px;
  background: radial-gradient(circle at 50% 15%, rgba(0, 113, 227, 0.18) 0%, rgba(168, 85, 247, 0.08) 35%, rgba(7, 7, 9, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.glow-blue {
  box-shadow: 0 0 45px -10px rgba(0, 113, 227, 0.45);
}

.glow-blue:hover {
  box-shadow: 0 0 60px -8px rgba(0, 113, 227, 0.65);
}

/* Specular Highlight Rim */
.specular-rim {
  position: relative;
}

.specular-rim::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

/* Keyframe Animations */
@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(0.97);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.5s infinite ease-in-out;
}

@keyframes float-gentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.animate-float {
  animation: float-gentle 6s infinite ease-in-out;
}

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-obsidian);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Simulator Specific Styles (Phase 2)
   ========================================================================== */

.simulator-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 520px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(25, 25, 35, 0.8) 0%, rgba(12, 12, 17, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.15), 0 30px 60px -15px rgba(0, 0, 0, 0.8);
  touch-action: none;
}

#mouse-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.preset-btn {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.preset-btn.active {
  background: rgba(0, 113, 227, 0.25);
  border-color: rgba(0, 113, 227, 0.7);
  color: #60a5fa;
  box-shadow: 0 0 20px -3px rgba(0, 113, 227, 0.5);
}

@keyframes hud-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.7);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 25px 4px rgba(56, 189, 248, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 113, 227, 0);
  }
}

.hud-trigger-pulse {
  animation: hud-pulse 0.4s ease-out;
}

