:root {
  --text: #e0e6f1;
  --muted: #c7ccd1;
  --accent-1: #9b264b;
  --accent-2: #23b0cf;
  --surface: #1f1f23;
  --ring: rgba(255,255,255,.20);
  --btn-br: rgba(0,0,0,.15);
  --btn-br2: rgba(0,0,0,.35);
  --page-max: 1600px;
  --page-pad: clamp(16px, 3vw, 48px);
}

* { box-sizing: border-box }

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  background-color: #1a1a1a;
  color: var(--text);
  font: 16px/1.45 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

main { flex: 1; }

.user-only { display: none; }

.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
  box-sizing: border-box;
}

.section { padding-block: 2rem; }

.section-title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 1px 0 rgba(0,0,0,.25);
  isolation: isolate;
}

.topbar .nav {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 2vw, 2rem);
}

.nav {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-block;
  padding: 8px 10px;
  margin-right: 10px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  border-radius: 8px;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--btn-br);
}

.nav-item { position: relative }

.nav-link {
  display: inline-block;
  padding: 8px 12px;
  color: #fff;
  text-decoration: none;
  background: rgba(0,0,0,.18);
  border: 1px solid var(--btn-br);
  border-radius: 8px;
  backdrop-filter: saturate(120%) blur(.5px);
}

.nav-link:hover { outline: 2px solid var(--ring) }

.has-menu .menu {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  padding: 8px;
  display: none;
  background: #141418;
  border: 1px solid var(--btn-br2);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.has-menu:hover .menu { display: block }

.menu a {
  display: block;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}

.menu a:hover { background: #1f1f23 }

.btn {
  display: inline-block;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid var(--btn-br2);
  background: #00000066;
}

.btn:hover { outline: 2px solid var(--ring) }

.btn.outline {
  background: transparent;
  border: 1px solid #ffffff55;
}

.btn.lg { padding: 14px 18px; font-size: 18px }

.hero {
  position: relative;
  min-height: 60vh;
  display: grid;
  align-items: center;
  overflow: clip;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.75)),
    url("images/heroes-bg.png") center/cover no-repeat;
  color: #fff;
  padding: 6rem 0 8rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.hero-inner { position: relative; }

.hero-title { margin: 0 0 8px; font-size: 44px; letter-spacing: .5px }

.hero-sub { margin: 0 0 18px; color: var(--muted) }

.hero p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: rgba(255,255,255,.85);
}

.hero-cta, .hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.grid2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--btn-br2);
  border-radius: 14px;
  overflow: hidden;
}

.card-media {
  height: 160px;
  background: linear-gradient(90deg, #3b3b40, #2b2b31);
}

.card-body { padding: 14px }

.card-title { margin: 0 0 8px; font-size: 20px }

.card-link {
  display: inline-block;
  margin-top: 6px;
  color: #9cdcff;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.card-link:hover { text-decoration: underline }

.footer {
  padding: 20px 0;
  border-top: 1px solid #00000055;
  background: #17171b;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links { display: flex; gap: 14px }

.footer-links a { color: var(--muted); text-decoration: none }

.footer-links a:hover { color: #fff }

.copy { margin: 0; color: var(--muted) }

.map-preview { text-align: center; margin-top: 1.5rem; }

.map-preview img {
  max-width: 80%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  transition: transform .3s ease, box-shadow .3s ease;
}

.map-preview img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 25px rgba(0,0,0,.6);
}

.caption {
  color: #aaa;
  font-size: .9rem;
  margin-top: .5rem;
}

.warbar { margin-top: 2.5rem; }

.warbar-tagline {
  text-align: center;
  font-size: .95rem;
  color: rgba(255,255,255,.75);
  margin-bottom: .75rem;
}

.warbar-wrap {
  position: relative;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
  box-sizing: border-box;
  --red: 50%;
  --blue: calc(100% - var(--red));
}

.warbar-bar {
  height: 28px;
  border-radius: 12px;
  background: linear-gradient(90deg,
    #e30d0d 0%,
    #e30d0d var(--red),
    #17d7ea var(--red),
    #17d7ea 100%);
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.35),
    0 6px 18px rgba(0,0,0,.25);
}

.warbar-pop {
  position: absolute;
  left: var(--red);
  top: 0;
  transform: translate(-50%, -40%);
  background: #0f1318;
  color: #e8eef6;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: .35rem .6rem;
  font-size: .8rem;
  line-height: 1;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.warbar-pop::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #0f1318;
  border-left: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  transform-origin: center;
  rotate: 45deg;
}

.warbar-pop .warbar-pop-text { white-space: nowrap; }

.warbar-wrap:hover .warbar-pop,
.warbar-wrap:focus-within .warbar-pop {
  opacity: 1;
  transform: translate(-50%, -80%);
}

.post-wrap { max-width: 900px; margin-inline: auto; }

.post-meta { color: rgba(255,255,255,.65); margin: .5rem 0 1.25rem; }

.post-body > p { margin: .75rem 0 1rem; }

.auth {
  display: grid;
  place-items: start center;
  padding-block: clamp(32px, 8vh, 96px);
}

.auth-card {
  width: min(520px, 100%);
  background: var(--surface);
  border: 1px solid var(--btn-br2);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.auth-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: .3px;
}

.auth-form { display: grid; gap: 14px; }

.auth-form label { display: grid; gap: 6px; font-size: .95rem; color: var(--muted); }

.auth-form input {
  appearance: none;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--btn-br);
  background: #00000066;
  color: var(--text);
  outline: none;
}

.auth-form input:focus { outline: 2px solid var(--ring); }

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.auth-alert {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 120, 120, .25);
  background: rgba(255, 60, 60, .08);
  color: #ffbcbc;
  font-size: .95rem;
}

.auth-link {
  color: #9cdcff;
  text-decoration: none;
  font-size: .95rem;
}

.auth-link:hover { text-decoration: underline; }

@media (max-width: 960px) {
  .grid3 { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .hero-title { font-size: 34px }
  .nav-left { gap: 6px }
  .brand { display: none }
}

@media (max-width: 640px) {
  .warbar-bar { height: 22px; }
  .warbar-pop { font-size: .75rem; }
}
