@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Geist+Mono:wght@400;600;700&display=swap');

:root {
  --navy: #0d294a;
  --navy-card: #0a2038;
  --navy-deep: #071829;
  --fog: #d4dbe3;
  --mist: #94a7ba;
  --teal: #017fa4;
  --teal-bright: #3fb3d6;
  --font-sans: 'Lato', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body {
  background: var(--navy-deep);
  color: var(--fog);
  font-family: var(--font-sans);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
}

#hud {
  font-size: 1rem;
  position: absolute;
  z-index: 2;
  padding: 1rem 1.25rem;
  max-width: 480px;
  min-width: 280px;
  height: auto;
  background: rgba(7, 24, 41, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  top: 16px;
  left: 16px;
  box-shadow: none;
  border: 1px solid rgba(63, 179, 214, 0.35);
  color: var(--fog);
  text-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#hud a {
  align-self: center;
  text-align: center;
  color: var(--teal-bright) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  transition: color 0.15s;
}
#hud a:hover {
  color: var(--mint, #6ccdb8) !important;
}

.hud-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-align: center;
}

.hud-logo {
  height: 40px;
  width: auto;
  border-radius: 6px;
  flex-shrink: 0;
}

#chall-title {
  color: #fff;
  margin: 0;
  padding: 0;
  font-size: 1.25rem;
  font-family: var(--font-mono);
  font-weight: 700;
  text-shadow: none;
  text-align: center;
}

#chall-result {
  margin: 0;
  padding: 0;
  min-height: 0;
}

#chall-result.result {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid transparent;
  animation: result-in 280ms ease-out;
}

#chall-result.result--hit {
  background: rgba(1, 127, 164, 0.18);
  border: 1px solid rgba(63, 179, 214, 0.45);
  border-left-width: 3px;
  border-left-color: var(--teal-bright);
}

#chall-result.result--miss {
  background: rgba(148, 167, 186, 0.08);
  border: 1px solid rgba(148, 167, 186, 0.28);
  border-left-width: 3px;
  border-left-color: var(--mist);
}

.result-label {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.result--hit .result-label {
  color: var(--teal-bright);
}

.result-flag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  background: rgba(7, 24, 41, 0.85);
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(63, 179, 214, 0.35);
  word-break: break-all;
  user-select: all;
}

.result-hint {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--mist);
}

@keyframes result-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#pano {
  position: absolute;
  left: 0;
  top: 0;
  height: 100vh;
  width: 70vw;
  border-radius: 0;
  box-shadow: none;
  background: var(--navy-deep);
  overflow: hidden;
  z-index: 1;
  border-right: 1px solid rgba(255,255,255,0.06);
}

#outer-map {
  position: absolute;
  right: 0;
  top: 0;
  height: 100vh;
  width: 30vw;
  background: var(--navy);
  border-radius: 0;
  box-shadow: none;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

#map-box {
  width: 90%;
  margin: 0 auto 1.5rem auto;
  background: var(--navy-card);
  border-radius: 8px;
  border: 1px solid rgba(63, 179, 214, 0.25);
  box-shadow: none;
  padding: 0.75rem 0.5rem 0.5rem 0.5rem;
  position: relative;
}

#map {
  z-index: 2;
  height: 300px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--teal);
  box-shadow: none;
}

#submit {
  position: relative;
  font-size: 0.95rem;
  margin-top: 0.75rem;
  background: var(--teal);
  color: #fff;
  z-index: 3;
  width: 100%;
  height: 40px;
  border-radius: 6px;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  box-shadow: none;
  letter-spacing: 0;
  transition: background 0.15s;
  cursor: pointer;
}
#submit:hover {
  background: rgba(1, 127, 164, 0.85);
  color: #fff;
  box-shadow: none;
}

.cyber-title {
  font-size: 1.5rem;
  color: #fff;
  text-shadow: none;
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
  margin-top: 0.2em;
  margin-bottom: 0.4em;
  font-weight: 900;
  background: none;
  -webkit-text-fill-color: unset;
  filter: none;
  text-align: center;
}

@media (max-width: 900px) {
  #pano {
    width: 100vw;
    height: 60vh;
    border-radius: 0;
    position: relative;
    border-right: none;
  }
  #outer-map {
    width: 100vw;
    height: 40vh;
    border-radius: 0;
    position: relative;
    top: 60vh;
    left: 0;
  }
  #hud {
    position: static;
    margin: 1rem auto;
    left: 0;
    top: 0;
  }
}
