/* ═══════════ BASE ═══════════ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-1: #a8d77a;
  --green-2: #8fbc6a;
  --green-3: #6e9c4e;
  --green-dark: #2f4a1e;
  --brown-1: #8b5a2b;
  --brown-2: #6b4423;
  --brown-3: #3e2712;
  --gold: #ffc94a;
  --gold-dark: #c79a2b;
  --red: #c0392b;
  --shadow: rgba(0,0,0,.35);
  --pixel-border: #2a2a2a;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
  background-color: var(--green-2);
  background-image: url('img/grass.png');
  background-size: 64px;
  background-repeat: repeat;
  color: #1a2412;
  line-height: 1.65;
  font-size: 17px;
  overflow-x: hidden;
  image-rendering: pixelated;
  -webkit-font-smoothing: antialiased;
}

img { image-rendering: pixelated; max-width: 100%; }

code {
  font-family: 'Rubik', monospace;
  font-weight: 600;
  font-size: .92em;
  background: #1a2412;
  color: var(--gold);
  padding: 3px 9px;
  border-radius: 4px;
  border: 2px solid #000;
  display: inline-block;
  line-height: 1.4;
  letter-spacing: .3px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ═══════════ HERO ═══════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background-image: url('img/bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  image-rendering: pixelated;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.4) 50%, rgba(0,0,0,.8) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(0,0,0,.7);
  border: 3px solid var(--gold);
  color: var(--gold);
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 3px;
  margin-bottom: 28px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.5);
  text-transform: uppercase;
}

.hero-title {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 12vw, 140px);
  color: #fff;
  letter-spacing: 6px;
  line-height: 1;
  text-shadow:
    4px 4px 0 #000,
    8px 8px 0 rgba(0,0,0,.35),
    0 0 60px rgba(255,201,74,.55);
  margin-bottom: 14px;
  animation: titleFloat 4s ease-in-out infinite;
}

@keyframes titleFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-sub {
  color: #f0f0f0;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 34px;
  text-shadow: 2px 2px 4px rgba(0,0,0,.9);
}

.hero-ip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,.75);
  border: 4px solid #000;
  padding: 12px 22px;
  margin-bottom: 34px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
  flex-wrap: wrap;
  justify-content: center;
}

.ip-label {
  color: var(--gold);
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 2px;
}
.ip-value {
  color: #fff;
  font-family: 'Rubik', monospace;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
}

.ip-copy {
  background: var(--gold);
  border: 3px solid #000;
  width: 38px; height: 38px;
  cursor: pointer;
  font-size: 16px;
  transition: transform .1s;
  box-shadow: 3px 3px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ip-copy:hover { background: #ffdc7a; }
.ip-copy:active { transform: translate(3px,3px); box-shadow: 0 0 0 #000; }

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 16px 32px;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  text-decoration: none;
  color: #000;
  border: 4px solid #000;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  text-align: center;
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);
  user-select: none;
}
.btn:active { transform: translate(6px,6px); box-shadow: 0 0 0 rgba(0,0,0,.5); }

.btn-primary { background: var(--green-1); }
.btn-primary:hover { background: #b8e58a; }

.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #ffdc7a; }

.scroll-hint {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 32px;
  text-decoration: none;
  animation: bounce 1.6s infinite;
  z-index: 2;
  text-shadow: 2px 2px 0 #000;
}
@keyframes bounce {
  0%,100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ═══════════ NAV ═══════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brown-2);
  background-image: url('img/dirt.png');
  background-size: 48px;
  border-bottom: 4px solid #000;
  box-shadow: 0 4px 0 rgba(0,0,0,.2);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 3px;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 9px 15px;
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  font-size: 15px;
  border: 3px solid transparent;
  transition: all .15s;
  text-shadow: 1px 1px 0 rgba(0,0,0,.6);
  border-radius: 3px;
}

.nav-links a:hover {
  background: rgba(0,0,0,.4);
  border-color: var(--gold);
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: var(--gold);
  border: 3px solid #000;
  width: 44px; height: 44px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  color: #000;
}

/* ═══════════ SECTIONS ═══════════ */
.section {
  padding: 80px 0;
  position: relative;
}
.section-alt {
  background: rgba(255,255,255,.3);
  border-top: 4px solid rgba(0,0,0,.15);
  border-bottom: 4px solid rgba(0,0,0,.15);
}

.section-title {
  text-align: center;
  margin-bottom: 8px;
}
.section-title span {
  display: inline-block;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 4vw, 36px);
  color: #fff;
  background: var(--green-dark);
  padding: 18px 32px;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 rgba(0,0,0,.4);
  letter-spacing: 3px;
  text-shadow: 3px 3px 0 #000;
}

.section-sub {
  text-align: center;
  margin: 24px auto 48px;
  font-size: 18px;
  font-weight: 500;
  max-width: 720px;
  color: #223015;
  text-shadow: 1px 1px 0 rgba(255,255,255,.4);
  line-height: 1.6;
}

/* ═══════════ STATS ═══════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: #fff;
  border: 4px solid #000;
  padding: 22px 14px;
  text-align: center;
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
  transition: transform .2s;
}
.stat-card:hover { transform: translateY(-4px); }

.stat-icon { font-size: 42px; margin-bottom: 10px; }
.stat-num {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 34px;
  color: var(--green-dark);
  margin-bottom: 6px;
  line-height: 1;
}
.stat-label { font-size: 15px; color: #555; font-weight: 500; }

/* ═══════════ INFO ═══════════ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background: #fff;
  border: 4px solid #000;
  padding: 26px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
  transition: transform .2s, box-shadow .2s;
}
.info-card:hover {
  transform: translate(-2px,-2px);
  box-shadow: 10px 10px 0 rgba(0,0,0,.4);
}
.info-card h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--green-dark);
  letter-spacing: .5px;
}
.info-card p { font-size: 16px; color: #333; line-height: 1.6; }

/* ═══════════ START STEPS ═══════════ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.step {
  background: #fff;
  border: 4px solid #000;
  padding: 32px 22px 24px;
  position: relative;
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
}

.step-num {
  position: absolute;
  top: -24px; left: 20px;
  width: 52px; height: 52px;
  background: var(--gold);
  border: 4px solid #000;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 rgba(0,0,0,.4);
  color: #000;
}

.step h3 {
  margin: 8px 0 12px;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--green-dark);
}
.step p { font-size: 16px; line-height: 1.6; }

.ip-box, .cmd-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1a2412;
  border: 3px solid #000;
  padding: 12px 14px;
  margin: 12px 0;
  color: var(--gold);
  font-family: 'Rubik', monospace;
  font-weight: 700;
  font-size: 17px;
  word-break: break-all;
  letter-spacing: .5px;
}
.ip-box code, .cmd-box code {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font-size: 17px;
}
.ip-box .ip-copy { margin-left: auto; }

/* ═══════════ NEXT STEPS ═══════════ */
.next-steps {
  background: #fff;
  border: 4px solid #000;
  padding: 34px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.4);
}
.next-steps h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 18px;
  color: var(--green-dark);
}
.next-steps ol { padding-left: 24px; margin-bottom: 24px; }
.next-steps ol li { margin-bottom: 10px; font-size: 17px; line-height: 1.55; }

.cmd-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cmd-chip {
  background: var(--green-1);
  border: 3px solid #000;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 3px 3px 0 rgba(0,0,0,.4);
  border-radius: 3px;
}
.cmd-chip code {
  background: none;
  border: none;
  padding: 0;
  color: #1a2412;
  font-size: 15px;
  font-weight: 700;
}

/* ═══════════ STORY ═══════════ */
.spoiler-warning {
  background: #ffefc0;
  border: 4px solid #b8860b;
  padding: 18px 24px;
  margin-bottom: 32px;
  font-size: 17px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.3);
  line-height: 1.6;
  border-radius: 3px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.story-btn {
  position: relative;
  background: #fff;
  border: 4px solid #000;
  padding: 22px 12px 18px;
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #1a2412;
  box-shadow: 5px 5px 0 rgba(0,0,0,.4);
  transition: transform .15s, background .2s, box-shadow .15s;
  text-align: center;
  line-height: 1.35;
  border-radius: 3px;
}
.story-btn:hover {
  background: var(--gold);
  transform: translate(-2px,-2px);
  box-shadow: 8px 8px 0 rgba(0,0,0,.4);
}
.story-btn .story-num {
  display: block;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--green-dark);
  margin-bottom: 8px;
  line-height: 1;
}

/* ═══════════ CLASSES ═══════════ */
.class-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.class-card {
  background: #fff;
  border: 4px solid #000;
  padding: 14px;
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0,0,0,.4);
  transition: transform .15s, box-shadow .15s;
  text-align: center;
  border-radius: 3px;
}
.class-card:hover {
  transform: translate(-3px,-3px);
  box-shadow: 10px 10px 0 rgba(0,0,0,.4);
}
.class-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 3px solid #000;
  margin-bottom: 12px;
  background: var(--green-1);
  display: block;
}
.class-card h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #1a2412;
  letter-spacing: 1px;
}

.class-note {
  margin-top: 32px;
  padding: 18px 24px;
  background: #ffe4e4;
  border: 4px solid var(--red);
  font-size: 16px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.3);
  line-height: 1.6;
  border-radius: 3px;
}

/* ═══════════ TABS ═══════════ */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}
.tab {
  background: #fff;
  border: 4px solid #000;
  padding: 11px 20px;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0,0,0,.4);
  transition: all .15s;
  border-radius: 3px;
  color: #1a2412;
}
.tab:hover { background: var(--gold); }
.tab.active {
  background: var(--green-dark);
  color: var(--gold);
  transform: translate(2px,2px);
  box-shadow: 2px 2px 0 rgba(0,0,0,.4);
}

.tab-content {
  background: #fff;
  border: 4px solid #000;
  padding: 34px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.4);
  min-height: 300px;
  border-radius: 3px;
}
.tab-panel h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--green-dark);
  margin-bottom: 18px;
}
.tab-panel ul { list-style: none; }
.tab-panel li {
  padding: 10px 0 10px 32px;
  position: relative;
  font-size: 16px;
  border-bottom: 1px dashed rgba(0,0,0,.1);
  line-height: 1.6;
}
.tab-panel li:last-child { border-bottom: none; }
.tab-panel li::before {
  content: '▪';
  position: absolute;
  left: 10px;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 700;
}

/* ═══════════ DONATE ═══════════ */
.donate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.donate-card {
  position: relative;
  background: #fff;
  border: 4px solid #000;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 8px 8px 0 rgba(0,0,0,.4);
  transition: transform .2s;
  display: flex;
  flex-direction: column;
  border-radius: 3px;
}
.donate-card:hover { transform: translateY(-6px); }
.donate-card.featured {
  background: linear-gradient(180deg, #fff8e1 0%, #ffe9a8 100%);
  border-color: var(--gold-dark);
  transform: scale(1.04);
}
.donate-ribbon {
  position: absolute;
  top: -16px; right: -14px;
  background: var(--red);
  color: #fff;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border: 4px solid #000;
  box-shadow: 4px 4px 0 rgba(0,0,0,.5);
  transform: rotate(8deg);
  letter-spacing: 2px;
}
.donate-head {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--green-dark);
  margin-bottom: 12px;
  letter-spacing: 2px;
}
.donate-price {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 800;
  font-size: 42px;
  color: var(--red);
  margin-bottom: 8px;
  text-shadow: 3px 3px 0 rgba(0,0,0,.15);
  line-height: 1;
}
.donate-crystals {
  font-size: 16px;
  color: #1a2412;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: rgba(168, 215, 122, .5);
  border: 2px solid #000;
  border-radius: 3px;
}
.donate-crystals .bonus {
  display: block;
  font-size: 13px;
  color: #b8860b;
  font-weight: 700;
  margin-top: 3px;
}
.donate-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
  flex-grow: 1;
}
.donate-card li {
  padding: 6px 0 6px 26px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}
.donate-card li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--green-dark);
  font-weight: 700;
}
.donate-card .btn { width: 100%; }

/* ═══════════ DONATE FORM ═══════════ */
.donate-form {
  background: #fff;
  border: 4px solid #000;
  padding: 34px;
  box-shadow: 8px 8px 0 rgba(0,0,0,.4);
  max-width: 680px;
  margin: 0 auto;
  border-radius: 3px;
}
.donate-form h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--green-dark);
  margin-bottom: 8px;
}
.donate-form > p { margin-bottom: 20px; font-size: 16px; }
.donate-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.donate-form input, .donate-form select {
  padding: 14px 16px;
  border: 3px solid #000;
  background: var(--green-1);
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  border-radius: 3px;
  color: #1a2412;
}
.donate-form input:focus, .donate-form select:focus {
  background: #fff;
  border-color: var(--gold-dark);
}
.donate-form button {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 4px;
}
.crystal-preview {
  grid-column: 1 / -1;
  text-align: center;
  padding: 12px;
  background: #fff8e1;
  border: 3px solid #b8860b;
  font-weight: 700;
  font-size: 17px;
  color: #b8860b;
  border-radius: 3px;
  font-family: 'Pixelify Sans', sans-serif;
  letter-spacing: 1px;
}
.donate-note {
  font-size: 14px;
  color: #666;
  margin-top: 16px;
  text-align: center;
  line-height: 1.5;
}

/* ═══════════ RULES ═══════════ */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.rules-card {
  background: #fff;
  border: 4px solid #000;
  padding: 26px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.4);
  border-radius: 3px;
}
.rules-card h3 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 16px;
}
.rules-bad h3 { color: var(--red); }
.rules-good h3 { color: var(--green-dark); }
.rules-punish h3 { color: #b8860b; }
.rules-card ul { list-style: none; }
.rules-card li {
  padding: 7px 0 7px 24px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}
.rules-bad li::before { content: '✕'; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.rules-good li::before { content: '✓'; position: absolute; left: 0; color: var(--green-dark); font-weight: 700; }
.rules-punish li::before { content: '⚡'; position: absolute; left: 0; }
.rules-card p { margin-top: 14px; font-size: 14px; color: #555; line-height: 1.5; }

/* ═══════════ FOOTER ═══════════ */
.footer {
  background: var(--brown-2);
  background-image: url('img/dirt.png');
  background-size: 48px;
  color: #f0e6d2;
  border-top: 6px solid #000;
  padding: 48px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-logo {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--gold);
  margin-bottom: 12px;
  text-shadow: 3px 3px 0 #000;
  letter-spacing: 3px;
}
.footer-col p { font-size: 15px; color: #d8cdb8; line-height: 1.6; }
.footer-col h4 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 1.5px;
}
.footer-col a {
  display: block;
  color: #f0e6d2;
  text-decoration: none;
  padding: 5px 0;
  font-size: 15px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--gold); }

.footer-ip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,.55);
  border: 3px solid #000;
  padding: 10px 12px;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
  border-radius: 3px;
}
.footer-ip code {
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
}

.footer-bottom {
  border-top: 3px solid rgba(0,0,0,.4);
  padding: 18px 20px;
  text-align: center;
  font-size: 13px;
  color: #b8a88a;
}

/* ═══════════ MODAL ═══════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.active { display: flex; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(4px);
}
.modal-body {
  position: relative;
  background: #fff;
  border: 6px solid #000;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 12px 12px 0 rgba(0,0,0,.6);
  animation: modalIn .3s;
  border-radius: 3px;
}
@keyframes modalIn {
  from { transform: scale(.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  background: var(--red);
  color: #fff;
  border: 3px solid #000;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 3px 3px 0 #000;
  font-weight: 700;
  border-radius: 3px;
}
.modal-close:hover { background: #e74c3c; }

/* Класс-модалка: прозрачный фон, без рамки и padding */
.modal-body.modal-class {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 900px;
  overflow: visible;
}
.modal-body.modal-class .modal-content {
  padding: 0;
}
.modal-body.modal-class .modal-close {
  top: -16px;
  right: -16px;
  box-shadow: 4px 4px 0 rgba(0,0,0,.6);
}
.modal-body.modal-class .modal-content h2 {
  color: #fff;
  text-shadow: 3px 3px 0 #000, 0 0 20px rgba(0,0,0,.8);
  margin-bottom: 16px;
}
.modal-body.modal-class .modal-content img.class-full {
  box-shadow: 8px 8px 0 rgba(0,0,0,.6);
}

.modal-content { padding: 36px; }
.modal-content h2 {
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--green-dark);
  margin-bottom: 22px;
  text-align: center;
  text-shadow: 2px 2px 0 rgba(0,0,0,.1);
  line-height: 1.35;
  letter-spacing: 1px;
}
.modal-content .story-body {
  font-size: 17px;
  line-height: 1.85;
  text-align: center;
  white-space: pre-wrap;
  color: #2a2a2a;
}
.modal-content .story-body p { margin-bottom: 16px; }
.modal-content img.class-full {
  width: 100%;
  max-width: 720px;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.loading {
  text-align: center;
  padding: 40px;
  font-family: 'Pixelify Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--green-dark);
  letter-spacing: 2px;
}
.loading::after {
  content: '...';
  animation: dots 1.2s infinite;
}
@keyframes dots {
  0%,20% { content: '.'; }
  40% { content: '..'; }
  60%,100% { content: '...'; }
}

/* ═══════════ TOAST ═══════════ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 120px);
  background: var(--green-dark);
  color: var(--gold);
  border: 4px solid #000;
  padding: 16px 26px;
  font-family: 'Rubik', sans-serif;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 6px 6px 0 rgba(0,0,0,.5);
  z-index: 1000;
  transition: transform .3s;
  text-align: center;
  border-radius: 3px;
  max-width: 90vw;
}
.toast.show { transform: translate(-50%, 0); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--brown-2);
    background-image: url('img/dirt.png');
    background-size: 48px;
    flex-direction: column;
    padding: 12px;
    border-bottom: 4px solid #000;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid, .steps, .donate-grid, .rules-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .class-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { background-attachment: scroll; }
  .donate-form form { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .tab-content { padding: 24px 20px; }
  .modal-body.modal-class .modal-close { top: 8px; right: 8px; }
}

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-num { font-size: 28px; }
  .story-grid { grid-template-columns: 1fr 1fr; }
  .class-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-ip { flex-wrap: wrap; justify-content: center; padding: 12px 14px; gap: 8px; }
  .ip-value { font-size: 15px; }
  .modal-content { padding: 26px 18px; }
  .section-title span { padding: 14px 18px; }
  .btn { padding: 14px 22px; font-size: 16px; }
}