:root {
  --mds-blue: #0057ff;
  --mds-blue-2: #2f6dff;
  --mds-black: #07090f;
  --mds-ink: #10131a;
  --mds-muted: #667085;
  --mds-white: #ffffff;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Montserrat", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--mds-ink);
  background: var(--mds-black);
}
.hidden { display: none !important; }

.screen {
  min-height: 100dvh;
  padding: 1.25rem;
  position: relative;
}

.hero-screen {
  display: grid;
  place-items: end stretch;
  padding: 0;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 9, 15, 0.15) 0%, rgba(7, 9, 15, 0.72) 55%, rgba(7, 9, 15, 0.96) 100%),
    radial-gradient(120% 80% at 70% 0%, #0057ff 0%, transparent 55%),
    linear-gradient(145deg, #0a1228, #05070d 60%, #0b1a44);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 70%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.4rem 2.4rem;
  color: #fff;
  animation: rise 0.7s ease both;
}
.brand, .brand-mini {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #8eb6ff;
  margin: 0;
}
.brand { font-size: clamp(2rem, 8vw, 3rem); line-height: 1; margin-bottom: 0.6rem; }
.hero-content h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 2.2rem);
  font-weight: 500;
}
.lead { margin: 0 0 1.5rem; color: #c7d2e5; max-width: 28ch; }

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.login-form label { font-size: 0.85rem; font-weight: 600; color: #9db0d4; }
.login-form input {
  font: inherit;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: rgba(255,255,255,0.1);
  color: #fff;
  outline: 2px solid transparent;
}
.login-form input:focus { outline-color: var(--mds-blue); }
.login-form button, .btn-primary, .btn-secondary, .file-btn {
  font: inherit;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-weight: 700;
  cursor: pointer;
}
.login-form button, .btn-primary {
  background: var(--mds-blue);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 87, 255, 0.35);
}
.btn-secondary, .file-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.brand-mini { color: var(--mds-blue-2); font-size: 1rem; }
.team-pill {
  background: rgba(0, 87, 255, 0.15);
  color: #dbe7ff;
  border: 1px solid rgba(0, 87, 255, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

#screen-waiting,
#screen-navigate,
#screen-photo,
#screen-quiz,
#screen-finished {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(0, 87, 255, 0.28), transparent 50%),
    linear-gradient(165deg, #0a1020, #07090f 55%, #0d152b);
  color: #fff;
}

.center-card {
  margin-top: 15vh;
  text-align: center;
  animation: rise 0.6s ease both;
}
.center-card h2 { font-family: var(--font-display); }
.center-card p { color: #b7c3da; max-width: 32ch; margin-inline: auto; }
.pulse {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.2rem;
  border-radius: 50%;
  background: var(--mds-blue);
  animation: pulse 1.6s ease-in-out infinite;
}

.nav-layout, .photo-layout, .quiz-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: rise 0.5s ease both;
}
.clue-label, .distance-label { margin: 0; color: #8ea0c2; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; }
#clue-text { margin: 0; font-family: var(--font-display); font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.25; }
.distance-block {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.distance-value {
  margin: 0.2rem 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 12vw, 4rem);
  font-weight: 700;
  color: #7eafff;
}
.hint { color: #8b9bb8; font-size: 0.88rem; }
.error { color: #ff8d85; font-size: 0.9rem; }

.photo-preview-wrap {
  aspect-ratio: 3/4;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.photo-preview-wrap video,
.photo-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.choices { display: flex; flex-direction: column; gap: 0.7rem; }
.choices button {
  text-align: left;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.choices button:hover { background: rgba(0, 87, 255, 0.35); transform: translateY(-1px); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(0, 87, 255, 0.55); }
  50% { transform: scale(1); box-shadow: 0 0 0 18px rgba(0, 87, 255, 0); }
}

@media (min-width: 768px) {
  .hero-content { padding: 3rem 4rem 3.5rem; max-width: 560px; }
  .nav-layout, .photo-layout, .quiz-layout, .center-card { max-width: 560px; margin-inline: auto; }
}
