/* ============================================================
   起缘服务器官网 - MC 像素风格（亮色）
   字体: Zpix (OFL 开源) | 纹理: 自绘 MC 风格方块
   ============================================================ */

/* ---------- 像素字体 ---------- */
@font-face {
  font-family: 'Zpix';
  src: url('fonts/zpix.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky-top: #6ea8ff;
  --sky-bottom: #a8c8ff;
  --paper: #efeade;          /* 内容区米白 */
  --paper-tint: #e6e0d0;
  --ink: #2b2620;            /* 正文深色 */
  --ink-dim: #6b6152;
  --green: #5aa834;          /* MC 草绿 */
  --green-dark: #3d7a20;
  --yellow: #f8c31c;
  --aqua: #1db8c4;
  --red: #e2574c;
  --shadow-hard: 3px 3px 0 rgba(0, 0, 0, .25);
  --border: #1a1a1a;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Zpix', 'PingFang SC', 'Microsoft YaHei', monospace;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: none;   /* 关闭抗锯齿，保留像素棱角 */
}

img { image-rendering: pixelated; }

code {
  font-family: inherit;
  background: rgba(29, 184, 196, .12);
  color: #0e7a83;
  padding: 1px 8px;
  border: 2px solid rgba(29, 184, 196, .35);
  font-size: .92em;
}

.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   MC 原版按钮
   ============================================================ */
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: normal;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
  background: linear-gradient(rgba(160, 160, 160, .82), rgba(120, 120, 120, .82)),
              url('assets/stone.png');
  background-size: auto, 48px 48px;
  border: 3px solid var(--border);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .35),
              inset -3px -3px 0 rgba(0, 0, 0, .4);
  padding: 10px 24px;
  cursor: pointer;
  text-decoration: none;
  transition: filter .1s;
  image-rendering: pixelated;
}
.mc-btn:hover {
  filter: brightness(1.15);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .45),
              inset -3px -3px 0 rgba(0, 0, 0, .4),
              0 0 0 3px #ffffffaa;
}
.mc-btn:active {
  box-shadow: inset -3px -3px 0 rgba(255, 255, 255, .3),
              inset 3px 3px 0 rgba(0, 0, 0, .35);
}
.mc-btn-green {
  background: linear-gradient(rgba(120, 200, 70, .88), rgba(70, 150, 40, .88)),
              url('assets/grass_top.png');
  background-size: auto, 48px 48px;
}
.btn-block { width: 100%; }

/* ============================================================
   导航
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250, 248, 240, .92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--border);
}
.nav-inner {
  max-width: 1060px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-size: 17px;
}
.nav-logo-block {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-hard);
}
.nav-logo i {
  font-style: normal; font-size: 11px; color: #fff;
  background: var(--aqua);
  border: 2px solid var(--border);
  padding: 0 6px; margin-left: 4px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  color: var(--ink-dim); text-decoration: none; font-size: 14.5px;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { padding: 6px 16px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span {
  display: block; width: 22px; height: 3px; background: var(--ink);
  margin: 5px 0; border: 1px solid var(--border);
}

/* ============================================================
   Hero：MC 天空 + 像素云
   ============================================================ */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 88%, #cfe0b8 100%);
  padding-top: 130px;
  overflow: hidden;
}

.hero-sky { position: absolute; inset: 0; pointer-events: none; }

/* 像素太阳 */
.pixel-sun {
  position: absolute; top: 90px; right: 12%;
  width: 72px; height: 72px;
  background: #ffe97d;
  border: 4px solid #ffce3c;
  box-shadow: 0 0 0 8px rgba(255, 233, 125, .35), 0 0 0 16px rgba(255, 233, 125, .15);
}

/* 像素云（box-shadow 拼像素） */
.cloud {
  position: absolute;
  width: 16px; height: 16px;
  background: transparent;
}
.cloud::before {
  content: ""; position: absolute; width: 16px; height: 16px;
  background: #ffffff;
  box-shadow:
    16px 0 0 #fff, 32px 0 0 #fff, 48px 0 0 #fff, 64px 0 0 #fff, 80px 0 0 #fff,
    16px -16px 0 #fff, 32px -16px 0 #fff, 48px -16px 0 #fff, 64px -16px 0 #fff,
    16px -32px 0 #fff, 32px -32px 0 #fff, 48px -32px 0 #fff;
}
.cloud-a { top: 130px; left: -160px; animation: drift 65s linear infinite; }
.cloud-b { top: 220px; left: -80px; transform: scale(.72); animation: drift 48s linear infinite; animation-delay: -20s; opacity: .9; }
.cloud-c { top: 70px; left: -60px; transform: scale(.5); animation: drift 38s linear infinite; animation-delay: -8s; opacity: .75; }
@keyframes drift {
  from { transform: translateX(0) }
  to   { transform: translateX(calc(100vw + 320px)) }
}
.cloud-b { animation-name: drift-b; }
@keyframes drift-b {
  from { transform: translateX(0) scale(.72) }
  to   { transform: translateX(calc(100vw + 320px)) scale(.72) }
}
.cloud-c { animation-name: drift-c; }
@keyframes drift-c {
  from { transform: translateX(0) scale(.5) }
  to   { transform: translateX(calc(100vw + 320px)) scale(.5) }
}

.hero-inner {
  position: relative;
  max-width: 780px; margin: 0 auto; text-align: center;
  padding: 0 24px 40px;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: center;
  background: rgba(20, 26, 40, .62);
  border: 3px solid rgba(255, 255, 255, .85);
  color: #fff; font-size: 13.5px;
  padding: 5px 16px; margin-bottom: 28px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}
.status-dot {
  width: 10px; height: 10px; flex-shrink: 0;
  background: #9aa3ad;
  border: 2px solid rgba(0, 0, 0, .35);
}
.status-dot.online {
  background: #62d64f;
  animation: pulse 1.6s infinite;
}
.status-dot.offline { background: var(--red); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(98, 214, 79, .7) }
  50% { box-shadow: 0 0 0 6px rgba(98, 214, 79, 0) }
}

.hero-title {
  font-size: clamp(44px, 8vw, 76px);
  font-weight: normal;
  color: #fff;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, .35), 8px 8px 0 rgba(0, 0, 0, .12);
  letter-spacing: 6px;
}

/* MOTD 聊天条 */
.hero-chat {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: 6px; align-self: center;
  background: rgba(12, 16, 28, .68);
  border: 3px solid rgba(255, 255, 255, .8);
  padding: 8px 22px; margin-top: 26px;
  font-size: 16.5px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .6);
}
.c-green  { color: #6fe36a; }
.c-white  { color: #ffffff; }
.c-yellow { color: #ffe14d; }
.c-aqua   { color: #6be8f0; }
.c-sep    { color: rgba(255,255,255,.45); }

.hero-desc {
  margin-top: 18px; color: #fff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .3);
  font-size: 15px;
  max-width: 560px; margin-left: auto; margin-right: auto;
}

.hero-actions {
  margin-top: 36px;
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
}
.ip-tag {
  font-size: 14px;
  background: rgba(255, 255, 255, .92);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-hard);
  color: #1d4ed8;
  padding: 9px 16px;
}

/* 草地方块条：上草下土 */
.ground {
  height: 48px;
  background:
    url('assets/grass_side.png') repeat-x top / 48px 48px,
    url('assets/dirt.png') repeat / 48px 48px;
  background-color: #8b5a2b;
  border-top: 3px solid rgba(0, 0, 0, .3);
  box-shadow: 0 -6px 0 rgba(255, 255, 255, .18);
}

/* ============================================================
   数据栏：MC 物品栏
   ============================================================ */
.hotbar-section {
  background: var(--paper);
  padding: 34px 24px 44px;
  display: flex; justify-content: center;
}
.hotbar {
  display: flex; gap: 6px;
  background: rgba(30, 30, 30, .82);
  border: 3px solid var(--border);
  padding: 8px;
  box-shadow: var(--shadow-hard), 0 0 0 3px rgba(255,255,255,.5);
  flex-wrap: wrap; justify-content: center;
}
.slot {
  width: 128px; min-height: 86px;
  background: #8b8b8b;
  border: 3px solid #373737;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.35), inset -3px -3px 0 rgba(255,255,255,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 8px 6px;
}
.slot strong {
  color: #fff; font-weight: normal; font-size: 21px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.5);
}
.slot span { color: #cfcfcf; font-size: 12px; text-shadow: 1px 1px 0 rgba(0,0,0,.5); }

/* ============================================================
   区块通用
   ============================================================ */
.section { padding: 80px 0; }
.section-tint { background: var(--paper-tint); border-top: 3px solid rgba(26,26,26,.12); border-bottom: 3px solid rgba(26,26,26,.12); }
.section-head {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 48px;
}
.section-icon {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-hard);
}
.section-head h2 {
  font-size: 30px; font-weight: normal;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .12);
  letter-spacing: 3px;
}

/* ============================================================
   服务器介绍
   ============================================================ */
.about-card {
  display: grid; grid-template-columns: 1.7fr 1fr; gap: 26px;
  align-items: stretch;
}
.about-main {
  background: #fff;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-hard), 6px 6px 0 rgba(0,0,0,.08);
  padding: 30px;
}
.about-main h3 {
  font-size: 21px; font-weight: normal;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.tag-live {
  font-size: 12px; color: #fff;
  background: var(--green);
  border: 2px solid var(--border);
  padding: 1px 10px;
  text-shadow: 1px 1px 0 rgba(0,0,0,.4);
}
.about-main > p { margin-top: 12px; color: var(--ink-dim); font-size: 14.5px; }

.feature-list { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 14px;
  background: var(--paper);
  border: 2px solid rgba(26,26,26,.25);
}
.feature-list b { display: block; font-weight: normal; font-size: 15px; }
.feature-list span { display: block; color: var(--ink-dim); font-size: 13px; }
.fi { width: 30px; height: 30px; flex-shrink: 0; border: 2px solid var(--border); }
.fi-grass { background: url('assets/grass_top.png'); background-size: cover; }
.fi-craft { background: url('assets/planks.png'); background-size: cover; }
.fi-claim { background: #d9a441; box-shadow: inset -4px -4px 0 rgba(0,0,0,.25), inset 4px 4px 0 rgba(255,255,255,.3); }
.fi-log   { background: #7b8894; box-shadow: inset -4px -4px 0 rgba(0,0,0,.25), inset 4px 4px 0 rgba(255,255,255,.35); }

.about-side { display: flex; }
/* 服务器信息：地图/羊皮纸风格 —— 木框 + 地图网格线 */
.server-info-board {
  flex: 1;
  background:
    repeating-linear-gradient(0deg, rgba(122, 101, 62, .16) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(90deg, rgba(122, 101, 62, .16) 0 2px, transparent 2px 48px),
    url('assets/map_paper.png');
  background-size: auto, auto, 48px 48px;
  border: 4px solid #5a4326;
  box-shadow: inset 0 0 0 2px #efe7cf,       /* 框内侧浅色缝线 */
              inset 0 0 0 4px rgba(90, 67, 38, .55), /* 内圈深线，像地图边框 */
              var(--shadow-hard), 6px 6px 0 rgba(0,0,0,.1);
  padding: 24px;
}
.server-info-board h4 {
  font-size: 17px; font-weight: normal; color: #4a3418;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 3px solid rgba(90, 67, 38, .45);
  padding-bottom: 10px; margin-bottom: 14px;
}
/* 标题前的红色图钉标记 */
.server-info-board h4::before {
  content: ""; width: 12px; height: 12px; flex: none;
  background: var(--red);
  border: 2px solid #4a2c1e;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .25), inset 2px 2px 0 rgba(255, 255, 255, .35);
}
.server-info-board dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; }
.server-info-board dt { color: #6d5535; font-size: 14px; }
.server-info-board dd { color: #3b2c14; font-size: 14px; }
.server-info-board dd code {
  background: rgba(90, 67, 38, .12);
  color: #5a4326;
  border-color: rgba(90, 67, 38, .4);
}
.server-status { font-weight: normal; }
.server-status.online { color: var(--green-dark); }

/* ============================================================
   加入流程
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  background: #fff;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-hard), 6px 6px 0 rgba(0,0,0,.08);
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.step-num {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff;
  background: var(--green);
  border: 3px solid var(--border);
  text-shadow: 2px 2px 0 rgba(0,0,0,.45);
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.35), inset -3px -3px 0 rgba(0,0,0,.3);
}
.step h3 { font-size: 17px; font-weight: normal; }
.step p { color: var(--ink-dim); font-size: 13.5px; flex: 1; }
.step .mc-btn { margin-top: 4px; font-size: 14px; padding: 8px 16px; }

.join-note {
  margin-top: 26px; text-align: center;
  color: var(--ink-dim); font-size: 13px;
  background: rgba(248, 195, 28, .14);
  border: 2px dashed rgba(150, 118, 20, .5);
  padding: 12px 18px;
}

/* ============================================================
   服规：告示牌
   ============================================================ */
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
/* 橡木告示牌（游戏内同款观感）：浅橡木牌面 + 深棕包边 + 立牌木桩 */
.sign {
  position: relative;
  background:
    repeating-linear-gradient(180deg, rgba(90, 62, 32, .06) 0 2px, rgba(255, 246, 214, .07) 2px 4px),
    url('assets/sign_oak.png');
  background-size: auto, 16px 16px;
  border: 3px solid #4a3620;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .3),
              inset -3px -3px 0 rgba(0, 0, 0, .16),
              var(--shadow-hard), 6px 6px 0 rgba(0,0,0,.08);
  padding: 26px 24px 22px;
}
/* 底部木桩：立在地上的告示牌 */
.sign::after {
  content: ""; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  width: 12px; height: 14px;
  background: linear-gradient(rgba(255, 255, 255, .22), rgba(0, 0, 0, .1)), #6b5236;
  border: 3px solid #3a2a15;
}
.sign h3 {
  font-size: 16.5px; font-weight: normal; color: #241806; margin-bottom: 8px;
  text-shadow: 1px 1px 0 rgba(255, 246, 214, .55); /* 刻字感 */
}
.sign p { color: #3a2b16; font-size: 13.5px; text-shadow: 1px 1px 0 rgba(255, 246, 214, .4); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff;
  border: 3px solid var(--border);
  box-shadow: var(--shadow-hard);
}
.faq-item[open] { box-shadow: var(--shadow-hard), 0 0 0 3px rgba(90, 168, 52, .4); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; font-size: 15.5px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 18px; color: var(--ink-dim); }
.faq-item[open] summary::after { content: "-"; }
.faq-body { padding: 0 20px 16px; color: var(--ink-dim); font-size: 14px; }

/* ============================================================
   页脚：泥土
   ============================================================ */
.footer {
  background:
    linear-gradient(rgba(0, 0, 0, .62), rgba(0, 0, 0, .62)),
    url('assets/dirt.png');
  background-size: auto, 48px 48px;
  border-top: 3px solid var(--border);
  padding: 44px 0; text-align: center;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0,0,0,.6);
}
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.footer-brand img {
  width: 26px; height: 26px;
  border: 2px solid rgba(255,255,255,.6);
}
.footer-links a { color: #cfc6b8; }
.footer-links a:hover { color: #fff; }
.footer-copy { color: #a89e8c; font-size: 12px; line-height: 1.9; }

/* ============================================================
   背景音乐：唱片机悬浮按钮
   ============================================================ */
.music-fab { position: fixed; right: 22px; bottom: 22px; z-index: 90; }
.music-btn {
  width: 54px; height: 54px;
  font-family: inherit; font-size: 26px; line-height: 1;
  color: #ffd83d;                        /* 唱片标签黄 */
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
  background: linear-gradient(rgba(58, 42, 21, .38), rgba(58, 42, 21, .38)),
              url('assets/planks.png');
  background-size: auto, 48px 48px;
  border: 3px solid var(--border);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .28),
              inset -3px -3px 0 rgba(0, 0, 0, .4),
              var(--shadow-hard);
  cursor: pointer;
  transition: filter .1s;
}
.music-btn:hover {
  filter: brightness(1.15);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .36),
              inset -3px -3px 0 rgba(0, 0, 0, .4),
              0 0 0 3px #ffffffaa;
}
.music-btn:active {
  box-shadow: inset -3px -3px 0 rgba(255, 255, 255, .22),
              inset 3px 3px 0 rgba(0, 0, 0, .35),
              var(--shadow-hard);
}
/* 播放中：绿色描边 + 音符轻跳（按钮本体保持静止，点击区域稳定） */
.music-fab.playing .music-btn {
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, .28),
              inset -3px -3px 0 rgba(0, 0, 0, .4),
              var(--shadow-hard),
              0 0 0 3px rgba(90, 168, 52, .6);
}
.music-fab.playing .music-note { animation: note-bounce 1.1s ease-in-out infinite; display: inline-block; }
@keyframes note-bounce {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-4px) }
}
/* 播放中飘出的像素音符 */
.music-fab.playing::before,
.music-fab.playing::after {
  content: "♪"; position: absolute; bottom: 44px;
  color: #fff; font-size: 15px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none;
  animation: note-float 2.8s linear infinite;
}
.music-fab.playing::before { left: 10px; }
.music-fab.playing::after  { left: 34px; font-size: 12px; animation-delay: 1.4s; }
@keyframes note-float {
  0%   { transform: translate(0, 0); opacity: 0 }
  12%  { opacity: .95 }
  100% { transform: translate(6px, -64px); opacity: 0 }
}
/* 提示气泡 */
.music-toast {
  position: absolute; right: 0; bottom: 66px;
  background: rgba(12, 16, 28, .88);
  color: #fff; font-size: 12.5px;
  border: 2px solid rgba(255, 255, 255, .75);
  padding: 6px 12px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.music-toast.show { opacity: 1; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
  .about-card { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .rules-grid { grid-template-columns: 1fr; }
  .hotbar { gap: 4px; }
  .slot { width: 104px; min-height: 76px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(250, 248, 240, .98);
    flex-direction: column; gap: 0;
    border-bottom: 3px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s;
  }
  .nav-links.open { max-height: 360px; }
  .nav-links a { padding: 13px 24px; width: 100%; text-align: center; }
  .nav-cta { margin: 12px 0 16px; width: auto !important; }
  .hero { padding-top: 110px; }
  .hero-title { letter-spacing: 3px; }
  .pixel-sun { width: 48px; height: 48px; right: 8%; top: 100px; }
  .music-fab { right: 14px; bottom: 14px; }
  .music-btn { width: 46px; height: 46px; font-size: 22px; }
}
