/* ===== СОВРЕМЕННЫЕ СТИЛИ ДЛЯ ДЕТСКОГО САЙТА ОБ ИИ DEVKIDS.RU ===== */

/* CSS Custom Properties (переменные) */
:root {
  /* Цветовая палитра */
  --primary-gradient: linear-gradient(90deg, #3B82F6, #9333EA);
  --bg-gradient: radial-gradient(circle, #1A0D3D, #0D061F);
  --surface: rgba(255, 255, 255, 0.1);
  --surface-hover: rgba(255, 255, 255, 0.15);
  --border: rgba(255, 255, 255, 0.2);
  
  /* Цвета текста */
  --text-primary: #F3F4F6;
  --text-secondary: #A1A1AA;
  --text-accent: #22C55E;
  --text-warning: #F97316;
  
  /* Отступы (система 8px) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  --space-xxxl: 96px;
  
  /* Скругления и тени */
  --radius: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glow: 0 0 24px rgba(147, 51, 234, 0.4);
  
  /* Анимации */
  --transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Базовые стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===== НАВИГАЦИЯ ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--surface);
  backdrop-filter: blur(32px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
}

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

.logo {
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  box-shadow: var(--glow);
}

.brand-text {
  font-weight: 600;
  font-size: 18px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-links.active {
  display: flex !important;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 35, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 18px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

/* ===== ГЛАВНАЯ СЕКЦИЯ ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(59,130,246,0.3)"><animate attributeName="opacity" values="0;1;0" dur="3s" repeatCount="indefinite"/></circle><circle cx="80" cy="30" r="1.5" fill="rgba(147,51,234,0.3)"><animate attributeName="opacity" values="0;1;0" dur="2s" repeatCount="indefinite" begin="1s"/></circle><circle cx="60" cy="70" r="1" fill="rgba(34,197,94,0.3)"><animate attributeName="opacity" values="0;1;0" dur="4s" repeatCount="indefinite" begin="2s"/></circle></svg>') repeat;
  animation: float 20s infinite linear;
}

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

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxxl);
  align-items: center;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.author-info {
  margin-bottom: var(--space-xl);
}

.author-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--surface);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.author-avatar {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: var(--text-primary);
  box-shadow: var(--glow);
}

.author-details h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.author-details p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.tech-stack {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.tech-tag {
  padding: 4px 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-accent);
  font-weight: 500;
}

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

.btn {
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
  z-index: 10;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-primary);
  box-shadow: var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 40px rgba(147, 51, 234, 0.6);
}

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

.btn-secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.btn-game {
  background: var(--primary-gradient);
  color: var(--text-primary);
  box-shadow: var(--glow);
  width: 100%;
  justify-content: center;
}

/* ===== ВИЗУАЛИЗАЦИЯ МОЗГА ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.ai-brain {
  position: relative;
  width: 300px;
  height: 300px;
}

.neuron-connections {
  position: relative;
  width: 100%;
  height: 100%;
}

.neuron {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--primary-gradient);
  border-radius: 50%;
  box-shadow: var(--glow);
  animation: pulse 2s infinite ease-in-out;
  z-index: 1;
}

.neuron.n1 { top: 20%; left: 20%; animation-delay: 0s; }
.neuron.n2 { top: 10%; right: 30%; animation-delay: 0.4s; }
.neuron.n3 { bottom: 30%; left: 10%; animation-delay: 0.8s; }
.neuron.n4 { bottom: 20%; right: 20%; animation-delay: 1.2s; }
.neuron.n5 { top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: 1.6s; }

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

.connection {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3B82F6, transparent);
  animation: flow 3s infinite ease-in-out;
  z-index: 1;
}

.connection.c1 { top: 25%; left: 25%; width: 100px; transform: rotate(45deg); animation-delay: 0s; }
.connection.c2 { top: 15%; right: 35%; width: 80px; transform: rotate(-30deg); animation-delay: 0.6s; }
.connection.c3 { bottom: 35%; left: 15%; width: 90px; transform: rotate(30deg); animation-delay: 1.2s; }
.connection.c4 { bottom: 25%; right: 25%; width: 85px; transform: rotate(-45deg); animation-delay: 1.8s; }
.connection.c5 { top: 50%; left: 50%; width: 120px; transform: translate(-50%, -50%); animation-delay: 2.4s; }

@keyframes flow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ===== СЕКЦИИ ===== */
.section {
  padding: var(--space-xxxl) 0;
  position: relative;
}

.section.bg-dark {
  background: rgba(0, 0, 0, 0.2);
}

.section.bg-gradient {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
}

.section-title {
  font-size: 40px;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-md);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-xxxl);
}

/* ===== КАРТОЧКИ ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xxxl);
}

.card {
  padding: var(--space-lg);
  background: var(--surface);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 16px 48px rgba(59, 130, 246, 0.2);
}

.card-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.card h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== ИНФО БЛОК ===== */
.info-block {
  margin-top: var(--space-xxxl);
  padding: var(--space-xl);
  background: var(--surface);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-block h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  text-align: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
}

.usage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: var(--transition);
}

.usage-item:hover {
  transform: translateY(-4px);
  background: var(--surface);
}

.usage-icon {
  font-size: 32px;
}

.usage-item span {
  font-weight: 500;
  text-align: center;
}

/* ===== ИГРЫ ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.game-card {
  padding: var(--space-lg);
  background: var(--surface);
  backdrop-filter: blur(32px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  text-align: center;
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 56px rgba(147, 51, 234, 0.3);
}

.game-icon {
  font-size: 56px;
  margin-bottom: var(--space-md);
}

.game-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.game-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

/* ===== ПРОЕКТ ===== */
.project-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxxl);
  align-items: start;
}

.project-text h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.project-text h4 {
  font-size: 20px;
  font-weight: 600;
  margin: var(--space-lg) 0 var(--space-sm) 0;
  color: var(--text-primary);
}

.project-text p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.project-text ul {
  margin: var(--space-sm) 0 var(--space-md) var(--space-md);
}

.project-text li {
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  line-height: 1.6;
}

.highlight-box {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 16px;
  border-left: 4px solid #3B82F6;
}

/* ===== ТАЙМЛАЙН ===== */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-gradient);
  border-radius: 1px;
}

.timeline-item {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  position: relative;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: var(--glow);
}

.timeline-content h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== КУРСЫ ===== */
.courses-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxxl);
  align-items: center;
}

.course-info h3 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.course-info p {
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.course-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.feature h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.feature p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* ===== БУДУЩИЕ ЭЛЕМЕНТЫ ===== */
.future-ai {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.floating-elements {
  position: relative;
  width: 100%;
  height: 100%;
}

.element {
  position: absolute;
  font-size: 32px;
  animation: float 4s infinite ease-in-out;
}

.element.e1 { top: 20%; left: 20%; animation-delay: 0s; }
.element.e2 { top: 20%; right: 20%; animation-delay: 1s; }
.element.e3 { bottom: 30%; left: 30%; animation-delay: 2s; }
.element.e4 { bottom: 20%; right: 25%; animation-delay: 3s; }

/* ===== ФУТЕР ===== */
.footer {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid var(--border);
  padding: var(--space-xxxl) 0 var(--space-lg) 0;
}

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

.footer-info h4,
.footer-tech h4 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.footer-info p {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.tech-list {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.tech-item {
  padding: var(--space-xs) var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-accent);
  font-weight: 500;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
  .hero-content,
  .project-content,
  .courses-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }
  
  .hero-visual {
    order: -1;
  }
  
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .project-content ul {
    list-style-type: none;
  }
  
  .timeline-content h4 {
    text-align: left !important;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 40px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .cards-grid,
  .games-grid {
    grid-template-columns: 1fr;
  }
  
  .usage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .author-card {
    flex-direction: column;
    text-align: center;
  }
  
  .usage-grid {
    grid-template-columns: 1fr;
  }
  
  .tech-stack {
    justify-content: center;
  }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ АНИМАЦИИ ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Скролл-поведение */
html {
  scroll-behavior: smooth;
}

/* Убираем outline у кнопок для лучшего вида */
button:focus,
.btn:focus {
  outline: none;
}

/* Стили для скроллбара */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #2563EB, #7C3AED);
}