/* ═══════════════════════════════════════════════════
   base.css — Общие стили для всех страниц фотокликер
   ═══════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Фоны */
  --bg-body: #181820;
  --bg-surface: rgba(255,255,255,0.04);
  --bg-surface-hover: rgba(255,255,255,0.07);
  --bg-elevated: rgba(255,255,255,0.09);
  --bg-canvas: #1e1e2a;
  --bg-inset: rgba(255,255,255,0.025);
  --bg-input: rgba(255,255,255,0.05);

  /* Акценты */
  --accent: #7c5bf5;
  --accent-hover: #9b7fff;
  --accent-muted: rgba(124,91,245,0.12);
  --accent-text: #ffffff;
  --accent2: #e8a840;
  --warm: #e8a840;

  /* Текст */
  --text-primary: rgba(255,255,255,0.93);
  --text-secondary: rgba(255,255,255,0.60);
  --text-tertiary: rgba(255,255,255,0.40);
  --text-disabled: rgba(255,255,255,0.25);

  /* Границы */
  --border-subtle: rgba(255,255,255,0.07);
  --border-default: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.20);

  /* Статусы */
  --success: #34d399;
  --danger: #f43f5e;

  /* Радиусы */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  /* Эффекты */
  --glass: blur(24px) saturate(1.4);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 20px rgba(124,91,245,0.25);

  /* Переходы */
  --tr-fast: 0.15s ease-out;
  --tr: 0.2s ease-out;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  color: var(--text-primary);
  background: var(--bg-body);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Скроллбар */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 999px; }

/* Уведомления (используются на нескольких страницах) */
#notification {
  position: fixed; top: 20px; left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(24,24,36,0.95); backdrop-filter: blur(16px);
  border: 1px solid rgba(124,91,245,0.3); border-radius: var(--radius-md);
  padding: 10px 24px; font-size: 13px; color: var(--text-primary);
  z-index: 9999; transition: transform 0.3s ease-out; pointer-events: none;
  box-shadow: var(--shadow-lg);
}
#notification.show { transform: translateX(-50%) translateY(0); }
#notification.error { border-color: rgba(244,63,94,0.5); }

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

/* Мобильные устройства: отключаем тяжёлые эффекты */
@media (max-width: 768px) {
  /* Film grain — самый дорогой эффект: отключаем полностью */
  #film-grain { display: none !important; }

  /* Ambient orbs — 500px элементы с анимацией: отключаем */
  .ambient-orb, .ambient-orb.purple, .ambient-orb.gold, .ambient-orb.purple2 { display: none !important; }

  /* Canvas частицы — отключаем на мобильных */
  #account-particles, #gold-particles { display: none !important; }

  /* backdrop-filter на декоративных карточках — очень тяжело для мобильного GPU */
  .stat-card, .service-card, .history-card, .services-full-card,
  .plan-card, .settings-section, .tool-card, .step-card {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* Уважаем системную настройку "Уменьшить движение" */
@media (prefers-reduced-motion: reduce) {
  #film-grain { display: none !important; }
  .ambient-orb { display: none !important; }
  #account-particles, #gold-particles { display: none !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.1s !important;
  }
}
