/* Кнопка, которая открывает модальное окно */
:root {
  --primary-color: #3498db;
  --accent-color: #e74c3c;
  --background-gradient-start: #1a3444;
  --background-gradient-end: #34495e;
  --card-bg: rgba(20, 20, 20, 0.9);
  --card-border: #0d4061;
  --btn-bg: var(--accent-color);
  --btn-bg-hover: #c0392b;
}

.open-modal-btn {
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(90deg, #3498db, #2c3e50);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  margin: 20px 0; /* произвольный отступ */
}

.open-modal-btn:hover {
  background: linear-gradient(90deg, #2980b9, #34495e);
}

/* Подложка под модалкой (тёмный полупрозрачный фон) */
.modal-overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;

  /* Flex, чтобы контент располагался по центру */
  display: flex; 
  align-items: center; 
  justify-content: center;
}

/* Содержимое модального окна */
.modal-content {
  background: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
  border-radius: 10px;
  padding: 30px 40px;
  max-width: 500px;
  width: 90%;         /* чтобы на мобильных экран не «вылазил» */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  position: relative; 
  text-align: center;
  animation: fadeIn 0.3s ease; /* небольшая анимация появления */
}

/* Кнопка-крестик (в правом верхнем углу) */
.close-button {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  line-height: 1;
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  transition: color 0.3s;
}

.close-button:hover {
  color: #444;
}

/* Кнопка «Закрыть» внизу */
.close-modal {
  margin-top: 20px;
  padding: 12px 24px;
  background: #3498db;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}
.close-modal:hover {
  background: #2980b9;
}

/* Анимация появления */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность */
@media (max-width: 480px) {
  .modal-content {
    padding: 20px;
  }
  .close-button {
    font-size: 24px;
    top: 10px; right: 10px;
  }
}
