.header-v2 {
  background: url("https://www.transparenttextures.com/patterns/old-mathematics.png");
  background-color: #4a4a4a;
  padding: 25px 0;
  border-top: 6px double #ffce54;
  border-bottom: 6px double #ffce54;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
  position: relative;
}
.header-v2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 206, 84, 0.3), rgba(0, 0, 0, 0));
  mix-blend-mode: overlay;
}
.header-v2 .logo img {
  max-height: 80px;
  border: 3px solid #ffce54;
  padding: 5px;
  border-radius: 10px;
  transition: transform 0.3s ease;
}
.header-v2 .logo img:hover {
  transform: scale(1.1);
}
.header-v2 .nav a {
  font-size: 19px;
  font-weight: 600;
  color: #ecf0f1;
  margin-right: 20px;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.header-v2 .nav a:hover {
  background: rgba(231, 76, 60, 0.8);
  transform: scale(1.1) translateY(-3px);
}

.modal {
  display: none; /* по умолчанию скрыто */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.modal.show {
  display: flex; /* когда добавлен класс show */
}

/* Содержимое модалки */
.modal-content {
  position: relative;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: popIn 0.3s ease;
}

/* Анимация появления */
@keyframes popIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Кнопка закрытия */
.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}
.modal-close:hover {
  color: #000;
}

/* Адаптив */
@media (max-width: 480px) {
  .modal-content {
    padding: 1rem;
  }
  .modal-close {
    font-size: 1.25rem;
  }
}
