﻿* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #091016;
  color: #e8eef5;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
}

canvas {
  display: block;
}

.hidden {
  display: none !important;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(7, 13, 18, 0.82), rgba(7, 13, 18, 0.55));
  backdrop-filter: blur(5px);
}

.menu h1 {
  margin: 0;
  font-size: clamp(28px, 4.4vw, 44px);
  letter-spacing: 0.3px;
}

.subtitle {
  margin: 0 0 8px 0;
  color: #c7d2de;
  text-align: center;
  max-width: 760px;
}

.route-list {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.route-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(13, 20, 27, 0.78);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.route-card h3 {
  margin: 0;
  font-size: 18px;
}

.route-card p {
  margin: 0;
  color: #c4d1dd;
  min-height: 48px;
  font-size: 14px;
}

.route-card button {
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  color: #0c1117;
  background: #71f0c2;
}

.route-card button:hover {
  filter: brightness(1.06);
}

.hud {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 14;
  width: min(520px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 16, 0.62);
  backdrop-filter: blur(5px);
  line-height: 1.42;
}

.title {
  font-size: 20px;
  font-weight: 700;
}

.hint {
  margin-top: 4px;
  color: #c6d0dc;
  font-size: 13px;
}

#speed {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

#status {
  margin-top: 2px;
  color: #9de8bf;
  font-size: 13px;
}

#back-to-menu {
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  background: #ffd26e;
  color: #20242b;
}

@media (max-width: 640px) {
  .menu {
    justify-content: flex-start;
    padding-top: 48px;
  }

  .route-card p {
    min-height: 0;
  }
}
