@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;
  --haze: #64798e;
  --teal: #017fa4;
  --teal-bright: #3fb3d6;
  --teal-dark: #105f66;
  --mint: #6ccdb8;
  --gold: #f1b435;
  --font-sans: 'Lato', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.04) 2px, rgba(255,255,255,0.04) 3px),
    var(--navy) url('/img/map.png') center center / contain no-repeat;
  opacity: 0.22;
  pointer-events: none;
}

body::after {
  content: none;
}

#header {
  background: rgba(7, 24, 41, 0.92);
  backdrop-filter: blur(12px);
  color: var(--fog);
  padding: 1.25rem 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: none;
  position: relative;
  z-index: 1;
}

#logo-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

#logo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  object-fit: contain;
  filter: none;
  background: transparent;
  border-radius: 6px;
  margin: 0;
}

#title {
  font-size: 1.35rem;
  font-family: var(--font-sans);
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: none;
  margin: 0;
  line-height: 1.2;
  text-align: center;
  white-space: pre-line;
}

#title .accent {
  color: var(--teal-bright);
}

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

@media (max-width: 700px) {
  #logo-title {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  #title {
    font-size: 1.15rem;
    text-align: center;
  }
}

#main-body {
  max-width: 1200px;
  margin: 2rem auto;
  z-index: 1;
  position: relative;
  background: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem;
}

#instructions {
  background: var(--navy-card);
  color: var(--fog);
  border: 1px solid rgba(63, 179, 214, 0.25);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: none;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-family: var(--font-sans);
}

#instructions .icon {
  font-size: 1.5rem;
  color: var(--teal-bright);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  justify-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.challenge-card {
  background: var(--navy-card);
  border-radius: 8px;
  box-shadow: none;
  color: var(--fog);
  width: 100%;
  max-width: 280px;
  min-height: 200px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  cursor: pointer;
  border: 1px solid rgba(63, 179, 214, 0.3);
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  font-family: var(--font-sans);
}
.challenge-card:hover {
  transform: translateY(-4px);
  box-shadow: none;
  background: rgba(1, 127, 164, 0.18);
  border-color: var(--teal-bright);
  color: var(--fog);
}
.challenge-card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  box-shadow: none;
}
.challenge-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  box-shadow: none;
  background: var(--navy-deep);
  border: 1px solid rgba(255,255,255,0.06);
}
.challenge-card h4 {
  margin: 0.4rem 0 0.2rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--teal-bright);
  text-shadow: none;
}
.challenge-card p {
  font-size: 0.95rem;
  color: var(--mist);
  margin: 0.25rem 0 0 0;
}

@media (max-width: 1100px) {
  #main-body {
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem 0.75rem;
    min-height: unset;
  }
  #instructions {
    max-width: 98vw;
    width: 98vw;
    margin: 0 auto;
    padding: 1rem;
    font-size: 0.95rem;
  }
  .cards {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 1rem;
  }
  .challenge-card {
    width: 98vw;
    max-width: none;
    min-width: 0;
    font-size: 1rem;
  }
}

#main-body h4#chall-title, .chall-select h4#chall-title {
  display: none !important;
}

body, h1, h2, h3, h4, h5, h6, p, ul, li, div, span, button, input, textarea {
  font-family: var(--font-sans);
}
