/* ============================================
   AimTrainer Pro - Premium Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors - Dark Theme */
  --bg-primary: #06060e;
  --bg-secondary: #0c0c1a;
  --bg-surface: #111128;
  --bg-card: rgba(17, 17, 40, 0.75);
  --bg-card-hover: rgba(25, 25, 55, 0.9);
  --bg-overlay: rgba(6, 6, 14, 0.92);
  --bg-glass: rgba(17, 17, 40, 0.45);

  /* Accent Colors */
  --accent-primary: #00e5ff;
  --accent-primary-rgb: 0, 229, 255;
  --accent-secondary: #7c4dff;
  --accent-secondary-rgb: 124, 77, 255;
  --accent-tertiary: #ff4081;
  --accent-tertiary-rgb: 255, 64, 129;
  --accent-success: #00e676;
  --accent-success-rgb: 0, 230, 118;
  --accent-warning: #ffab00;
  --accent-warning-rgb: 255, 171, 0;
  --accent-danger: #ff1744;
  --accent-danger-rgb: 255, 23, 68;

  /* Text */
  --text-primary: #e8eaf6;
  --text-secondary: #9fa8da;
  --text-muted: #5c6bc0;
  --text-accent: var(--accent-primary);

  /* Borders */
  --border-color: rgba(0, 229, 255, 0.12);
  --border-glow: rgba(0, 229, 255, 0.3);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(var(--accent-primary-rgb), 0.15);
  --shadow-glow-lg: 0 0 40px rgba(var(--accent-primary-rgb), 0.2);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-overlay: 500;
  --z-modal: 1000;
  --z-hud: 2000;
  --z-crosshair: 3000;
  --z-notification: 4000;
}

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

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

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-primary); text-decoration: none; transition: var(--transition-fast); }
a:hover { color: var(--text-primary); }
button { font-family: var(--font-primary); cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: var(--font-primary); }
::selection { background: rgba(var(--accent-primary-rgb), 0.3); color: var(--text-primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-secondary); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.5),
               0 0 20px rgba(var(--accent-primary-rgb), 0.3);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- App Wrapper --- */
#app {
  min-height: 100vh;
  position: relative;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-dropdown);
  padding: var(--space-md) 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(6, 6, 14, 0.8);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav__link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav__link:hover {
  color: var(--accent-primary);
  background: rgba(var(--accent-primary-rgb), 0.08);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__lang-select {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.nav__lang-select:focus {
  border-color: var(--accent-primary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-primary), #00b8d4);
  color: #000;
  box-shadow: 0 4px 20px rgba(var(--accent-primary-rgb), 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(var(--accent-primary-rgb), 0.45);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn--secondary:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.btn--outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn--outline:hover {
  background: rgba(var(--accent-primary-rgb), 0.1);
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn--icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(var(--accent-primary-rgb), 0.06) 0%,
    rgba(var(--accent-secondary-rgb), 0.03) 30%,
    transparent 70%
  );
  animation: heroGlow 15s ease infinite alternate;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  z-index: 1;
}

@keyframes heroGlow {
  0% { transform: translate(-5%, -5%) rotate(0deg); }
  100% { transform: translate(5%, 5%) rotate(5deg); }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-success);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 2;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 2;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.hero__stats {
  display: flex;
  gap: var(--space-2xl);
  margin-top: var(--space-3xl);
  position: relative;
  z-index: 2;
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ============================================
   Game Preset Selector
   ============================================ */
.game-presets {
  padding: var(--space-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}

.preset-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  text-align: center;
  backdrop-filter: blur(10px);
}

.preset-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.preset-card.active {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow-lg);
}

.preset-card__icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-primary-rgb), 0.1);
  border-radius: var(--radius-md);
}

.preset-card__name {
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================
   Training Modes Grid
   ============================================ */
.modes-section {
  padding: var(--space-3xl) 0;
}

.modes-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.mode-tab {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.mode-tab:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #000;
  border-color: transparent;
  font-weight: 700;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.mode-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  cursor: pointer;
  transition: var(--transition-base);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.mode-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: var(--transition-base);
}

.mode-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.mode-card:hover::before {
  opacity: 1;
}

.mode-card__category {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(var(--accent-secondary-rgb), 0.15);
  color: var(--accent-secondary);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.mode-card__category--clicking {
  background: rgba(var(--accent-primary-rgb), 0.15);
  color: var(--accent-primary);
}

.mode-card__category--tracking {
  background: rgba(var(--accent-success-rgb), 0.15);
  color: var(--accent-success);
}

.mode-card__category--switching {
  background: rgba(var(--accent-warning-rgb), 0.15);
  color: var(--accent-warning);
}

.mode-card__category--scenario {
  background: rgba(var(--accent-tertiary-rgb), 0.15);
  color: var(--accent-tertiary);
}

.mode-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.mode-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.mode-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.mode-card__meta {
  display: flex;
  gap: var(--space-md);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mode-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mode-card__best {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mode-card__best strong {
  color: var(--accent-primary);
  font-family: var(--font-mono);
}

/* ============================================
   Features Section
   ============================================ */
.features {
  padding: var(--space-3xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.feature-card {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.feature-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.feature-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-primary-rgb), 0.1);
  border-radius: var(--radius-md);
}

.feature-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================
   Sensitivity Converter Section  
   ============================================ */
.sens-converter {
  padding: var(--space-3xl) 0;
}

.converter-box {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
}

.converter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.converter-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.converter-field input,
.converter-field select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.converter-field input:focus,
.converter-field select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.15);
}

.converter-result {
  text-align: center;
  padding: var(--space-lg);
  background: rgba(var(--accent-primary-rgb), 0.05);
  border: 1px solid rgba(var(--accent-primary-rgb), 0.2);
  border-radius: var(--radius-md);
}

.converter-result__value {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-primary);
}

.converter-result__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.converter-result__cm360 {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

/* ============================================
   Settings Panel
   ============================================ */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.settings-overlay.active {
  display: flex;
}

.settings-panel {
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow-y: auto;
  padding: var(--space-xl);
}

.settings-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.settings-panel__title {
  font-size: 1.3rem;
  font-weight: 700;
}

.settings-group {
  margin-bottom: var(--space-xl);
}

.settings-group__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-color);
}

.settings-item:last-child {
  border-bottom: none;
}

.settings-item__label {
  font-size: 0.92rem;
  font-weight: 500;
}

.settings-item__sublabel {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.settings-item__control {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 140px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(var(--accent-primary-rgb), 0.4);
}

.range-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-primary);
  min-width: 40px;
  text-align: right;
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  transition: var(--transition-base);
  border: 1px solid var(--border-color);
}

.toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  top: 2px;
  left: 2px;
  transition: var(--transition-base);
}

.toggle input:checked + .toggle__slider {
  background: rgba(var(--accent-primary-rgb), 0.2);
  border-color: var(--accent-primary);
}

.toggle input:checked + .toggle__slider::before {
  transform: translateX(20px);
  background: var(--accent-primary);
}

/* ============================================
   Game Container (3D Canvas)
   ============================================ */
#game-container {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: none;
  background: #000;
}

#game-container.active {
  display: block;
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ============================================
   HUD (Heads-Up Display)
   ============================================ */
.hud {
  position: fixed;
  inset: 0;
  z-index: var(--z-hud);
  pointer-events: none;
  display: none;
}

.hud.active {
  display: block;
}

.hud * {
  pointer-events: none;
}

/* Top HUD */
.hud__top {
  position: absolute;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-sm) var(--space-xl);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
}

.hud__mode-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud__timer {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 60px;
  text-align: center;
}

.hud__timer.warning {
  color: var(--accent-warning);
  animation: timerPulse 0.5s ease infinite;
}

.hud__timer.critical {
  color: var(--accent-danger);
  animation: timerPulse 0.3s ease infinite;
}

@keyframes timerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Left HUD */
.hud__left {
  position: absolute;
  top: 50%;
  left: var(--space-lg);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hud__stat-box {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
  min-width: 100px;
}

.hud__stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud__stat-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Right HUD - Kill Feed + Sens */
.hud__right {
  position: absolute;
  top: 60px;
  right: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-height: 400px;
  overflow: hidden;
}

/* In-game Sens Display */
.hud__sens-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(17, 17, 40, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
}

.hud__sens-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.hud__sens-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 28px;
  text-align: center;
  font-family: var(--font-mono);
}

.hud__sens-keys {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  opacity: 0.6;
}

.hud__killfeed {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.kill-feed-item {
  padding: 4px 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--accent-primary);
  animation: killFeedSlideIn 0.3s ease forwards;
  white-space: nowrap;
}

.kill-feed-item.headshot {
  border-left-color: var(--accent-danger);
  color: var(--accent-danger);
}

.kill-feed-item.bodyshot {
  border-left-color: var(--accent-warning);
}

@keyframes killFeedSlideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Bottom HUD */
.hud__bottom {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-xl);
  padding: var(--space-sm) var(--space-xl);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
}

.hud__accuracy {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.hud__accuracy.good { color: var(--accent-success); }
.hud__accuracy.mid { color: var(--accent-warning); }
.hud__accuracy.bad { color: var(--accent-danger); }

.hud__combo {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

/* Crosshair */
#crosshair-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-crosshair);
  pointer-events: none;
  display: none;
}

#crosshair-container.active {
  display: block;
}

/* Hit Marker */
.hit-marker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-crosshair);
  pointer-events: none;
  opacity: 0;
}

.hit-marker.show {
  animation: hitMarkerFlash 0.2s ease forwards;
}

.hit-marker.headshot-marker {
  animation: hitMarkerFlashRed 0.3s ease forwards;
}

@keyframes hitMarkerFlash {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@keyframes hitMarkerFlashRed {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(2); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.hit-marker svg {
  width: 24px;
  height: 24px;
}

/* Damage Number */
.damage-number {
  position: fixed;
  z-index: var(--z-crosshair);
  pointer-events: none;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.2rem;
  animation: damageFloat 0.8s ease forwards;
}

.damage-number.headshot-dmg {
  color: var(--accent-danger);
  font-size: 1.6rem;
}

.damage-number.bodyshot-dmg {
  color: var(--accent-warning);
}

.damage-number.normal-dmg {
  color: var(--text-primary);
}

@keyframes damageFloat {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}

/* ============================================
   Countdown Overlay
   ============================================ */
.countdown-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-notification);
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.countdown-overlay.active {
  display: flex;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 900;
  color: var(--accent-primary);
  text-shadow: 0 0 40px rgba(var(--accent-primary-rgb), 0.5);
  animation: countdownPop 0.5s ease;
}

@keyframes countdownPop {
  0% { transform: scale(2); opacity: 0; }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); opacity: 1; }
}

/* ============================================
   Results Screen
   ============================================ */
.results-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-notification);
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
}

.results-overlay.active {
  display: flex;
}

.results-panel {
  width: 90%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  animation: resultsSlideUp 0.4s ease;
}

@keyframes resultsSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.results__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.results__mode {
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.results__score {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 900;
  margin: var(--space-sm) 0;
}

.results__score.new-best {
  color: var(--accent-primary);
  text-shadow: 0 0 20px rgba(var(--accent-primary-rgb), 0.4);
}

.results__best-badge {
  display: inline-block;
  padding: 2px 12px;
  background: rgba(var(--accent-primary-rgb), 0.15);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.results__stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.result-stat {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.result-stat__value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.result-stat__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.results__actions {
  display: flex;
  gap: var(--space-md);
}

.results__actions .btn {
  flex: 1;
}

/* ============================================
   Pause Menu
   ============================================ */
.pause-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-notification);
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
}

.pause-overlay.active {
  display: flex;
}

.pause-panel {
  text-align: center;
  padding: var(--space-2xl);
}

.pause-panel h2 {
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
  color: var(--accent-primary);
}

.pause-panel .btn {
  margin: var(--space-sm) var(--space-sm);
}

/* ============================================
   Footer  
   ============================================ */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer__brand h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.footer__brand p {
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer__col h4 {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.footer__links a:hover {
  color: var(--accent-primary);
}

.footer__bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.8rem;
}

/* ============================================
   SEO Content Section
   ============================================ */
.seo-content {
  padding: var(--space-3xl) 0;
}

.seo-content__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.seo-content__block h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.seo-content__block p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Loading Screen
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  transition: opacity 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ============================================
   Animations & Utilities
   ============================================ */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.slide-up {
  animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Utility */
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .nav__links { display: none; }
  
  .hero__stats { 
    flex-direction: column; 
    gap: var(--space-lg); 
  }

  .converter-row { grid-template-columns: 1fr; }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .results__stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modes-grid {
    grid-template-columns: 1fr;
  }

  .hud__left { display: none; }
  .hud__right { display: none; }
}

@media (max-width: 480px) {
  .hero__title { font-size: 2rem; }
  .hero__actions { flex-direction: column; }
  .footer__grid { grid-template-columns: 1fr; }
  .presets-grid { grid-template-columns: repeat(3, 1fr); }
}
