/* Общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #111;
  color: #fff;
  line-height: 1.6;
  margin:0;
  padding: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Главный экран */
.hero {
  background: url('https://images.unsplash.com/photo-1540506905390-c6c4c902f2c2?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') no-repeat center center;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  color: #fff;

  padding-top: env(safe-area-inset-top);
  padding-top: calc(env(safe-area-inset-top) + 70px); /* запас 20px */

}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.hero > .container {
  position: relative;
  z-index: 2;
  /* padding: 40px; */

  padding: 20px;
  max-width: 100%;
  width: 100%;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: #FFD700;
  text-shadow: 2px 2px 4px #000;
}

.hero .subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Секция обратного отсчёта */
.countdown-section {
  text-align: center;
  margin: 25px auto;
  padding: 18px 15px;
  background: #111;
  border-radius: 12px;
  max-width: 600px;
  border: 1px solid #333;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.countdown-section h3 {
  color: #FFD700;
  font-size: 1.3rem;
  margin-bottom: 15px;
  font-weight: 500;
  line-height: 1.4;
}

/* Контейнер отсчёта */
.countdown {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 1.1rem;
  font-weight: bold;
}

.time-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #222;
  padding: 10px 12px;
  border-radius: 8px;
  min-width: 56px;
  color: #fff;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time-box span {
  font-size: 1.6rem;
  color: #FFD700;
  font-weight: 700;
  line-height: 1;
}

/* Адаптив: на маленьких экранах */
@media (max-width: 480px) {
  .countdown-section {
    margin: 20px 10px;
    padding: 15px 12px;
  }

  .countdown-section h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
  }

  .countdown {
    gap: 6px;
    font-size: 1rem;
  }

  .time-box {
    min-width: 50px;
    padding: 8px 10px;
    border-radius: 6px;
  }

  .time-box span {
    font-size: 1.35rem; /* Меньше, но всё ещё читаемо */
  }
}

/* Для очень узких экранов (320px) — делаем вертикально */
@media (max-width: 360px) {
  .countdown {
    flex-direction: row;
    gap: 4px;
  }

  .time-box {
    min-width: 46px;
    padding: 7px 8px;
  }

  .time-box span {
    font-size: 1.25rem;
  }
}

.btn {
  padding: 14px 28px;
  font-size: 1.1rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #FFD700;
  color: #000;
}

.btn-primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #000;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.btn-secondary:hover {
  background: #111;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #FFD700;
  border: 1px solid #FFD700;
}

.btn-outline:hover {
  background: #222;
}

.btn-no-border {
  margin-top: 40px;
  background: transparent;
  color: #FFD700;
}

/* Секция билетов */
.tickets-section {
  padding: 60px 0;
  background: #000;
}

.tickets-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
  color: #FFD700;
}

.tickets-section p {
  text-align: center;
  margin-bottom: 40px;
  color: #ccc;
}

.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* .ticket-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 20px;
  color: #ddd;
} */

/* Карточка билета */
.ticket-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 20px;
  color: #ddd;
  display: flex;
  flex-direction: column;
  height: 100%; /* Чтобы все карточки были одинаковой высоты в сетке */
}

/* Контейнер для фото */
.ticket-img-container {
  width: 100%;
  height: 180px; /* Фиксированная высота */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 12px;
  background: #222; /* Фон, если фото не загружено */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Фото билета */
.ticket-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Как .scaleAspectFill — заполняет, обрезая края */
  object-position: center;
  transition: transform 0.3s ease;
}

@media (max-width: 500px) {
  .ticket-img-container {
    height: 150px; /* Чуть меньше на мобильных */
  }
}

/* При наведении — лёгкий зум */
.ticket-img-container img:hover {
  transform: scale(1.05);
}

.ticket-card h4 {
  color: #FFD700;
  margin-bottom: 10px;
}

.ticket-card p {
  margin: 8px 0;
  font-size: 0.95rem;
}

.ticket-card .max-offer {
  font-size: 0.9rem;
  color: #aaa;
}

.ticket-card button {
  width: 100%;
  margin-top: 15px;
  padding: 10px;
  background: #FFD700;
  color: #000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
}

.ticket-card button:hover {
  background: #e6c200;
}

.request-box {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background: #1a1a1a;
  border-radius: 10px;
}

/* Модальные окна */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow-y: auto; /* Добавлено */
}

.modal-content {
  background: #111;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  position: relative;
  border: 1px solid #333;
  max-width: 800px;
  min-height: 300px;
  max-height: 90vh; /* Ограничение по высоте экрана */
  overflow-y: auto; /* Прокрутка внутри */
  border-radius: 10px;
  color: #fff;
}

.modal h3 {
  margin-bottom: 20px;
  color: #FFD700;
}

.modal label {
  display: block;
  margin: 10px 0 5px;
  font-size: 0.9rem;
  color: #ccc;
}

.modal input, .modal textarea {
  width: 100%;
  padding: 10px;
  background: #222;
  border: 1px solid #444;
  border-radius: 5px;
  color: #fff;
  font-size: 1rem;
}

.modal textarea {
  resize: vertical;
  min-height: 80px;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
}

.close:hover {
  color: #FFD700;
}

/* Скрытие элементов */
.hidden {
  display: none !important;
}

/* Адаптив */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero .subtitle {
    font-size: 1.1rem;
  }
  .buttons {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Страница продажи */
.sell-section {
  padding: 60px 0;
  background: #000;
}

.sell-section h2 {
  color: #FFD700;
  margin-bottom: 15px;
  font-size: 2rem;
}

.sell-section p {
  color: #ccc;
  margin-bottom: 30px;
}

.sell-form {
  max-width: 600px;
  margin: 0 auto;
  background: #1a1a1a;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid #333;
}

.sell-form label {
  display: block;
  margin: 15px 0 8px;
  color: #ddd;
  font-size: 0.95rem;
}

.label-info {
  display: block;
  margin: 20px 0 8px;
  color: #d6f529;
  font-size: 0.85rem;
}

.sell-form input,
.sell-form textarea,
.sell-form select {
  width: 100%;
  padding: 10px;
  background: #222;
  border: 1px solid #444;
  border-radius: 5px;
  color: #fff;
  font-size: 1rem;
}

.back-link {
  color: #FFD700;
  text-decoration: none;
  font-size: 1.1rem;
  margin-bottom: 20px;
  display: inline-block;
}

.back-link:hover {
  text-decoration: underline;
}

/* Изображение в карточке */
.ticket-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #333;
}


/* Модалка: Как это работает */
.how-it-works-content {
  max-width: 700px;
  line-height: 1.7;
}

.how-it-works-content h2 {
  color: #FFD700;
  text-align: center;
  margin-bottom: 20px;
}

.how-it-works-content h3,
.accordion-toggle {
  color: #FFD700;
  margin: 20px 0 10px;
  font-size: 1.2rem;
}

.highlight {
  color: #FFD700;
  font-weight: 600;
}

.guarantee, .warning {
  background: #222;
  padding: 12px;
  border-radius: 8px;
  border-left: 4px solid #FFD700;
  margin: 15px 0;
  font-size: 0.95rem;
}

.refund {
  color: #6cff6c;
  font-weight: bold;
}

.accordion {
  margin: 15px 0;
}

.accordion-toggle {
  background: #1a1a1a;
  color: #FFD700;
  border: 1px solid #333;
  padding: 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-size: 1.1rem;
  border-radius: 6px;
  transition: background 0.3s;
}

.accordion-toggle:hover {
  background: #2a2a2a;
}

.accordion-content {
  padding: 15px;
  background: #111;
  border: 1px solid #333;
  border-radius: 6px;
  margin-top: 8px;
  color: #ddd;
  font-size: 0.95rem;
}

.accordion-content ul {
  margin: 10px 0;
  padding-left: 20px;
}

.accordion-content li {
  margin: 6px 0;
}

/* Анимация раскрытия */
.accordion-content {
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  max-height: 800px; /* Увеличено */
  overflow: hidden;
}

.accordion-content:not(.hidden) {
  max-height: 500px;
  padding: 15px;
}

/* Стиль для выпадающего списка */
select {
  width: 100%;
  padding: 10px;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 5px;
  font-size: 1rem;
  font-family: 'Roboto', sans-serif;
  appearance: none; /* Убираем стандартный стиль */
  position: relative;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
  padding-right: 35px; /* Место для стрелки */
}

select:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Стиль при наведении */
select:hover {
  border-color: #FFD700;
}

/* Стили для спиннера загрузки */
#loading-spinner {
  display: inline;
}

.hidden {
  display: none !important;
}

/* Отключённая кнопка */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Footer */
.footer {
  background: #000;
  color: #ccc;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
  border-top: 1px solid #333;
}

.footer-links {
  margin-bottom: 15px;
}

.footer-btn {
  background: transparent;
  color: #FFD700;
  border: none;
  padding: 8px 15px;
  font-size: 0.95rem;
  cursor: pointer;
  margin: 0 10px;
  border-radius: 5px;
  transition: background 0.3s;
}

.footer-btn:hover {
  background: #222;
  text-decoration: underline;
}

.footer-text {
  font-size: 0.9rem;
  color: #777;
}

/* Модалка */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #111;
  padding: 30px;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #333;
  color: #fff;
}

.modal-content h3 {
  color: #FFD700;
  margin-top: 0;
  font-size: 1.4rem;
}

.modal-content p,
.modal-content ul {
  margin: 12px 0;
  line-height: 1.6;
}

.modal-content ul {
  padding-left: 20px;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
}

.close:hover {
  color: #FFD700;
}