@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Nunito:wght@400;600;700;800&display=swap');

/* ═══════════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════════ */
:root {
  --bg:          #0d1a0f;
  --bg-deep:     #0d1a0f;
  --bg-mid:      #111f13;
  --bg-card:     #162119;
  --bg-card2:    #1c2b1f;
  --border:      #2a3d2d;
  --green-dim:   #3a6642;
  --green-main:  #5a9e6a;
  --green-bright:#7ecf8e;
  --amber:       #e8a832;
  --amber-dim:   #c4872a;
  --red:         #d45252;
  --red-dim:     #8b3030;
  --text-main:   #d4e8d6;
  --text-muted:  #7a9e80;
  --text-dim:    #4a6850;
  --pixel:       'Press Start 2P', monospace;
  --body:        'Nunito', sans-serif;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
}

body.error-page {
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

section {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  flex: 1; /* Push footer down */
}

/* Pixel noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(13,26,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 800;
  color: var(--green-bright);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links { display: flex; gap: 1.25rem; list-style: none; }

.nav-links a {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--green-bright); }

a.nav-map-disabled {
  opacity: 0.35 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  color: var(--text-dim) !important;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-bright);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(11,22,13,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 0;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}

.nav-drawer.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding-top: 0.5rem;
  padding-bottom: 1rem;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0s;
}

.nav-drawer a {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transform: translateX(-6px);
  opacity: 0;
  transition: color 0.2s, padding-left 0.2s, transform 0.25s ease, opacity 0.25s ease;
}

.nav-drawer.open a             { transform: translateX(0); opacity: 1; }
.nav-drawer.open a:nth-child(1){ transition-delay: 0.05s; }
.nav-drawer.open a:nth-child(2){ transition-delay: 0.10s; }
.nav-drawer.open a:nth-child(3){ transition-delay: 0.15s; }
.nav-drawer.open a:nth-child(4){ transition-delay: 0.20s; }
.nav-drawer.open a:nth-child(5){ transition-delay: 0.25s; }
.nav-drawer a:last-child        { border-bottom: none; }
.nav-drawer a:hover             { color: var(--green-bright); padding-left: 0.4rem; }

/* ═══════════════════════════════════════════════
   HERO (home)
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 6rem;
}

.hero-parallax {
  position: absolute;
  top: -40%; left: -5%; right: -5%; bottom: -40%;
  background-image: url('bg.webp');
  background-size: cover;
  background-position: center top;
  will-change: transform, filter;
  z-index: 0;
  filter: brightness(0.55) saturate(0.7) blur(0px);
  -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 100%);
  mask-image:         linear-gradient(to bottom, black 55%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90,158,106,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.hero-tag, .hero h1, .hero-sub, .ip-box { position: relative; z-index: 3; }

.hero-tag {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--green-main);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-family: var(--pixel);
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  color: var(--green-bright);
  line-height: 1.8;
  margin-bottom: 1rem;
  animation: fadeUp 0.6s 0.1s ease both;
  text-shadow: 0 0 40px rgba(126,207,142,0.3);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

/* IP toggle wrap */
.ip-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  animation: fadeUp 0.6s 0.3s ease both;
  position: relative;
  z-index: 3;
}

/* IP box */
.ip-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03);
}

.ip-label {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-dim);
  padding: 0 1rem;
  letter-spacing: 0.1em;
}

.ip-value {
  font-family: var(--pixel);
  font-size: 0.7rem;
  color: var(--amber);
  padding: 1rem 1.5rem;
  background: rgba(232,168,50,0.06);
  border-left: 1px solid var(--border);
  letter-spacing: 0.05em;
}

.ip-port {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--text-dim);
  padding: 0 1rem;
  border-left: 1px solid var(--border);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.copy-btn {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--bg-deep);
  background: var(--green-main);
  border: none;
  padding: 0 1.5rem;
  height: 100%;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-height: 52px;
}

.copy-btn:hover  { background: var(--green-bright); }
.copy-btn:active { transform: scale(0.97); }
.copy-btn.copied { background: var(--amber); }

/* Join guide button */
.join-guide-btn {
  position: relative;
  z-index: 3;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.55rem 1.25rem;
  background: var(--bg-card);
  transition: color 0.2s, border-color 0.2s;
  animation: fadeUp 0.6s 0.4s ease both;
}

.join-guide-btn:hover { color: var(--green-bright); border-color: var(--green-dim); }

/* ═══════════════════════════════════════════════
   STATUS STRIP (home)
═══════════════════════════════════════════════ */
.status-strip {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1.5rem 0;
  animation: fadeUp 0.6s 0.4s ease both;
}

.status-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.8rem;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  background: var(--green-bright);
  box-shadow: 0 0 10px var(--green-bright);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-dot.offline { background: var(--red); box-shadow: 0 0 10px var(--red); animation: none; }
.status-dot.loading { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.status-label { font-family: var(--pixel); font-size: 0.5rem; color: var(--text-dim); letter-spacing: 0.1em; }
.status-text  { font-weight: 800; font-size: 0.95rem; color: var(--text-main); }

.status-divider { width: 1px; height: 28px; background: var(--border); }

.player-count { font-family: var(--pixel); font-size: 1rem; color: var(--amber); }
.player-count span { font-family: var(--body); font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* ═══════════════════════════════════════════════
   SECTIONS & LAYOUT
═══════════════════════════════════════════════ */
section {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-label {
  font-family: var(--pixel);
  font-size: 0.65rem;
  color: var(--green-main);
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--pixel);
  font-size: clamp(0.9rem, 2.5vw, 1.3rem);
  color: var(--green-bright);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.section-sub { color: var(--text-muted); font-size: 1rem; margin-bottom: 3rem; max-width: 520px; }

.divider { border: none; border-top: 1px solid var(--border); max-width: 1000px; margin: 0 auto; }

/* ═══════════════════════════════════════════════
   FEATURE CARDS (home grid)
═══════════════════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-dim), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.feature-card:hover              { border-color: var(--green-dim); transform: translateY(-2px); }
.feature-card:hover::before      { opacity: 1; }
.feature-card:first-child::before{ opacity: 1; }

.feature-icon { font-size: 1.8rem; margin-bottom: 1rem; display: block; }

.feature-card h3 {
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  line-height: 1.8;
}

.feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

/* ═══════════════════════════════════════════════
   RULES LIST (home + rules page)
═══════════════════════════════════════════════ */
.rules-list { display: flex; flex-direction: column; gap: 0.85rem; }

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.15s;
}

.rule-item:hover { border-color: var(--green-dim); }

.rule-num {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--green-dim);
  flex-shrink: 0;
  padding-top: 0.1rem;
  min-width: 2rem;
}

.rule-text { font-size: 0.95rem; color: var(--text-main); font-weight: 600; }
.rule-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer {
  flex: 0;
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
}

footer .foot-logo {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--green-dim);
  margin-bottom: 0.5rem;
  display: block;
}

/* ═══════════════════════════════════════════════
   SHARED PAGE HERO (features / join / rules)
═══════════════════════════════════════════════ */
.page-hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-family: var(--pixel);
  font-size: clamp(1rem, 3vw, 1.6rem);
  color: var(--green-bright);
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

/* ═══════════════════════════════════════════════
   HOME — MAP LINK CARD
═══════════════════════════════════════════════ */
.map-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2.25rem 2.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
}

.map-link-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-dim), transparent);
}

.map-link-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 90% 100% at 100% 50%, black 20%, transparent 80%);
  pointer-events: none;
}

.map-link-card:hover { border-color: var(--green-dim); transform: translateY(-2px); }

.map-link-left { position: relative; z-index: 1; }

.map-link-eyebrow {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--green-main);
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--green-bright);
  box-shadow: 0 0 6px var(--green-bright);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

.map-live-dot.offline { background: var(--red); box-shadow: 0 0 6px var(--red); animation: none; }

.map-link-title {
  font-family: var(--pixel);
  font-size: clamp(0.65rem, 1.8vw, 0.85rem);
  color: var(--green-bright);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.map-link-desc { font-size: 0.9rem; color: var(--text-muted); max-width: 400px; line-height: 1.6; }

.map-link-arrow {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.map-link-arrow-icon { font-size: 2rem; line-height: 1; }

.map-link-cta {
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.map-link-card.map-disabled {
  cursor: not-allowed;
  pointer-events: none;
  background: #1a0a0a;
  border-color: #4a1a1a;
}

.map-link-card.map-disabled::before {
  background: linear-gradient(90deg, transparent, #6b2020, transparent);
}

/* ═══════════════════════════════════════════════
   FEATURES PAGE
═══════════════════════════════════════════════ */
.category-label {
  font-family: var(--pixel);
  font-size: clamp(0.85rem, 3vw, 1rem);
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

.big-feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}

.big-feature:hover { border-color: var(--green-dim); }
.big-feature-icon  { font-size: 2.5rem; }

.big-feature h3 {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.big-feature p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(90,158,106,0.15);
  color: var(--green-main);
  border: 1px solid var(--green-dim);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  margin-top: 0.75rem;
}

.tag.alternate { background: rgba(232,168,50,0.12); color: var(--amber); border-color: var(--amber-dim); }
.tag.broken    { background: rgba(212,82,82,0.12);  color: var(--red);   border-color: var(--red-dim); }

/* ═══════════════════════════════════════════════
   JOIN PAGE
═══════════════════════════════════════════════ */
.edition-tabs { display: flex; gap: 1rem; margin-bottom: 2.5rem; }

.tab-btn {
  font-family: var(--pixel);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 2;
}

.tab-btn.active              { background: var(--green-dim); border-color: var(--green-main); color: var(--green-bright); }
.tab-btn:hover:not(.active)  { border-color: var(--green-dim); color: var(--text-muted); }

.tab-panel        { display: none; }
.tab-panel.active { display: block; }

.steps { display: flex; flex-direction: column; gap: 1rem; }

.step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.15s;
}

.step:hover { border-color: var(--green-dim); }

.step-num {
  font-family: var(--pixel);
  font-size: 0.7rem;
  color: var(--green-bright);
  background: rgba(90,158,106,0.12);
  border: 1px solid var(--green-dim);
  border-radius: 6px;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title { font-size: 1rem; font-weight: 800; color: var(--text-main); margin-bottom: 0.3rem; }
.step-desc  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

.chip {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.55rem;
  color: var(--amber);
  background: rgba(232,168,50,0.08);
  border: 1px solid rgba(232,168,50,0.25);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin: 0 0.15rem;
}

.chip.green { color: var(--green-bright); background: rgba(90,158,106,0.1); border-color: rgba(90,158,106,0.25); }

.note {
  margin-top: 2rem;
  padding: 1.1rem 1.5rem;
  background: rgba(90,158,106,0.07);
  border: 1px solid var(--green-dim);
  border-left: 3px solid var(--green-main);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.note strong { color: var(--green-bright); }

.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--green-bright);
  text-decoration: none;
  transition: opacity 0.15s;
}

.dl-link:hover { opacity: 0.75; }

/* ═══════════════════════════════════════════════
   RULES PAGE
═══════════════════════════════════════════════ */
.severity {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  margin-top: 0.6rem;
}

.sev-warn { background: rgba(232,168,50,0.15); color: var(--amber); border: 1px solid var(--amber-dim); }
.sev-ban  { background: rgba(212,82,82,0.15);  color: var(--red);   border: 1px solid var(--red-dim); }

.rule-category {
  font-family: var(--pixel);
  font-size: 0.5rem;
  color: var(--amber);
  letter-spacing: 0.15em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.preamble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-main);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   MAP PAGE
═══════════════════════════════════════════════ */
.map-container { position: relative; flex: 1; overflow: hidden; }

.map-container iframe {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  border: none;
  display: block;
}

.map-offline-overlay {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  background: var(--bg);
}

.map-offline-overlay.visible { display: flex; }

.map-offline-icon  { font-size: 2.5rem; line-height: 1; opacity: 0.5; }

.map-offline-title {
  font-family: var(--pixel);
  font-size: clamp(0.6rem, 2vw, 0.85rem);
  color: var(--text-dim);
  letter-spacing: 0.15em;
}

.map-offline-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 340px;
  line-height: 1.6;
}

.map-offline-back {
  margin-top: 0.5rem;
  font-family: var(--pixel);
  font-size: 0.45rem;
  color: var(--green-bright);
  letter-spacing: 0.12em;
  text-decoration: none;
}

.map-offline-back:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════
   404 PAGE
═══════════════════════════════════════════════ */
body.error-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(30,60,35,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(10,20,12,0.8) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.particles { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: #3a6642;
  opacity: 0;
  animation: drift linear infinite;
}

.error-box {
  border: 2px solid var(--red);
  border-radius: 8px;
  padding: 2.5rem 4rem;
  margin: 3rem;
  text-align: center;
  animation: pulse-box 2s ease-in-out infinite;
  background: rgba(212,82,82,0.05);
  box-shadow: 0 0 12px rgba(212,82,82,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  z-index: 2;
}

.error-box .code {
  font-family: var(--pixel);
  font-size: clamp(3rem, 12vw, 6rem);
  color: var(--red);
  line-height: 1;
  text-shadow: 0 0 40px rgba(212,82,82,0.6), 0 0 80px rgba(212,82,82,0.2);
}

.error-message {
  font-family: var(--pixel);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  line-height: 2;
  text-align: center;
  position: relative;
  z-index: 2;
}

.error-sub {
  font-size: 1rem;
  color: var(--text-dim);
  text-align: center;
  position: relative;
  z-index: 2;
}

.home-btn {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--bg-deep);
  background: var(--green-main);
  border: none;
  border-radius: 6px;
  padding: 0.75rem 2rem;
  margin: 3rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(90,158,106,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
  position: relative;
  z-index: 2;
}

.home-btn:hover  { background: var(--green-bright); }
.home-btn:active { transform: scale(0.97); }

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@keyframes drift {
  0%   { transform: translateY(100vh) translateX(0);    opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-10vh) translateX(20px); opacity: 0; }
}

@keyframes pulse-box {
  0%, 100% {
    box-shadow: 0 0 12px rgba(212,82,82,0.2), inset 0 0 12px rgba(212,82,82,0.03), inset 0 1px 0 rgba(255,255,255,0.04);
    border-color: var(--red);
  }
  50% {
    box-shadow: 0 0 50px rgba(212,82,82,0.45), inset 0 0 30px rgba(212,82,82,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
    border-color: #ff6b6b;
  }
}

/* ═══════════════════════════════════════════════
   SCROLL REVEAL & STAGGER
═══════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children reveal */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.stagger-reveal.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger-reveal.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-reveal.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-reveal.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-reveal.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-reveal.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-reveal.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger-reveal.visible > *:nth-child(7) { transition-delay: 0.47s; }
.stagger-reveal.visible > *:nth-child(8) { transition-delay: 0.54s; }

/* ═══════════════════════════════════════════════
   CONTACT PAGE
═══════════════════════════════════════════════ */
.contact-info {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.info-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.info-icon { font-size: 2rem; margin-bottom: 1rem; display: block; }
.info-title { font-family: var(--pixel); font-size: 0.6rem; color: var(--amber); margin-bottom: 0.75rem; letter-spacing: 0.05em; }
.info-text { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; }

/* ═══════════════════════════════════════════════
   FOOTER ENHANCEMENTS
═══════════════════════════════════════════════ */
.foot-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.foot-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.foot-link:hover { color: var(--green-bright); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  .hero { padding: 5rem 1.25rem 4rem; }
  .hero-sub { font-size: 0.95rem; margin-bottom: 2rem; }

  .ip-box { flex-direction: column; width: 100%; max-width: 340px; }
  .ip-label { padding: 0.75rem 1rem 0; }
  .ip-value { border-left: none; border-top: 1px solid var(--border); text-align: center; width: 100%; }
  .copy-btn { width: 100%; min-height: 44px; border-top: 1px solid rgba(0,0,0,0.2); }

  .status-strip { padding: 1rem 1.25rem 0; }
  .status-card  { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .status-divider { display: none; }

  section { padding: 3rem 1.25rem; }

  .features-grid { grid-template-columns: 1fr; }

  .rule-item { gap: 1rem; padding: 1rem 1.1rem; }

  .join-guide-btn { font-size: 0.8rem; }

  .map-link-card { flex-direction: column; align-items: flex-start; padding: 1.5rem; gap: 1.25rem; }
  .map-link-arrow { flex-direction: row; }
}

@media (max-width: 500px) {
  .big-feature { grid-template-columns: 1fr; gap: 1rem; padding: 1.5rem; }
  .big-feature-icon { font-size: 2rem; }
  .category-label { font-size: 0.85rem; }

  .edition-tabs { flex-direction: column; }
  .tab-btn { text-align: center; }
  .step { grid-template-columns: 1fr; }
  .step-num { width: 40px; height: 40px; font-size: 0.6rem; }
  .chip { font-size: 0.45rem; }
}

@media (max-width: 400px) {
  .nav-logo { font-size: 0.8rem; letter-spacing: 0.04em; }
  .hero h1  { font-size: clamp(1rem, 6vw, 1.4rem); }
  .hero-tag { font-size: 0.45rem; }
  .ip-value { font-size: 0.6rem; padding: 0.9rem 1rem; }
  .section-title { font-size: clamp(0.75rem, 4vw, 1rem); }
}

