/* ============ LunaCORE — Minecraft night theme ============ */
:root {
  --bg-0: #0b0716;
  --bg-1: #120b24;
  --bg-2: #1a1133;
  --panel: #171028;
  --panel-edge: #2c2050;
  --panel-dark: #0e0a1c;
  --text: #ece7f8;
  --muted: #a79fc4;
  --purple: #a78bfa;
  --purple-deep: #7c3aed;
  --green: #4ade80;
  --green-deep: #16a34a;
  --gold: #fbbf24;
  --red: #f87171;
  --pixel: "Press Start 2P", monospace;
  --body: "Rubik", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 40%, var(--bg-2) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--purple); text-decoration: none; }
code {
  background: var(--panel-dark);
  border: 1px solid var(--panel-edge);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: .92em;
  color: var(--green);
}

/* ============ Night sky ============ */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.stars { position: absolute; inset: -100px; background-repeat: repeat; }
.stars-1 {
  background-image: radial-gradient(1px 1px at 25px 35px, #fff, transparent),
    radial-gradient(1px 1px at 125px 85px, #cdc2ee, transparent),
    radial-gradient(1.5px 1.5px at 205px 155px, #fff, transparent),
    radial-gradient(1px 1px at 305px 55px, #b8a8e8, transparent),
    radial-gradient(1px 1px at 365px 205px, #fff, transparent);
  background-size: 420px 260px;
  animation: twinkle 5s ease-in-out infinite alternate;
}
.stars-2 {
  background-image: radial-gradient(1px 1px at 65px 125px, #d9d2f2, transparent),
    radial-gradient(2px 2px at 245px 25px, #fff, transparent),
    radial-gradient(1px 1px at 155px 225px, #fff, transparent),
    radial-gradient(1px 1px at 335px 145px, #cdc2ee, transparent);
  background-size: 460px 300px;
  animation: twinkle 7s ease-in-out .8s infinite alternate;
}
.stars-3 {
  background-image: radial-gradient(1.5px 1.5px at 95px 65px, #fff, transparent),
    radial-gradient(1px 1px at 285px 185px, #b8a8e8, transparent),
    radial-gradient(1px 1px at 185px 15px, #fff, transparent);
  background-size: 520px 340px;
  animation: twinkle 9s ease-in-out 1.6s infinite alternate;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

.moon {
  position: absolute;
  top: 72px; right: 8vw;
  width: clamp(90px, 12vw, 160px);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 34px rgba(196, 181, 253, .45)) drop-shadow(0 0 90px rgba(139, 92, 246, .25));
  animation: moonfloat 9s ease-in-out infinite alternate;
}
@keyframes moonfloat { from { transform: translateY(0); } to { transform: translateY(14px); } }

/* ============ MC panel & buttons ============ */
.panel {
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: 10px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.05), inset 0 -3px 0 rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--pixel);
  font-size: 11px;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0,0,0,.45);
  padding: 13px 20px 15px;
  border: 2px solid #000;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: transform .06s ease, filter .15s ease;
  image-rendering: pixelated;
}
.btn:hover { filter: brightness(1.13); }
.btn:active { transform: translateY(2px); box-shadow: none !important; }
.btn-lg { font-size: 12px; padding: 16px 26px 18px; }
.btn-green {
  background: linear-gradient(180deg, #5dd884 0%, #3cba62 55%, #2f9b50 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -4px 0 rgba(0,0,0,.35), 0 4px 0 #123f22;
}
.btn-purple {
  background: linear-gradient(180deg, #a679f7 0%, #8250e0 55%, #6d3fc4 100%);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.3), inset 0 -4px 0 rgba(0,0,0,.35), 0 4px 0 #2e1a55;
}

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(11, 7, 22, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124, 58, 237, .25);
}
.nav-logo { display: flex; align-items: center; }
.nav-wordmark { height: 46px; width: auto; filter: drop-shadow(0 0 12px rgba(139, 92, 246, .35)); }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14.5px;
  padding: 7px 12px;
  border-radius: 7px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: #fff; background: rgba(139, 92, 246, .16); }
.nav-play { font-size: 10px; padding: 11px 16px 13px; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-burger span { width: 24px; height: 3px; background: var(--purple); border-radius: 2px; }

/* ============ Hero ============ */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(70px, 12vh, 130px) 20px 80px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--purple);
  background: rgba(124, 58, 237, .14);
  border: 1px solid rgba(139, 92, 246, .4);
  border-radius: 999px;
  padding: 7px 18px;
  margin-bottom: 28px;
}
.hero-badge b { color: #fff; }
.hero-title { line-height: 0; }
.hero-logo {
  width: min(620px, 92vw);
  height: auto;
  filter: drop-shadow(0 14px 44px rgba(0,0,0,.55)) drop-shadow(0 0 70px rgba(139, 92, 246, .35));
  animation: herofloat 8s ease-in-out infinite alternate;
}
@keyframes herofloat { from { transform: translateY(0); } to { transform: translateY(10px); } }
.hero-sub { color: var(--muted); font-size: clamp(15px, 2vw, 18.5px); margin: 26px 0 38px; }

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  background: var(--panel-dark);
  border: 2px solid var(--panel-edge);
  border-radius: 10px;
  padding: 14px 22px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.4);
}
.ip-chip:hover { border-color: var(--purple-deep); box-shadow: 0 0 24px rgba(139, 92, 246, .3), inset 0 -3px 0 rgba(0,0,0,.4); }
.ip-text { font-family: var(--pixel); font-size: clamp(13px, 2.6vw, 19px); color: var(--green); }
.ip-copy { color: var(--muted); font-size: 19px; }
.ip-dot { width: 11px; height: 11px; border-radius: 50%; background: #6b7280; box-shadow: 0 0 10px currentColor; }
.ip-dot.on { background: var(--green); color: var(--green); }
.ip-dot.off { background: var(--red); color: var(--red); }
.ip-hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; opacity: .75; }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 40px 0 34px; }

.hero-online {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); }
  70% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ============ Grass divider ============ */
.divider {
  height: 26px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="26" shape-rendering="crispEdges"><rect width="16" height="10" y="8" fill="%233cba62"/><rect width="4" height="4" x="0" y="4" fill="%233cba62"/><rect width="4" height="4" x="8" y="4" fill="%233cba62"/><rect width="4" height="4" x="4" y="0" fill="%233cba62"/><rect width="4" height="4" x="12" y="6" fill="%232f9b50"/><rect width="16" height="8" y="18" fill="%232a8446"/></svg>');
  background-repeat: repeat-x;
  background-size: 16px 26px;
  image-rendering: pixelated;
  opacity: .9;
}

/* ============ Sections ============ */
.section { max-width: 1120px; margin: 0 auto; padding: 76px 20px 30px; }
.section-title {
  font-family: var(--pixel);
  font-size: clamp(17px, 3vw, 24px);
  margin-bottom: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.section-title .tag {
  font-size: 11px;
  color: var(--purple);
  background: rgba(124, 58, 237, .15);
  border: 1px solid rgba(139, 92, 246, .4);
  padding: 7px 10px;
  border-radius: 7px;
}
.section-sub { color: var(--muted); margin: -22px 0 32px; max-width: 640px; }

/* ============ Monitoring ============ */
.mon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.mon-card { padding: 20px 22px; }
.mon-label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 9px; }
.mon-value { font-family: var(--pixel); font-size: clamp(14px, 2vw, 19px); line-height: 1.4; }
.mon-value .ok { color: var(--green); }
.mon-value .bad { color: var(--red); }
.mon-value .warn { color: var(--gold); }
.skeleton { color: var(--muted); animation: twinkle 1s ease-in-out infinite alternate; }

.players-panel { padding: 22px 24px; }
.players-head { font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.players-count {
  font-family: var(--pixel);
  font-size: 12px;
  color: var(--green);
  background: rgba(74, 222, 128, .12);
  border: 1px solid rgba(74, 222, 128, .35);
  border-radius: 7px;
  padding: 5px 10px;
  margin-left: 8px;
}
.players-list { display: flex; flex-wrap: wrap; gap: 10px; }
.players-empty { color: var(--muted); font-size: 14.5px; }
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--panel-dark);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  padding: 7px 13px 7px 8px;
  font-weight: 600;
  font-size: 14px;
}
.player-chip img { width: 24px; height: 24px; border-radius: 5px; image-rendering: pixelated; }

/* ============ Modes ============ */
.modes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.mode-card { padding: 26px 24px; position: relative; transition: transform .18s ease, border-color .18s ease; }
.mode-card:hover { transform: translateY(-5px); border-color: var(--purple-deep); }
.mode-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--mc) 16%, transparent);
  border: 2px solid color-mix(in srgb, var(--mc) 45%, transparent);
  margin-bottom: 17px;
}
.mode-card h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 9px; }
.mode-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 42px; }
.mode-state {
  position: absolute;
  left: 24px; bottom: 20px;
  font-family: var(--pixel);
  font-size: 9px;
  padding: 7px 11px;
  border-radius: 6px;
}
.mode-state.on { color: var(--green); background: rgba(74, 222, 128, .12); border: 1px solid rgba(74, 222, 128, .4); }
.mode-state.soon { color: var(--gold); background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .35); }

/* ============ Modpack ============ */
.modpack-wrap { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.modpack-info, .modpack-steps { padding: 30px; }
.modpack-info h3 { font-size: 21px; font-weight: 800; margin-bottom: 11px; }
.modpack-info > p { color: var(--muted); margin-bottom: 19px; }
.modpack-list { list-style: none; margin-bottom: 21px; }
.modpack-list li { padding: 8px 0 8px 28px; position: relative; color: var(--muted); border-bottom: 1px dashed rgba(139, 92, 246, .18); font-size: 15px; }
.modpack-list li b { color: var(--text); }
.modpack-list li::before { content: "▸"; color: var(--green); position: absolute; left: 6px; }
.modpack-meta { font-size: 13.5px; color: var(--muted); margin-bottom: 19px; }
.modpack-meta b { color: var(--purple); }
.modpack-note { font-size: 13px; color: var(--muted); margin-top: 15px; opacity: .8; }
.modpack-steps h4 { font-size: 17px; font-weight: 700; margin-bottom: 15px; }
.modpack-steps ol { margin-left: 20px; color: var(--muted); font-size: 15px; }
.modpack-steps li { padding: 7px 0; }
.modpack-steps b { color: var(--text); }

/* ============ Donate ============ */
.donate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 18px; }
.donate-skeleton, .news-empty { padding: 30px; color: var(--muted); text-align: center; grid-column: 1/-1; }
.donate-card { padding: 28px 26px; display: flex; flex-direction: column; position: relative; overflow: hidden; transition: transform .18s ease; }
.donate-card:hover { transform: translateY(-5px); }
.donate-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--dc, var(--purple));
}
.donate-icon { font-size: 30px; color: var(--dc); margin-bottom: 13px; text-shadow: 0 0 22px var(--dc); }
.donate-title { font-family: var(--pixel); font-size: 16px; margin-bottom: 7px; color: var(--dc); }
.donate-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 17px; }
.donate-perks { list-style: none; margin-bottom: 23px; flex: 1; }
.donate-perks li { font-size: 14px; color: var(--muted); padding: 5px 0 5px 24px; position: relative; }
.donate-perks li::before { content: "✔"; position: absolute; left: 2px; color: var(--dc); font-size: 12px; }
.donate-price { font-family: var(--pixel); font-size: 19px; margin-bottom: 17px; }
.donate-price small { font-size: 11px; color: var(--muted); }

/* ============ News ============ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; }
.news-card { padding: 25px 24px; }
.news-date { font-size: 12.5px; color: var(--purple); font-weight: 600; margin-bottom: 9px; }
.news-card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 9px; }
.news-card p { color: var(--muted); font-size: 14.5px; white-space: pre-line; }

/* ============ Join ============ */
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.join-step { padding: 26px 24px; }
.join-num {
  font-family: var(--pixel);
  font-size: 15px;
  color: #fff;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #a679f7, #6d3fc4);
  border: 2px solid #000;
  border-radius: 9px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 0 3px 0 #2e1a55;
  margin-bottom: 16px;
}
.join-step h4 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.join-step p { color: var(--muted); font-size: 14.5px; }
.ip-inline { color: var(--green); cursor: pointer; border-bottom: 1px dashed var(--green); }

/* ============ Footer ============ */
.footer { margin-top: 90px; border-top: 1px solid rgba(124, 58, 237, .25); background: rgba(9, 6, 18, .8); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 40px 20px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-wordmark { height: 58px; width: auto; filter: drop-shadow(0 0 14px rgba(139, 92, 246, .3)); }
.footer-brand p { color: var(--muted); font-size: 13px; }
.footer-links { margin-left: auto; display: flex; gap: 22px; font-weight: 600; font-size: 14.5px; }
.footer-copy { width: 100%; color: var(--muted); font-size: 12.5px; opacity: .7; }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 3, 12, .78); backdrop-filter: blur(5px); }
.modal-box { position: relative; width: min(430px, 100%); padding: 32px 30px; animation: modalin .22s ease; }
@keyframes modalin { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-x { position: absolute; top: 13px; right: 15px; background: none; border: 0; color: var(--muted); font-size: 17px; cursor: pointer; }
.modal-x:hover { color: #fff; }
.modal-title { font-size: 20px; font-weight: 800; margin-bottom: 7px; }
.modal-title span { color: var(--purple); }
.modal-price { color: var(--muted); margin-bottom: 21px; }
.modal-price b { color: var(--gold); font-size: 18px; }
.modal-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.modal-input {
  width: 100%;
  background: var(--panel-dark);
  border: 2px solid var(--panel-edge);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  padding: 13px 15px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color .15s;
}
.modal-input:focus { border-color: var(--purple-deep); }
.modal-err { color: var(--red); font-size: 13.5px; margin: -6px 0 13px; }
.modal-submit { width: 100%; }
.modal-order { margin-bottom: 13px; color: var(--muted); }
.modal-order b { color: var(--green); font-family: var(--pixel); font-size: 14px; }
.modal-payinfo { color: var(--muted); font-size: 14.5px; background: var(--panel-dark); border: 1px solid var(--panel-edge); border-radius: 8px; padding: 15px; margin-bottom: 21px; white-space: pre-line; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .mon-grid { grid-template-columns: repeat(2, 1fr); }
  .modpack-wrap { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(11, 7, 22, .97);
    padding: 12px 18px 18px;
    border-bottom: 1px solid rgba(124, 58, 237, .3);
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: flex; margin-left: auto; }
  .nav-play { display: none; }
  .only-wide { display: none; }
}
@media (max-width: 480px) {
  .mon-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mon-card { padding: 15px 16px; }
  .hero-cta .btn { width: 100%; }
}
