@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@300;400;600&display=swap');

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.screen { display: none; width: 100%; height: 100%; }
.screen.active { display: block; }

/* ── Фон ── */
#menu-screen { position: relative; width: 100%; height: 100%; }

.menu-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/menu_bg.jpg');
  background-size: cover;
  background-position: center 60%;
  filter: brightness(0.45) saturate(0.7);
  z-index: 0;
}

.menu-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(80, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.75) 100%
  );
  z-index: 1;
}

/* ── Контент ── */
.menu-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
}

/* ── Заголовок ── */
.menu-title { text-align: center; margin-bottom: 1.5rem; }

.star-row {
  color: rgba(200, 30, 30, 0.6);
  letter-spacing: 10px;
  font-size: 11px;
  margin-bottom: 0.5rem;
}

.menu-title h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 10vw, 88px);
  font-weight: 400;
  color: #fff;
  letter-spacing: 8px;
  line-height: 1;
  text-shadow: 0 0 40px rgba(200, 30, 30, 0.6), 0 2px 20px rgba(0,0,0,0.9);
}

.title-accent {
  color: #C81E1E;
}

.subtitle {
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: #888;
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* ── Разделитель ── */
.divider {
  width: 240px;
  height: 1px;
  background: linear-gradient(to right, transparent, #C81E1E, transparent);
  margin: 0 auto 2rem;
}

/* ── Кнопки ── */
.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 270px;
}

.menu-btn {
  background: rgba(8, 8, 8, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #bbb;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 13px 24px;
  cursor: pointer;
  text-align: center;
  border-radius: 1px;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.1s;
  outline: none;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.menu-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #C81E1E;
  transform: scaleY(0);
  transition: transform 0.18s;
  transform-origin: bottom;
}

.menu-btn:hover:not(:disabled)::before { transform: scaleY(1); }

.menu-btn:hover:not(:disabled) {
  background: rgba(200, 30, 30, 0.12);
  border-color: rgba(200, 30, 30, 0.5);
  color: #fff;
}

.menu-btn:active:not(:disabled) { transform: scale(0.97); }

.menu-btn.primary {
  border-color: rgba(200, 30, 30, 0.5);
  color: #e05555;
}

.menu-btn.primary:hover {
  background: rgba(200, 30, 30, 0.18);
  color: #ff8080;
}

.menu-btn.disabled,
.menu-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Аудио ── */
.audio-btn {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(200, 30, 30, 0.3);
  border-radius: 1px;
  padding: 6px 12px;
  color: rgba(200, 30, 30, 0.85);
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 0.2s;
  outline: none;
}

.audio-btn:hover { background: rgba(0,0,0,0.85); }

.audio-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #C81E1E;
  animation: pulse 1.2s infinite;
  flex-shrink: 0;
}

.audio-dot.paused { animation: none; opacity: 0.3; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* ── Версия ── */
.menu-footer {
  position: absolute;
  bottom: 14px;
  right: 20px;
  text-align: right;
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 3px;
  z-index: 2;
}

/* ── Версия — badge ── */
.version-badge {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 10;
  font-family: 'Oswald', sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2px;
}

/* ── Мобильный ── */
@media (max-width: 480px) {
  .menu-buttons { width: 88vw; max-width: 300px; }
  .menu-title h1 { font-size: 52px; letter-spacing: 5px; }
}

/* ══════════════════════════════════════════════
   АЛЬБОМНАЯ ОРИЕНТАЦИЯ — LANDSCAPE LOCK
   ══════════════════════════════════════════════ */

/* Плашка "поверни телефон" — скрыта по умолчанию */
#portrait-warning {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#portrait-warning .pw-icon {
  font-size: 52px;
  animation: rotate-phone 1.5s ease-in-out infinite alternate;
}

#portrait-warning .pw-text {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  letter-spacing: 4px;
  color: #C81E1E;
  text-transform: uppercase;
}

#portrait-warning .pw-sub {
  font-family: 'Oswald', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  color: #444;
}

@keyframes rotate-phone {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(90deg);  }
}

/* На портретном экране — показываем плашку, прячем игру */
@media screen and (orientation: portrait) {
  #portrait-warning { display: flex; }
  #menu-screen,
  #game-screen      { display: none !important; }
}

/* Мета-тег в HTML блокирует rotation, но на случай если нет —
   оставляем CSS как fallback */
