/* 卡其色系 + Minecraft 介面風格：方角、斜面立體框、無模糊的硬陰影字 */
:root {
  --bg: #cbb98c;          /* 卡其底 */
  --bg-dark: #a8956a;
  --panel: #e6d9b3;       /* 介面面板（像 MC 背包底色，換成卡其） */
  --panel-2: #d9caa0;
  --hi: #fff7de;          /* 斜面亮邊 */
  --lo: #8a7648;          /* 斜面暗邊 */
  --outline: #2e2616;     /* 外框黑線 */
  --text: #3a2e1a;
  --muted: #6b5a3a;
  --gold: #f2b233;
  --orange: #e0782c;
  --grass: #6aa84f;
  --grass-dark: #4a7a34;
  --dirt: #8b6a44;
  --link: #2f6fa8;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  line-height: 1.75;
  font-size: 16px;
  background-color: var(--bg);
  /* 淡淡的方塊格紋 */
  background-image:
    linear-gradient(45deg, #0000000a 25%, transparent 25%, transparent 75%, #0000000a 75%),
    linear-gradient(45deg, #0000000a 25%, transparent 25%, transparent 75%, #0000000a 75%);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
}
a { color: var(--link); }
img { max-width: 100%; display: block; }
.pixel { font-family: "Silkscreen", "Press Start 2P", monospace; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* MC 介面框：外黑線 + 左上亮、右下暗的斜面 */
.mc-frame, .card, .steps li, .info-table, .news article, .cta, .ip-box {
  background: var(--panel);
  border: 3px solid var(--outline);
  box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo);
  border-radius: 0;
}

/* MC 標題字：粗體 + 右下硬陰影 */
h1, h2, h3, .brand span {
  text-shadow: 2px 2px 0 #00000033;
}

/* ---------- 導覽列：草地方塊 ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--dirt);
  border-top: 10px solid var(--grass);
  border-bottom: 3px solid var(--outline);
  box-shadow: inset 0 3px 0 var(--grass-dark), 0 4px 0 #00000022;
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff7de; font-weight: 900; letter-spacing: .04em; }
.brand span { text-shadow: 2px 2px 0 #3a2a14; }
.brand img { width: 34px; height: 34px; border: 2px solid var(--outline); image-rendering: pixelated; }
.brand small { font-family: "Silkscreen", monospace; font-size: 13px; color: #ffe08a; text-shadow: 2px 2px 0 #3a2a14; }
.nav ul { list-style: none; display: flex; gap: 6px; margin: 0 0 0 auto; padding: 0; }
.nav ul a { display: block; padding: 4px 12px; color: #fff7de; text-decoration: none; font-weight: 700; text-shadow: 2px 2px 0 #3a2a14; border: 2px solid transparent; }
.nav ul a:hover { border-color: #fff7de88; }
.nav ul a[aria-current="page"] { background: #00000033; border-color: #fff7de; }

/* ---------- 按鈕：MC 石頭按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  font-weight: 900; font-size: 16px; text-decoration: none; cursor: pointer;
  color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  background: #8b8b8b;
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 #c6c6c6, inset -3px -4px 0 #555;
  border-radius: 0;
}
.btn:hover { outline: 3px solid #fff; outline-offset: -6px; }
.btn:active { box-shadow: inset 3px 3px 0 #555, inset -3px -3px 0 #c6c6c6; }
.btn-primary { background: var(--grass); box-shadow: inset 3px 3px 0 #9fd67f, inset -3px -4px 0 #3b6a28; text-shadow: 2px 2px 0 #2c4d1e; }
.btn-discord { background: #5865f2; box-shadow: inset 3px 3px 0 #8f99ff, inset -3px -4px 0 #3a44b8; text-shadow: 2px 2px 0 #2a318a; }
.btn-ghost { background: #8b8b8b; }

/* ---------- 首頁主視覺 ---------- */
.hero { padding: 40px 0 36px; text-align: center; }
.hero-banner { border: 4px solid var(--outline); box-shadow: 6px 6px 0 #00000040; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); margin: 30px 0 4px; font-weight: 900; }
.hero h1 .grad { color: var(--orange); text-shadow: 2px 2px 0 #7a3a10; }
.hero p.lead { color: var(--muted); font-size: 18px; margin: 0 0 24px; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.ip-box {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px;
  padding: 6px 6px 6px 14px;
}
.ip-box span.label { color: var(--muted); font-size: 14px; font-weight: 700; }
.ip-box code { color: #fff; background: #000; padding: 2px 10px; font-family: "Silkscreen", Consolas, monospace; font-size: 15px; border: 2px solid #a0a0a0; }
.ip-box button {
  background: #8b8b8b; color: #fff; border: 2px solid #000; padding: 4px 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; text-shadow: 1px 1px 0 #3f3f3f; box-shadow: inset 2px 2px 0 #c6c6c6, inset -2px -2px 0 #555;
}
.ip-box button:disabled { opacity: .55; cursor: default; }

/* ---------- 區塊 ---------- */
section.block { padding: 48px 0; }
.block h2 { font-size: 28px; margin: 0 0 6px; font-weight: 900; display: flex; align-items: center; gap: 12px; }
.block h2::before { content: ""; width: 18px; height: 18px; background: var(--grass); border: 3px solid var(--outline); box-shadow: inset 0 -8px 0 var(--dirt); }
.block .sub { color: var(--muted); margin: 0 0 24px; font-weight: 700; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { padding: 20px; }
.card .ico {
  font-size: 26px; line-height: 1; width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px;
  background: #8b8b8b; border: 3px solid var(--outline); box-shadow: inset 3px 3px 0 #555, inset -3px -3px 0 #c6c6c6; /* 物品格 */
}
.card h3 { margin: 0 0 4px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.cta { text-align: center; padding: 36px 20px; background: var(--panel-2); }
.cta h2 { justify-content: center; }

/* ---------- 內頁 ---------- */
.page-head { padding: 40px 0 0; }
.page-head h1 { font-size: 34px; margin: 0; font-weight: 900; }
.page-head p { color: var(--muted); margin: 4px 0 0; font-weight: 700; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 16px 20px 16px 76px; }
.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 14px;
  width: 40px; height: 40px; display: grid; place-items: center;
  font-family: "Silkscreen", monospace; font-size: 18px; color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
  background: #8b8b8b; border: 3px solid var(--outline); box-shadow: inset 3px 3px 0 #555, inset -3px -3px 0 #c6c6c6;
}
.steps h3 { margin: 0 0 2px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); }

.info-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.info-table th, .info-table td { text-align: left; padding: 12px 16px; border-bottom: 2px solid #c9b88a; vertical-align: top; }
.info-table th { width: 30%; color: var(--muted); font-weight: 700; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }

.note { background: #f3ead0; border: 3px solid var(--outline); border-left-width: 8px; border-left-color: var(--gold); padding: 10px 16px; color: var(--muted); margin-top: 16px; }

/* ---------- 公告 ---------- */
.news { display: grid; gap: 16px; }
.news article { padding: 20px 24px; }
.news time { font-family: "Silkscreen", monospace; color: var(--orange); font-size: 14px; }
.news h3 { margin: 0 0 6px; font-size: 21px; }
.news .summary { color: var(--muted); margin: 0 0 8px; }
.news h4 { margin: 14px 0 4px; font-size: 16px; }
.news ul { margin: 0; padding-left: 0; list-style: none; }
.news li { margin: 4px 0; padding-left: 20px; position: relative; }
.news li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 8px; background: var(--grass); border: 2px solid var(--outline); }
.news strong { color: #7a3a10; }
.news code { background: #000; color: #fff; padding: 1px 6px; }
.news blockquote { margin: 6px 0; padding-left: 12px; border-left: 4px solid var(--lo); color: var(--muted); }

/* ---------- 贊助 ---------- */
.tiers { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tier { text-align: center; padding: 16px; }
.tier .twd { font-family: "Silkscreen", "Noto Sans TC", monospace; font-size: 20px; font-weight: 700; color: var(--text); }
.tier .gem { color: #6a3fa0; font-weight: 900; font-size: 18px; text-shadow: 1px 1px 0 #00000022; }
.calc { margin-top: 14px; padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.calc label { font-weight: 900; }
.calc-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; }
.calc input { width: 120px; font: inherit; font-weight: 700; padding: 4px 8px; color: #fff; background: #000; border: 2px solid #a0a0a0; border-radius: 0; }
.calc strong { color: #6a3fa0; font-size: 18px; }
button.tier { font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
button.tier:hover { outline: 3px solid #fff; outline-offset: -8px; }
.donate-form { flex-direction: column; align-items: stretch; gap: 12px; }
.donate-form .field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.donate-form .field > span:first-child { font-weight: 900; min-width: 5em; }
.donate-form input[type="text"] { width: 220px; max-width: 100%; }
.donate-form input[type="text"], .donate-form input[type="number"] { font: inherit; font-weight: 700; padding: 4px 8px; color: #fff; background: #000; border: 2px solid #a0a0a0; border-radius: 0; }
.donate-form .agree { font-size: 15px; }
.donate-form .agree input { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }
.donate-form .btn { align-self: flex-start; }
.donate-form .btn:disabled { opacity: .6; cursor: default; }
.form-error { margin: 0; color: #a02020; font-weight: 700; }
.result { margin-bottom: 16px; padding: 12px 16px; border: 3px solid var(--outline); font-weight: 700; }
.result.ok { background: #d8efc9; }
.result.fail { background: #f3d2c9; }
.terms { margin: 0; padding: 18px 20px 18px 44px; }
.terms li { margin: 8px 0; color: var(--text); }
.terms strong { color: #7a3a10; }

/* ---------- 頁尾：泥土 ---------- */
footer { background: var(--dirt); border-top: 3px solid var(--outline); margin-top: 40px; padding: 24px 0 36px; color: #f3e6c4; font-size: 14px; text-shadow: 1px 1px 0 #3a2a14; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 640px) {
  .brand small { display: none; }
  .nav ul a { padding: 4px 7px; font-size: 14px; }
  .hero { padding-top: 24px; }
  .info-table th { width: 38%; }
  .steps li { padding-left: 68px; }
}
