/* ── Slideshow background (shared across menu + settings) ── */
#menu-bg-slideshow {
  position: fixed; inset: 0; z-index: 99;
  overflow: hidden; background: #0a0d12;
  pointer-events: none;
}
#menu-bg-slideshow .bg-slide {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  will-change: opacity, transform;
  animation: bg-breathe 12s ease-in-out infinite;
}
#menu-bg-slideshow .bg-slide.active { opacity: 1; }
#menu-bg-slideshow .bg-video {
  position: absolute; inset: -40px;
  width: calc(100% + 80px); height: calc(100% + 80px);
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  filter: brightness(0.72) saturate(0.55) contrast(1.12);
}
#menu-bg-slideshow .bg-video.active { opacity: 1; }
@keyframes bg-breathe {
  0%   { transform: scale(1.00) translate(0, 0); }
  33%  { transform: scale(1.04) translate(-8px, 4px); }
  66%  { transform: scale(1.02) translate(4px, -6px); }
  100% { transform: scale(1.00) translate(0, 0); }
}
#menu-bg-slideshow::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(10,13,18,0.35) 0%, rgba(10,13,18,0.8) 65%, rgba(10,13,18,0.95) 100%);
}

#menu-screen {
  position: fixed; inset: 0;
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 100; font-family: monospace;
}

/* Title */
#menu-title-zone {
  color: #00e5ff;
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 8px;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(0,229,255,0.35);
  margin: 0;
}
#menu-title-protocol {
  color: #39ff14;
  font-size: 22px;
  letter-spacing: 12px;
  text-transform: uppercase;
  margin: 0 0 52px;
}

/* Shared button base */
.menu-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 340px; padding: 16px 32px;
  font-family: monospace; font-size: 15px;
  font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase;
  border-radius: 8px;
  cursor: pointer;
  margin: 6px 0;
  transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
}
.menu-action-btn:hover  { transform: translateY(-1px); }
.menu-action-btn:active { transform: translateY(1px); }

.menu-btn-primary {
  background: #00e5ff;
  color: #080b10;
  border: 2px solid #00e5ff;
  box-shadow: 0 0 24px rgba(0,229,255,0.25);
}
.menu-btn-primary:hover {
  background: #33eeff;
  box-shadow: 0 0 36px rgba(0,229,255,0.45);
}
.menu-btn-outline {
  background: transparent;
  color: #00e5ff;
  border: 2px solid rgba(0,229,255,0.5);
}
.menu-btn-outline:hover {
  border-color: #00e5ff;
  background: rgba(0,229,255,0.07);
}

/* ── Mode-select sub-panel ── */
#menu-mode-panel {
  display: flex; flex-direction: column; align-items: center;
}
.mode-panel-title {
  color: #00e5ff; font-size: 14px; letter-spacing: 5px;
  text-transform: uppercase; margin-bottom: 24px;
}
.mode-cards {
  display: flex; gap: 16px; margin-bottom: 28px;
}
.mode-card {
  width: 200px; padding: 24px 16px;
  border: 2px solid rgba(0,229,255,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  color: #b6cbd8;
}
.mode-card:hover {
  border-color: rgba(0,229,255,0.55);
  background: rgba(0,229,255,0.05);
  transform: translateY(-2px);
}
.mode-card.selected {
  border-color: #00e5ff;
  background: rgba(0,229,255,0.08);
  color: #fff;
}
.mode-card-icon {
  width: 42px; height: 42px; margin: 0 auto 10px;
  color: #9bb6c4;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.mode-card.selected .mode-card-icon { color: #00e5ff; }
.mode-icon-campaign::before,
.mode-icon-campaign::after {
  content: '';
  position: absolute;
  width: 7px; height: 36px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 14px rgba(0,229,255,0.18);
}
.mode-icon-campaign::before { transform: rotate(42deg); }
.mode-icon-campaign::after  { transform: rotate(-42deg); }
.mode-icon-survival::before {
  content: '';
  width: 28px; height: 28px;
  border: 3px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,0.25), 0 0 14px rgba(0,229,255,0.18);
}
.mode-icon-survival::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 18px; height: 6px;
  border-left: 3px solid currentColor;
  border-right: 3px solid currentColor;
}
.mode-card-name {
  font-size: 13px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: inherit; margin-bottom: 6px;
}
.mode-card.selected .mode-card-name { color: #00e5ff; }
.mode-card-desc { font-size: 11px; line-height: 1.5; }

/* Camera toggle */
.camera-toggle {
  display: flex; gap: 8px; margin-bottom: 28px;
}
.cam-btn {
  padding: 8px 20px;
  font-family: monospace; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase;
  border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,229,255,0.04); color: #9bb6c4;
  transition: all 0.15s;
}
.cam-btn.active {
  border-color: #39ff14;
  color: #39ff14;
  background: rgba(57,255,20,0.08);
}
.cam-btn:not(.active):hover {
  border-color: rgba(255,255,255,0.4);
  color: #d9f7ff;
}
.cam-icon-eye {
  display: inline-block;
  width: 16px; height: 10px;
  margin-right: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  vertical-align: -1px;
  position: relative;
}
.cam-icon-eye::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

/* Back / close link — sdílený styl napříč všemi panely */
.menu-back-btn {
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.35);
  border-radius: 8px;
  color: #9cefff; font-family: monospace;
  font-size: 12px; letter-spacing: 2px;
  cursor: pointer; margin-top: 12px;
  text-transform: uppercase;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  padding: 10px 16px;
}
.menu-back-btn:hover {
  color: #fff;
  background: rgba(0,229,255,0.14);
  border-color: rgba(0,229,255,0.65);
}
.menu-back-btn.danger {
  color: #ff7a86;
  background: rgba(255,23,68,0.08);
  border-color: rgba(255,90,110,0.45);
}
.menu-back-btn.danger:hover {
  color: #ffd4d8;
  background: rgba(255,23,68,0.16);
  border-color: rgba(255,120,135,0.75);
}

/* ── How to Play — fullscreen overlay ── */
#menu-howtoplay-panel {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,8,12,0.7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.htp-inner {
  display: flex; gap: 40px; align-items: flex-start;
  width: min(960px, calc(100vw - 80px));
}

/* Left column — title + controls */
.htp-left {
  flex: 0 0 260px;
  display: flex; flex-direction: column;
}
.htp-title {
  color: #fff; font-size: 28px; font-weight: 900; letter-spacing: 5px;
  text-transform: uppercase; margin: 0 0 4px;
  text-shadow: 0 0 40px rgba(0,229,255,0.3);
  line-height: 1;
}
.htp-subtitle {
  color: rgba(0,229,255,0.45); font-size: 10px; letter-spacing: 5px;
  text-transform: uppercase; margin-bottom: 32px;
}
.htp-divider {
  width: 36px; height: 2px;
  background: linear-gradient(90deg, #39ff14, transparent);
  margin-bottom: 24px;
}
.htp-grid {
  display: flex; flex-direction: column; gap: 6px;
}
.htp-grid-row {
  display: flex; align-items: center; gap: 12px;
}
.htp-key {
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-align: center; white-space: nowrap;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px; padding: 4px 0;
  min-width: 56px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
.htp-desc {
  color: rgba(255,255,255,0.55); font-size: 12px;
}
.htp-back-area {
  margin-top: 32px;
}

/* Right column — info cards */
.htp-right {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
}
.htp-card {
  padding: 18px 22px;
  border-left: 3px solid rgba(57,255,20,0.5);
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(0,229,255,0.02) 100%);
  border-radius: 0 8px 8px 0;
  transition: border-color 0.2s, background 0.2s;
}
.htp-card:hover {
  border-left-color: #39ff14;
  background: linear-gradient(135deg, rgba(57,255,20,0.04) 0%, rgba(0,229,255,0.03) 100%);
}
.htp-card-title {
  color: #39ff14; font-size: 10px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 8px;
}
.htp-card-body {
  color: rgba(255,255,255,0.6); font-size: 12px; line-height: 1.6;
  margin: 0;
}
.htp-card-body strong { color: #00e5ff; font-weight: 600; }
.htp-card-row {
  display: flex; gap: 10px;
}
.htp-card-row .htp-card {
  flex: 1;
}

@media (max-width: 800px) {
  .htp-inner {
    flex-direction: column; gap: 24px; align-items: stretch;
    width: calc(100vw - 48px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
  }
  .htp-left { flex: none; }
}

.menu-hidden { display: none !important; }

/* Continue button */
.menu-btn-continue {
  background: rgba(57,255,20,0.12);
  color: #39ff14;
  border: 2px solid rgba(57,255,20,0.5);
  box-shadow: 0 0 18px rgba(57,255,20,0.15);
}
.menu-btn-continue:hover {
  background: rgba(57,255,20,0.2);
  border-color: #39ff14;
  box-shadow: 0 0 28px rgba(57,255,20,0.3);
}
.menu-continue-info {
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0.7;
  font-weight: 400;
}
.menu-survival-best {
  color: #8aa3b8;
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 16px;
}
.menu-survival-best strong { color: #ffd600; }
