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

body {
  font-family: "Arial", sans-serif;
  background: linear-gradient(180deg, #d4c0db, #7030a0);
  min-height: 100vh;
  padding: 0;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Стили для хедера */
.header {
  position: relative;
  width: 100%;
  height: 100px;
  background: linear-gradient(180deg, #e4eaf4 0%, #dae3f3 100%);
  overflow: visible; /* Меняем на visible чтобы волны были видны */
  margin-bottom: 40px;
}

/* Основной контент хедера */
.header-content {
  position: relative;
  z-index: 4;
  padding: 1.5rem 2rem 3rem;
  color: white;
  text-align: center;
  font-family: Arial, sans-serif;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.header-center {
  text-align: center;
  margin-bottom: 20px;
}

.header-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 2px solid #ff7f00; /* Оранжевая рамка */
  color: #ffff41; /* Оранжевый текст */
  background-color: #ffc035;
  padding: 10px 20px;
  border-radius: 10px; /* Скругление */
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

/* Левая кнопка */
.header-button-left {
  left: 2rem;
}

/* Правая кнопка */
.header-button-right {
  right: 2rem;
}

/* Эффекты при наведении */
.header-button:hover {
  background: #ffb20c; /* Оранжевый фон при наведении */
  color: white;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.3);
}

/* Эффект при нажатии */
.header-button:active {
  transform: translateY(-50%) scale(0.95);
  box-shadow: 0 2px 6px rgba(255, 127, 0, 0.2);
}

.button-text {
  font-size: 19px;
}

/* Контейнер для верхней волны */
.wave-container-top {
  position: absolute;
  bottom: 0%;
  left: 0%;
  width: 100%;
  height: 52px;
  z-index: 3;
}

/* Контейнер для нижней волны */
.wave-container-bottom {
  position: absolute;
  top: 100px;
  left: 0;
  width: 100%;
  height: 52px;
  z-index: 3;
  transform: rotate(180deg);
}

.rainbow-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    #ff5656 0%,
    #ff9e3d 16.66%,
    #ffff3e 33.33%,
    #3eff3e 50%,
    #3838ff 66.66%,
    #591788 83.33%,
    #9f34cd 100%
  );
  /* Волна с подъемами и спадами */
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,96 C150,24 300,168 450,96 C600,24 750,168 900,96 C1050,24 1200,168 1200,168 L1200,120 L0,120 Z" fill="white"/></svg>');
  mask-size: 1200px 100%;
  mask-repeat: repeat-x;
  -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,96 C150,24 300,168 450,96 C600,24 750,168 900,96 C1050,24 1200,168 1200,168 L1200,120 L0,120 Z" fill="white"/></svg>');
  -webkit-mask-size: 100px 100%;
  -webkit-mask-repeat: repeat-x;
}

/* Для верхней волны немного смещаем градиент для красоты */
.wave-container-top .rainbow-wave {
  background: linear-gradient(
    90deg,
    #9400d3 0%,
    #4b0082 16.66%,
    #0000ff 33.33%,
    #00ff00 50%,
    #ffff00 66.66%,
    #ff7f00 83.33%,
    #ff0000 100%
  );
}

.header-content h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-content p {
  font-size: 1.2em;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.path-container {
  position: relative;
  margin: 40px 0;
  min-height: 700px;
  z-index: 1; /* Убеждаемся что контент ниже волн */
}

.lessons-container {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.lesson-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0;
  position: relative;
  opacity: 1;
  transform: none;
  flex: 1;
  z-index: 2;
}

.lesson-button {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  position: relative; /* Важно для абсолютного позиционирования замка */
  z-index: 3;
  text-decoration: none;
  overflow: hidden; /* Чтобы ничего не выходило за границы кнопки */
}

.lesson-button::after {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lesson-button:hover::before,
.lesson-button:hover::after {
  opacity: 1;
  visibility: visible;
}

.lesson-button:hover {
  transform: scale(1.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Анимация нажатия для доступных кнопок */
.lesson-button:active:not(.lesson-locked),
.lesson-button:active:not(.lesson-locked) .lesson-icon {
  transform: scale(0.92); /* Уменьшение на 8% */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* Уменьшаем тень при нажатии */
  transition: all 0.1s ease; /* Быстрая анимация при нажатии */
}

.lesson-completed {
  background: #58cc02;
  color: white;
}

.lesson-current {
  background: #ffc800;
  color: white;
}

.lesson-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.lesson-lock-icon {
  position: absolute; /* Абсолютное позиционирование поверх иконки */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Центрирование */
  width: 58px; /* Размер замка */
  height: auto;
  object-fit: contain;
  opacity: 0.8; /* Полупрозрачность */
  z-index: 4; /* Выше чем основная иконка */
  filter: drop-shadow(
    0 2px 4px rgba(0, 0, 0, 0.3)
  ); /* Тень для лучшей видимости */
}

.lesson-locked {
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
  pointer-events: none;
}

.lesson-locked .lesson-icon {
  opacity: 0.4; /* Делаем основную иконку более прозрачной */
  filter: grayscale(0.7); /* Немного обесцвечиваем */
}

.lesson-completed::after {
  content: "✓";
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ffc800;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: bold;
}

.lesson-connector {
  position: absolute;
  background: #ffc800;
  width: 4px;
  height: 40px;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  border-radius: 2px;
}

/* Убираем соединительную линию у первого урока */
.lesson-item:first-child .lesson-connector {
  display: none;
}

.progress-wrapper {
  display: flex;
  flex-wrap: nowrap; /* Запрещаем перенос на новую строку */
}

.progress-container {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 15px 20px;
  margin-top: 10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  color: #000000;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 0.9em;
}

.progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ffed4e);
  border-radius: 6px;
  transition: width 0.5s ease;
  width: 33%;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .header {
    /* height: 250px; */
    margin-bottom: 30px;
  }

  /* .wave-container-bottom,
  .wave-container-top {
    height: 60px;
  }

  .wave-container-bottom {
    bottom: -50px;
  }

  .wave-container-top {
    top: -50px;
  } */

  .header-content {
    padding: 1rem 1.5rem 2.5rem;
  }

  .header-button {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 80px;
  }

  .header-button-left {
    left: 1.5rem;
  }

  .header-button-right {
    right: 1.5rem;
  }

  .header-content h1 {
    font-size: 2em;
  }

  .header-content p {
    font-size: 1.1em;
  }

  .path-container {
    min-height: 600px;
  }

  .lesson-button {
    width: 80px;
    height: 80px;
  }

  .lesson-button::before {
    font-size: 12px;
    padding: 6px 10px;
  }

  .lesson-connector {
    height: 30px;
    top: -28px;
  }

  .lesson-icon {
    width: 50px;
    height: 50px;
  }

  .lesson-lock-icon {
    width: 46px;
    height: auto;
  }

  .progress-container {
    max-width: 350px;
    padding: 12px 15px;
    /* margin-top: 20px; */
  }

  .progress-info {
    font-size: 0.85em;
  }

  .progress-bar {
    height: 10px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
  }

  .header {
    /* height: 220px; */
    margin-bottom: 20px;
  }

  /* .wave-container-bottom,
  .wave-container-top {
    height: 50px;
  }

  .wave-container-bottom {
    bottom: -40px;
  }

  .wave-container-top {
    top: -40px;
  } */

  .header-content {
    padding: 0.8rem 1rem 2rem;
  }

  .header-button {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 70px;
  }

  .header-button-left {
    left: 1rem;
  }

  .header-button-right {
    right: 1rem;
  }

  .button-text {
    font-size: 14px;
  }

  .header-content h1 {
    font-size: 1.8em;
  }

  .header-content p {
    font-size: 1em;
  }

  .path-container {
    min-height: 500px;
  }

  .lesson-button {
    width: 70px;
    height: 70px;
  }

  .lesson-button::before {
    font-size: 11px;
    padding: 5px 8px;
  }

  .lesson-connector {
    height: 25px;
    top: -29px;
    width: 3px;
  }

  .lesson-icon {
    width: 40px;
    height: 40px;
  }

  .lesson-lock-icon {
    width: 40px;
    height: auto;
  }

  .progress-container {
    max-width: 90px;
    padding: 10px 12px;
    /* margin-top: 15px; */
  }

  .progress-info {
    font-size: 0.8em;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }

  .progress-bar {
    height: 8px;
  }
}
