/* Файл: assets/css/mariner-quiz.css */
/* Стиль игры «Мореплаватели и их открытия» */

:root {
  --mq-font: 'Segoe UI', Roboto, sans-serif;
  --mq-bg: #f9fafb;
  --mq-accent: #0078d7;
  --mq-correct: #5cb85c;
  --mq-wrong: #d9534f;
  --mq-dark: rgba(0, 0, 0, 0.4);
}

body .mq-wrapper {
  font-family: var(--mq-font);
  color: #333;
  text-align: center;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== Hero (первая страница) ===== */
.mq-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.mq-hero-bg {
  background: linear-gradient(var(--mq-dark), var(--mq-dark)), url('../img/sea-bg.jpg') center/cover no-repeat;
  position: absolute;
  inset: 0;
  z-index: 1;
}

.mq-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  height: 100%;
}

.mq-hero-panel {
  background: rgba(255,255,255,0.8);
  color: #111;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 720px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  text-align: center;
}

/* Внутренности панели — делаем заголовок крупнее и белые кнопки с акцентом */
.mq-hero-panel .mq-title {
  color: #111;
  margin-bottom: 0.4rem;
}

.mq-hero-panel .mq-desc,
.mq-hero-panel .mq-rules {
  color: #333;
  font-size: 1.05rem; /* одинаковый размер */
  line-height: 1.5;
  font-weight: 400;
}

.mq-title {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.mq-desc {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.mq-rules {
  background: transparent;
  text-align: left;
  margin: 12px 0 18px;
  padding: 0;
}

.mq-rules h3 {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Кнопки */
.mq-btn {
  background: #004524;
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.mq-btn:hover {
  background: #78dbe2;
}

/* ===== Игровая страница ===== */
.mq-game {
  padding: 1rem;
  min-height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), 
              url('../img/sea-bg.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.mq-map-area {
  width: 100%;
  max-width: 1400px; /* можно увеличить при необходимости */
  margin: 18px auto 0;
  padding: 0 16px;
  box-sizing: border-box;
}

.mq-map {
  width: 100%;
  padding-top: 56.25373312626927%; /* фиксированное соотношение от твоего файла */
  background: url('../img/world-map.jpg') center/contain no-repeat;
  background-size: contain;
  border-radius: 10px;
  overflow: visible;
  position: relative;
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

.mq-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 0.5rem;
  width: 180px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.mq-pin.correct {
  border: 2px solid var(--mq-correct);
  background: #e7f9e7;
}

.mq-pin.wrong {
border: 2px solid var(--mq-wrong);
background: #fbe8e8;
}

.mq-pin-text strong {
color: var(--mq-accent);
}

/* ===== Карточки мореплавателей ===== */
.mq-cards-area {
  margin: 10px auto 30px;
  padding: 14px;
  width: 100%;
  max-width: 1400px; /* как у карты */
  box-sizing: border-box;
}

.mq-cards-panel {
  background: rgba(43, 43, 43, 0.8); /* стало чуть прозрачным */
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mq-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.mq-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  width: 140px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s;
  cursor: grab;
}

.mq-card:active {
  cursor: grabbing;
  transform: scale(1.05);
}

.mq-card-img img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.mq-card-name {
  font-size: 14px;
  text-align: center;
  height: 50px; /* вместо min-height — фиксируем */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0; /* убираем лишний верхний отступ */
}

.mq-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Адаптив: на маленьких экранах уменьшаем размер карточек и делаем карту чуть выше */
@media (max-width: 768px) {
  .mq-map-area { padding: 0 8px; }
  .mq-pin { width: 160px; font-size: 0.85rem; }
  .mq-card { width: 120px; }
  .mq-card-img img { height: 80px; }
  .mq-cards-panel { padding: 10px; }
}

/* ===== Модальное окно результата ===== */
.mq-result {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mq-result-inner {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 300px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mq-result-score {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.mq-result-text {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .mq-hero-content {
    padding: 1.5rem;
  }

  .mq-pin {
    width: 140px;
    font-size: 0.8rem;
  }

  .mq-card {
    width: 120px;
  }

  .mq-card-img img {
    height: 80px;
  }
}
