/* Global */
:root {
  --bg-dark: #0d0d0d;
  --bg-dark-light: #1c1c1c;
  --bg-dark-lighter: #2a2a2a;
  --text-light: #f2f2f2;
  --text-muted: #555;
  --gradient-primary: linear-gradient(135deg, #7a00ff, #bb00ff);
  --button-bg: #444;
  --button-primary-bg: #222;
  --button-hover-bg: #666;
  --button-primary-hover-bg: #000;
  --border-color: #333;
  --border-color-light: #ffffff55;

  /* New feature card colors from screenshot */
  --feature-color-1: #70809b;
  --feature-color-2: #7d8c65;
  --feature-color-3: #d9b244;
  --feature-color-4: #c8565a;
  --feature-color-5: #8e63ad;

  /* Logo size variable */
  --logo-size: 100px;
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 {
  margin: 0;
}

.section {
  padding: 80px 20px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

/* Header */
.header {
  background: var(--bg-dark);
  padding: 140px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Под логотипом, над основным фоном */
}

.header-content {
  position: relative;
  z-index: 3; /* Над всем */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.header-content h1 {
  font-size: 64px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlideUp 0.8s ease-out 0.5s forwards;
}

.subtitle {
  margin-top: 10px;
  font-size: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInSlideUp 0.8s ease-out 0.7s forwards;
}

@keyframes fadeInSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.logo-container {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--logo-size); /* Используем переменную */
  height: var(--logo-size);
  z-index: 2; /* Над canvas, под заголовком */
  transform-origin: center center; /* Точка вращения */
  transition: transform 0.15s ease-out; /* Для плавных интерактивных эффектов */
}

.logo {
  height: 100%; /* Занимает весь контейнер */
  width: 100%;
  opacity: 1; /* Полностью видимый */
  filter: drop-shadow(0 0 10px rgba(122, 0, 255, 0.5)); /* Небольшое свечение */
}

/* Buttons */
.button {
  display: inline-block;
  padding: 12px 28px;
  margin-top: 25px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-light);
  background: var(--button-bg);
  transition: all 0.3s ease-in-out; /* Более плавная анимация */
  font-size: 16px;
}

.button.primary {
  background: var(--button-primary-bg);
  border: 1px solid var(--border-color-light);
}

.button:hover {
  background: var(--button-hover-bg);
  transform: translateY(-3px) scale(1.02); /* Более выраженный эффект */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.button.primary:hover {
  background: var(--button-primary-hover-bg);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.button.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Features */
.features-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 40px;
}

.feature {
  background: var(--bg-dark-light);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
  position: relative; /* Для псевдоэлемента */
  overflow: hidden; /* Обрезаем градиент за пределами карточки */
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Более сложная функция для плавности */
  z-index: 1;
}

.feature::before {
  content: '';
  position: absolute;
  top: -75%; /* Смещение для лучшей видимости */
  left: -75%; /* Смещение для лучшей видимости */
  width: 250%; /* Уменьшаем размер для лучшей видимости */
  height: 250%; /* Уменьшаем размер */
  background: var(--gradient-primary);
  transform: rotate(45deg);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.feature:hover {
  transform: translateY(-10px) scale(1.03); /* Более выраженный эффект, с небольшим масштабированием */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* Немного более мягкая тень */
  border-color: transparent; /* Скрываем основную границу при наведении, чтобы показать градиент */
}

.feature:hover::before {
  opacity: 1; /* Полностью видимое свечение */
  animation: rotateGradient 4s linear infinite; /* Анимируем вращение градиента */
}

@keyframes rotateGradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Feature card specific colors */
.feature:nth-of-type(1) {
  background: var(--feature-color-1);
  color: #fff; /* Убедимся, что текст читаем */
}
.feature:nth-of-type(2) {
  background: var(--feature-color-2);
  color: #fff;
}
.feature:nth-of-type(3) {
  background: var(--feature-color-3);
  color: #333; /* Желтый фон, темный текст */
}
.feature:nth-of-type(4) {
  background: var(--feature-color-4);
  color: #fff;
}
.feature:nth-of-type(5) {
  background: var(--feature-color-5);
  color: #fff;
}
.feature:nth-of-type(6) {
  background: var(--feature-color-1); /* Повторяем первый цвет */
  color: #fff;
}

/* Screenshot */
.screenshot-box {
  margin-top: 40px;
  background: var(--bg-dark-light);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease-in-out; /* Более плавная анимация */
}

.screenshot-box:hover {
  transform: translateY(-8px) scale(1.02); /* Более выраженный эффект */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.screenshot-box img {
  width: 100%;
  border-radius: 6px;
}

/* Carousel */
.carousel-container {
  position: relative;
  /* Ensure buttons stay within the box */
}

.carousel-track {
  position: relative;
  width: 100%;
}

.carousel-img {
  display: none;
  width: 100%;
  border-radius: 6px;
}

.carousel-img.active {
  display: block;
  animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
  from {opacity: 0.4;}
  to {opacity: 1;}
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s ease;
  z-index: 5;
  user-select: none;
}

.carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.prev-btn {
  left: 20px; /* Adjust based on padding */
}

.next-btn {
  right: 20px; /* Adjust based on padding */
}

/* Download */
.download-buttons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Footer */
.footer {
  padding: 40px 20px;
  text-align: center;
  color: #555;
  font-size: 14px;
}