@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=JetBrains+Mono:wght@300;400;500&family=Space+Grotesk:wght@300;400;500;700&display=swap');

:root {
  --bg-deep: #050609;
  --bg-card: rgba(13, 16, 27, 0.75);
  --bg-card-border: rgba(139, 92, 246, 0.2);
  --accent-purple: #8b5cf6;
  --accent-cyan: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.25);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #475569;
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Space Grotesk', sans-serif;
  --font-serif: 'Cormorant Garamond', serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Эффект сканирующих линий CRT */
#scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.03),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.03)
  );
  background-size: 100% 3px, 6px 100%;
  opacity: 0.6;
}

/* Анимированный фоновый градиент */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
  animation: ambientPulse 12s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.1) translate(-10px, 15px); opacity: 1; }
}

/* Канвас с мерцающими частицами */
#bg-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Верхняя панель управления (Звук + Меню) */
.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo:hover {
  text-shadow: 0 0 10px var(--accent-cyan);
}

.sound-btn {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid var(--accent-purple);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.sound-btn:hover {
  background: var(--accent-purple);
  box-shadow: 0 0 15px var(--accent-purple);
}

.sound-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Основной контейнер страниц */
.page-container {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 20px 60px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Кастомные кнопки */
.btn-primary {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(56, 189, 248, 0.2));
  border: 1px solid var(--accent-purple);
  color: var(--text-main);
  font-family: var(--font-mono);
  padding: 14px 32px;
  font-size: 0.9rem;
  letter-spacing: 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.btn-primary:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px var(--accent-cyan);
  transform: translateY(-2px);
  color: #fff;
}

/* Навигационная панель между страницами */
.nav-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 100;
  background: rgba(5, 6, 9, 0.85);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  max-width: 90vw;
  overflow-x: auto;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 6px 12px;
  border-radius: 15px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
}

/* Скрытый модальный оверлей пасхалки */
.easter-modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 4, 7, 0.95);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  padding: 20px;
}

.easter-modal.active {
  opacity: 1;
  pointer-events: all;
}

.easter-content {
  background: var(--bg-card);
  border: 1px solid var(--accent-purple);
  padding: 40px;
  max-width: 500px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .top-header { padding: 15px 20px; }
  .page-container { padding: 80px 15px 80px; }
  .nav-footer { bottom: 10px; }
}
/* Добавь это в конец файла css/global.css */
@keyframes lineFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}