/* ============================================
   CSS ПЕРЕМЕННЫЕ (Global Variables)
   ============================================ */
:root {
  /* Основные цвета */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg-gradient-start: #e8eff5;
  --bg-gradient-end: #d4e1f0;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --white: #ffffff;
  --black: #000000;

  /* Тени и эффекты */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px -12px rgba(0, 0, 0, 0.25);

  /* Скругления */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Анимации */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index слои */
  --z-bg: -2;
  --z-default: 1;
  --z-header: 5;
  --z-dropdown: 10;
  --z-modal: 1000;
  --z-tooltip: 10000;
  --z-max: 20000;
}

/* ============================================
   СБРОС СТИЛЕЙ (Reset)
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ BODY
   ============================================ */
body {
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start) 0%,
    var(--bg-gradient-end) 100%
  );
  font-family: "Roboto", sans-serif;
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.6;
  padding: 15px;
  position: relative;
  overflow-x: hidden;
}

/* Тень от градиента на весь фон */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 300px;
  background: radial-gradient(
    ellipse at center top,
    rgba(0, 31, 63, 0.15) 0%,
    rgba(0, 116, 217, 0.12) 20%,
    rgba(57, 204, 204, 0.1) 40%,
    rgba(61, 153, 112, 0.08) 60%,
    rgba(127, 219, 255, 0.06) 80%,
    transparent 100%
  );
  filter: blur(40px);
  z-index: var(--z-bg);
  animation: shadowPulse 8s ease-in-out infinite;
}

/* ============================================
   БАЗОВЫЕ АНИМАЦИИ
   ============================================ */
@keyframes shadowPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ============================================
   УТИЛИТЫ
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px;
  position: relative;
  z-index: var(--z-default);
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* ============================================
   ТИПОГРАФИКА
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

h1 {
  font-size: 2.8rem;
  color: var(--text-dark);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

h2 {
  text-align: center;
  color: #246e89;
}

.section-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 25px;
  text-align: center;
  position: relative;
  padding-bottom: 12px;
  z-index: var(--z-default);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #ff6b6b, #ffd166, #4ecdc4);
  border-radius: 1.5px;
}

p {
  text-align: center;
  vertical-align: top;
}

/* ============================================
   СЕКЦИИ
   ============================================ */
.section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-md);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  perspective: 1000px;
  overflow: hidden;
}

/* Радужная полоска сверху */
.section::before,
.header::after,
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(
    90deg,
    #ff0000,
    #00ff00,
    #0000ff,
    #ffff00,
    #ff00ff
  );
  background-size: 500% 100%;
  animation: rainbow-bg 10s ease infinite;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: var(--z-default);
}

@keyframes rainbow-bg {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* ============================================
   СКРОЛЛБАР
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
