/* ============================================================
   MCDownloader 官网 —— Minecraft 像素风 · 炫酷简约
   ============================================================ */
:root {
  --bg: #0d1117;
  --bg-2: #101820;
  --panel: #141c26;
  --panel-2: #1a2430;
  --ink: #000000;
  --line: #2a3542;
  --line-strong: #3b4a5a;
  --text: #e9e7da;
  --text-dim: #a8b2bd;
  --text-faint: #6c7885;
  --grass: #6ecf3c;       /* 草绿 */
  --grass-dark: #4a9a24;
  --creeper: #57b842;     /* 苦力怕绿 */
  --diamond: #3dd8e0;     /* 钻石青 */
  --diamond-dark: #1f9fae;
  --gold: #f6c945;        /* 金 */
  --redstone: #e5483c;    /* 红石红 */
  --stone: #8b95a1;       /* 石头灰 */
  --grad-grass: linear-gradient(180deg, #7ed84a 0%, #4a9a24 100%);
  --grad-diamond: linear-gradient(180deg, #4ee6ee 0%, #1f9fae 100%);
  --radius: 4px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --pixel: "Courier New", Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  image-rendering: auto;
}

a { color: var(--diamond); text-decoration: none; }
::selection { background: rgba(62, 216, 224, 0.3); color: #fff; }

::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3b4a5a; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--diamond-dark); }

/* ---------- 背景 ---------- */
.bg {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(110,207,60,.12), transparent 55%),
    radial-gradient(900px 500px at 100% 8%, rgba(61,216,224,.13), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
#particles { position: fixed; inset: 0; z-index: -2; }
.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 32px 32px;
  image-rendering: pixelated;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 48px);
  transition: background .3s, border-color .3s;
  border-bottom: 4px solid transparent;
  image-rendering: pixelated;
}
.nav.scrolled { background: rgba(13,17,23,.92); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 20px; letter-spacing: 1px; }
.brand img { width: 36px; height: 36px; image-rendering: pixelated; border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.6); }
.brand .grad { color: var(--diamond); text-shadow: 2px 2px 0 rgba(0,0,0,.9); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text-dim); padding: 9px 16px; font-size: 15px; font-weight: 700;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.07); }
.nav-cta {
  padding: 11px 20px; border: 3px solid var(--ink); cursor: pointer;
  font-size: 14px; font-weight: 800; color: #06150a; background: var(--grass);
  box-shadow: 0 5px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.35);
  transition: transform .08s, box-shadow .08s;
  font-family: var(--font);
}
.nav-cta:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.35); }
.nav-cta:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.35); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 24px 60px; position: relative;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 18px; font-size: 13px; font-weight: 800;
  color: var(--gold); background: #241d08; border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(0,0,0,.6); margin-bottom: 28px;
}
.hero-badge .dot { width: 10px; height: 10px; background: var(--grass); box-shadow: 0 0 0 2px var(--ink); animation: pulse 1.6s steps(2) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero h1 {
  font-size: clamp(48px, 9vw, 104px); font-weight: 900; line-height: 1.05;
  letter-spacing: 2px; margin-bottom: 22px; font-family: var(--pixel);
}
.hero h1 .grad {
  background: linear-gradient(180deg, #7ef0ff 0%, #3dd8e0 45%, #1f9fae 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(4px 4px 0 rgba(0,0,0,.95));
}
.hero .sub {
  font-size: clamp(16px, 2.3vw, 22px); color: var(--text-dim);
  max-width: 720px; margin: 0 auto 42px; font-weight: 600;
  text-shadow: 2px 2px 0 rgba(0,0,0,.7);
}
.hero-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; border: 3px solid var(--ink); cursor: pointer;
  font-size: 16px; font-weight: 800; color: #fff; font-family: var(--font);
  transition: transform .08s, box-shadow .08s, filter .12s; text-decoration: none;
  image-rendering: pixelated;
}
.btn:active { transform: translateY(6px); }
.btn svg { width: 19px; height: 19px; }
.btn-green { background: var(--grad-grass); color: #06150a; box-shadow: 0 6px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.4); text-shadow: 1px 1px 0 rgba(255,255,255,.25); }
.btn-green:hover { filter: brightness(1.06); transform: translateY(2px); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.4); }
.btn-blue { background: var(--grad-diamond); color: #03282c; box-shadow: 0 6px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.4); text-shadow: 1px 1px 0 rgba(255,255,255,.2); }
.btn-blue:hover { filter: brightness(1.06); transform: translateY(2px); box-shadow: 0 4px 0 var(--ink), inset 0 2px 0 rgba(255,255,255,.4); }
.btn-ghost { background: #1a2430; color: var(--text); box-shadow: 0 6px 0 var(--ink); }
.btn-ghost:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--ink); background: #222e3d; }
.hero-meta {
  margin-top: 40px; display: flex; gap: 30px; flex-wrap: wrap; justify-content: center;
  color: var(--text-faint); font-size: 13.5px; font-weight: 700;
}
.hero-meta b { color: var(--text-dim); }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--text-faint); font-size: 12px; letter-spacing: 3px; font-family: var(--pixel);
  animation: float 2s steps(2) infinite;
}
@keyframes float { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- 区块 ---------- */
.section { padding: 90px clamp(20px, 5vw, 60px); max-width: 1180px; margin: 0 auto; }
.sec-head { text-align: center; margin-bottom: 56px; }
.sec-head .tag { color: var(--grass); font-size: 13px; letter-spacing: 4px; font-weight: 800; font-family: var(--pixel); text-shadow: 2px 2px 0 rgba(0,0,0,.8); }
.sec-head h2 {
  font-size: clamp(28px, 4.4vw, 44px); font-weight: 900; margin: 12px 0 14px;
  letter-spacing: 1px; text-shadow: 3px 3px 0 rgba(0,0,0,.9);
}
.sec-head p { color: var(--text-dim); max-width: 640px; margin: 0 auto; }

/* ---------- 优点卡片 ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--panel); border: 3px solid var(--line);
  padding: 26px 22px; position: relative;
  box-shadow: 6px 6px 0 rgba(0,0,0,.55);
  transition: transform .12s, border-color .12s, background .12s;
}
.card:hover { transform: translate(-3px,-3px); border-color: var(--grass); background: var(--panel-2); box-shadow: 9px 9px 0 rgba(0,0,0,.55); }
.card .ico {
  width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; font-size: 24px; border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.3), 3px 3px 0 rgba(0,0,0,.5);
  background: #233044;
}
.card:nth-child(4n+1) .ico { background: #2b4a1e; }
.card:nth-child(4n+2) .ico { background: #153d44; }
.card:nth-child(4n+3) .ico { background: #3a2f14; }
.card:nth-child(4n+4) .ico { background: #3a1e1e; }
.card h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; letter-spacing: .5px; }
.card p { color: var(--text-dim); font-size: 14px; }

/* ---------- 数据条 ---------- */
.stats-bar { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin: 20px auto 0; }
.stat {
  min-width: 150px; padding: 22px 26px; text-align: center;
  background: var(--panel); border: 3px solid var(--line); box-shadow: 6px 6px 0 rgba(0,0,0,.55);
}
.stat .num {
  font-size: 32px; font-weight: 900; color: var(--diamond); font-family: var(--pixel);
  text-shadow: 3px 3px 0 rgba(0,0,0,.9);
}
.stat .lbl { font-size: 12.5px; color: var(--text-faint); margin-top: 4px; font-weight: 700; }

/* ---------- 下载区 ---------- */
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; max-width: 920px; margin: 0 auto; }
.dl-card {
  background: var(--panel); border: 3px solid var(--line); padding: 34px 30px;
  display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden;
  box-shadow: 8px 8px 0 rgba(0,0,0,.55);
  transition: transform .12s, border-color .12s;
}
.dl-card:hover { transform: translate(-3px,-3px); }
.dl-card.trial:hover { border-color: var(--grass); }
.dl-card.full:hover { border-color: var(--diamond); }
.dl-card .pixel-top {
  position: absolute; top: 0; left: 0; right: 0; height: 8px;
  image-rendering: pixelated;
}
.dl-card.trial .pixel-top { background: repeating-linear-gradient(90deg, #4a9a24 0 16px, #6ecf3c 16px 32px); }
.dl-card.full .pixel-top { background: repeating-linear-gradient(90deg, #1f9fae 0 16px, #3dd8e0 16px 32px); }
.dl-card .badge {
  align-self: flex-start; font-size: 12px; font-weight: 800; padding: 6px 13px;
  border: 3px solid var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.dl-card.trial .badge { color: #06150a; background: var(--grass); }
.dl-card.full .badge { color: #03282c; background: var(--diamond); }
.dl-card h3 { font-size: 26px; font-weight: 900; letter-spacing: 1px; text-shadow: 2px 2px 0 rgba(0,0,0,.8); }
.dl-card .ver { color: var(--text-dim); font-size: 13.5px; font-family: var(--pixel); }
.dl-card .desc { color: var(--text-dim); font-size: 14px; flex: 1; }
.dl-card .btn { width: 100%; justify-content: center; }
.dl-note { color: var(--text-faint); font-size: 13px; text-align: center; margin-top: 26px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4,6,10,.78);
}
.modal-mask.show { display: flex; }
.modal {
  width: min(460px, 100%); background: var(--bg-2); border: 4px solid var(--line-strong);
  padding: 32px 28px; position: relative; box-shadow: 10px 10px 0 rgba(0,0,0,.7);
  animation: modalIn .2s steps(6);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.modal .close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px;
  border: 3px solid var(--ink); background: #1a2430; color: var(--text-dim);
  font-size: 18px; cursor: pointer; font-weight: 900; transition: background .15s, color .15s;
}
.modal .close:hover { background: var(--redstone); color: #fff; }
.modal h3 { font-size: 22px; font-weight: 900; margin-bottom: 8px; letter-spacing: 1px; text-shadow: 2px 2px 0 rgba(0,0,0,.8); }
.modal .hint { color: var(--text-dim); font-size: 13.5px; margin-bottom: 22px; }
.field { position: relative; }
.field input {
  width: 100%; padding: 15px 16px; border: 3px solid var(--line-strong);
  background: #0a0f15; color: var(--text); font-size: 16px; letter-spacing: 1px;
  font-family: var(--pixel); outline: none; transition: border-color .15s;
}
.field input:focus { border-color: var(--diamond); }
.field input::placeholder { color: var(--text-faint); letter-spacing: 0; }
.modal .btn { width: 100%; justify-content: center; margin-top: 18px; }
.verify-result { margin-top: 18px; font-size: 14px; padding: 13px 15px; border: 3px solid var(--ink); display: none; font-weight: 700; }
.verify-result.ok { display: block; color: #06150a; background: var(--grass); }
.verify-result.err { display: block; color: #fff; background: var(--redstone); }
.verify-result a.dl {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #03282c;
  background: var(--diamond); padding: 10px 18px; border: 3px solid var(--ink);
  font-weight: 800; box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}

/* ---------- 苦力怕脸 ---------- */
.creeper {
  width: 64px; height: 64px; position: relative; margin: 0 auto;
  image-rendering: pixelated; opacity: .9;
}
.creeper::before {
  content: ""; position: absolute; inset: 0;
  background:
    /* 眼睛 */
    linear-gradient(#000 0 0) 10px 14px / 14px 14px,
    linear-gradient(#000 0 0) 40px 14px / 14px 14px,
    /* 眼睛像素角 */
    linear-gradient(#000 0 0) 6px 10px / 8px 8px,
    linear-gradient(#000 0 0) 50px 10px / 8px 8px,
    linear-gradient(#000 0 0) 6px 30px / 8px 8px,
    linear-gradient(#000 0 0) 50px 30px / 8px 8px,
    /* 嘴 */
    linear-gradient(#000 0 0) 14px 42px / 36px 6px,
    linear-gradient(#000 0 0) 20px 34px / 6px 20px,
    linear-gradient(#000 0 0) 38px 34px / 6px 20px;
  background-repeat: no-repeat;
  background-color: var(--creeper);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.25);
}

/* ---------- 页脚 ---------- */
footer { border-top: 4px solid var(--line); padding: 48px 24px; text-align: center; color: var(--text-faint); font-size: 13.5px; }
footer .brand { justify-content: center; font-size: 17px; margin-bottom: 12px; }
footer .links { display: flex; gap: 22px; justify-content: center; margin: 14px 0; }
footer .links a { color: var(--text-dim); font-weight: 700; }
footer .links a:hover { color: var(--diamond); }

/* ---------- 渐显 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s steps(6), transform .5s steps(6); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 46px; }
}
