@charset "utf-8";
/* ============================================================
   海绵联机 · hmkc_new 像素风公共组件样式
   用途：供 clientarea / cart 等非 Tailwind 页面复用官网页头页脚排版
   原则：所有规则一律以 hm- 前缀命名，不写全局选择器（*、body、a…），
        避免污染 MDUI / Bootstrap，保证原有布局不被破坏。
   取值与 head.php / footer.php 的 hm-* 规则保持一致。
   ============================================================ */

/* ---------- 字体与像素渲染 ---------- */
@font-face {
  font-family: 'Press Start 2P';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/themes/web/hmkc_new/assets/fonts/pressstart2p-4.woff2') format('woff2');
}
.hm-pixel { font-family: 'Press Start 2P', ui-monospace, 'Courier New', monospace; }
.hm-tex { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- 通用容器（对齐 clientarea 的 mdui-container 1400px） ---------- */
.hm-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}
@media (min-width: 640px) { .hm-container { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .hm-container { padding-left: 32px; padding-right: 32px; } }

/* ============================================================
   顶栏
   ============================================================ */
.hm-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #ffffff;
  border-bottom: 2px solid #1f2937;
}
.hm-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
}

/* Logo */
.hm-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none !important;
}
.hm-logo-block {
  width: 38px;
  height: 38px;
  border: 2px solid #1f2937;
  box-shadow: 3px 3px 0 rgba(31, 41, 55, .28);
  image-rendering: pixelated;
  display: block;
}
.hm-brand-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: #0f172a;
  letter-spacing: .02em;
  text-decoration: none;
}
.hm-brand-sub {
  display: block;
  margin-top: 6px;
  font-size: 7px;
  line-height: 1;
  color: #059669;
}

/* 导航链接：像素按钮质感（沿用官网取值） */
.hm-navlinks {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.hm-navlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: #1e293b !important;
  background: #ffffff !important;
  border: 2px solid #334155 !important;
  box-shadow: 2px 2px 0 rgba(31, 41, 55, .22);
  text-decoration: none !important;
  transition: background .12s ease, color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .08s ease;
}
.hm-navlink .hm-nav-icon { width: 16px; height: 16px; flex-shrink: 0; }
.hm-navlink:hover {
  color: #0f172a !important;
  background: #f0fdf4 !important;
  border-color: #1f2937 !important;
  box-shadow: 3px 3px 0 rgba(31, 41, 55, .28);
  transform: translate(-1px, -1px);
  text-decoration: none !important;
}
.hm-navlink:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(31, 41, 55, .20); }
.hm-navlink.is-active {
  color: #ffffff !important;
  background: #5fa043 !important;
  border: 2px solid #1f2937 !important;
  box-shadow: inset -3px -3px rgba(0, 0, 0, .28), inset 3px 3px rgba(255, 255, 255, .16), 3px 3px 0 rgba(31, 41, 55, .30);
  text-decoration: none !important;
}

/* 像素风按钮 */
.hm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff !important;
  background: #5fa043;
  border: 2px solid #1f2937;
  box-shadow: inset -3px -3px rgba(0, 0, 0, .25), inset 3px 3px rgba(255, 255, 255, .16), 3px 3px 0 rgba(31, 41, 55, .25);
  text-decoration: none !important;
  transition: filter .15s ease, transform .08s ease;
}
.hm-btn:hover { filter: brightness(1.08); color: #fff !important; text-decoration: none !important; }
.hm-btn:active { transform: translate(2px, 2px); box-shadow: inset 3px 3px rgba(0, 0, 0, .25); }
.hm-btn-stone { background: #7d848c; color: #fff !important; }

/* 头像 */
.hm-navactions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
  border: 2px solid #1f2937;
  box-shadow: 2px 2px 0 rgba(31, 41, 55, .22);
  object-fit: cover;
  display: block;
}
.hm-avatar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #5fa043;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
a.hm-avatar-link { display: inline-flex; text-decoration: none !important; }

/* 移动端菜单按钮 */
.hm-navtoggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  border: 2px solid #1f2937;
  color: #334155;
  box-shadow: 3px 3px 0 rgba(31, 41, 55, .25);
  cursor: pointer;
}
.hm-navtoggle svg { width: 20px; height: 20px; }

/* 移动端菜单面板 */
.hm-mobilemenu {
  display: none;
  border-top: 2px solid #1f2937;
  background: #fff;
  padding: 12px 0;
}
.hm-mobilemenu.is-open { display: block; }
.hm-mobilelink {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b !important;
  background: #fff;
  border: 2px solid #334155;
  box-shadow: 2px 2px 0 rgba(31, 41, 55, .18);
  margin-bottom: 6px;
  text-decoration: none !important;
  transition: background .12s ease, box-shadow .12s ease, transform .08s ease;
}
.hm-mobilelink:last-child { margin-bottom: 0; }
.hm-mobilelink:hover {
  background: #f0fdf4 !important;
  color: #0f172a !important;
  box-shadow: 3px 3px 0 rgba(31, 41, 55, .28);
  transform: translate(-1px, -1px);
  text-decoration: none !important;
}
.hm-mobilelink.is-active {
  color: #ffffff !important;
  background: #5fa043 !important;
  border-color: #1f2937;
  box-shadow: inset -3px -3px rgba(0, 0, 0, .28), inset 3px 3px rgba(255, 255, 255, .16), 3px 3px 0 rgba(31, 41, 55, .25);
}
.hm-mobilesplit {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 2px solid #cbd5e1;
}

/* 导航底部草皮条 */
.hm-grass-strip {
  height: 8px;
  background-image: url('/img/minecraft/block/grass_block_side.png');
  background-repeat: repeat-x;
  background-position: center bottom;
  background-size: auto 8px;
  image-rendering: pixelated;
}

@media (max-width: 1024px) {
  .hm-navlinks { display: none; }
  .hm-navtoggle { display: inline-flex; }
}

/* ============================================================
   页面标题条（替代原 MDUI appbar 里的 {$Title} 位置）
   ============================================================ */
.hm-pagebar {
  background: #fff;
  border-bottom: 2px solid #334155;
}
.hm-pagebar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  flex-wrap: wrap;
}
.hm-pagebar-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

/* ============================================================
   页脚
   ============================================================ */
.hm-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 32px;
}
.hm-footer-bedrock {
  height: 12px;
  background-image: url('/img/minecraft/block/cobblestone.png');
  background-repeat: repeat;
  background-size: 12px 12px;
  image-rendering: pixelated;
  border-bottom: 2px solid #1f2937;
}
.hm-footer-inner { padding-top: 48px; padding-bottom: 48px; }
.hm-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) { .hm-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .hm-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.hm-fbrand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.hm-fbrand-block {
  width: 40px;
  height: 40px;
  border: 2px solid #334155;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
  image-rendering: pixelated;
}
.hm-fbrand-title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: .02em;
}
.hm-fbrand-sub {
  display: block;
  margin-top: 6px;
  font-size: 7px;
  line-height: 1;
  color: #34d399;
}
.hm-fdesc {
  font-size: 14px;
  line-height: 1.75;
  color: #94a3b8;
  margin: 0 0 16px;
}
.hm-fbadges { display: flex; align-items: center; gap: 8px; }
.hm-fbadges img { width: 24px; height: 24px; }

.hm-fheading {
  font-family: 'Press Start 2P', ui-monospace, monospace;
  font-size: 10px;
  line-height: 1.6;
  color: #4ade80;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-weight: 400;
}
.hm-fheading img { width: 16px; height: 16px; }

.hm-flist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hm-flink {
  color: #94a3b8;
  font-size: 14px;
  text-decoration: none;
  transition: color .15s ease, padding-left .15s ease;
}
.hm-flink::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: #334155;
  vertical-align: 1px;
  transition: background .15s ease;
}
.hm-flink:hover { color: #4ade80; padding-left: 2px; }
.hm-flink:hover::before { background: #4ade80; }

.hm-fcontact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
}
.hm-fcontact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: #64748b; }

.hm-footer-bottom {
  border-top: 2px solid #1e293b;
  margin-top: 40px;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .hm-footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}
.hm-fcopy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 16px;
  font-size: 12px;
  color: #64748b;
}
.hm-fcopy a { color: #64748b; text-decoration: none; }
.hm-fcopy a:hover { color: #4ade80; }
.hm-fcopy .hm-fsep { color: #334155; }
