/* =========================================================
   themes/minecraft/style.css —— 方块世界主题（沉浸式 Minecraft 致敬风）
   原创像素素材（SVG），预留官方 PNG 替换位（见 assets/README.md）。
   设计要点：像素字体、3D 斜面方块面板、泥土/草地/石头/木板纹理、
             物品栏 hotbar、GUI 按钮、爱心计数、经验条页脚、成就风格标题。
   ========================================================= */

/* 像素字体：优先用放入的 font.woff2（官方风格），否则回退等宽字体 */
@font-face {
  font-family: "MCPixel";
  src: url("assets/font.woff2") format("woff2"),
       url("assets/font.ttf") format("truetype");
  font-display: swap;
}

:root {
  --mc-grass: #5d9c3a;
  --mc-grass-dark: #3a5c22;
  --mc-dirt: #8a5a3b;
  --mc-panel: #c6c6c6;
  --mc-panel-light: #ffffff;
  --mc-panel-dark: #565656;
  --mc-slot: #8b8b8b;
  --mc-slot-dark: #373737;
  --mc-ink: #f4f4f4;
  --mc-ink-dark: #2b2620;
  --mc-btn: #7a9b4e;
  --mc-btn-dark: #4f6a2f;
}

.theme-minecraft {
  font-family: "MCPixel", "Courier New", "PingFang SC", monospace;
  color: var(--mc-ink-dark);
  /* 泥土纹理平铺背景（原创 SVG，官方 dirt.png 存在时可在此换 url） */
  background-color: #6b4a30;
  background-image: url("assets/dirt.svg");
  background-size: 48px 48px;
  image-rendering: pixelated;
  letter-spacing: .5px;
}
.theme-minecraft * { image-rendering: pixelated; }

.mc-world { position: relative; overflow-x: hidden; }

/* ---------- 天空与草地天际线 ---------- */
.mc-skyline {
  height: 120px;
  background: linear-gradient(#8ecbff 0%, #a9d8ff 70%, #bfe3ff 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 0;
}
.mc-sun {
  position: absolute; top: 18px; right: 40px;
  width: 44px; height: 44px; background: #ffe680;
  box-shadow: 0 0 0 4px #ffd23f, 6px 0 0 0 #ffd23f, -6px 0 0 0 #ffd23f, 0 6px 0 0 #ffd23f, 0 -6px 0 0 #ffd23f;
}
.mc-cloud { position: absolute; background: #fff; opacity: .92; height: 16px; }
.mc-cloud-1 { top: 30px; left: 12%; width: 70px; box-shadow: 16px -10px 0 0 #fff, 36px 0 0 0 #fff; }
.mc-cloud-2 { top: 62px; left: 55%; width: 54px; box-shadow: 20px -8px 0 0 #fff; }
/* 草地条：顶面用原创 grass_top.svg 平铺，下沿一条深色泥土边 */
.mc-grassline {
  height: 26px;
  background-image: url("assets/grass_top.svg");
  background-size: 26px 26px;
  border-bottom: 6px solid #7d5034;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.15);
}

/* ---------- 站点标题 ---------- */
.mc-head { padding: 26px 16px 10px; }
.mc-title {
  color: #fff;
  text-shadow: 3px 3px 0 var(--mc-grass-dark), 4px 4px 0 rgba(0,0,0,.35);
  font-size: 30px; letter-spacing: 2px;
}
.mc-subtitle {
  color: #fff; opacity: .95;
  text-shadow: 2px 2px 0 rgba(0,0,0,.4);
}

/* ---------- 物品栏 hotbar 导航 ---------- */
.mc-hotbar {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px;
  padding: 10px; margin: 6px auto 18px; width: max-content; max-width: 96%;
  background: #c6c6c6;
  border: 4px solid #373737;
  box-shadow: inset -3px -3px 0 #8b8b8b, inset 3px 3px 0 #fff;
}
.mc-slot {
  position: relative;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  background: var(--mc-slot);
  box-shadow: inset -3px -3px 0 #555, inset 3px 3px 0 #cfcfcf;
}
.mc-slot:hover { background: #a0a0a0; }
.mc-slot:active { box-shadow: inset 3px 3px 0 #555, inset -3px -3px 0 #cfcfcf; }
.mc-slot-icon { font-size: 24px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.3)); }
.mc-slot-num {
  position: absolute; top: 1px; right: 3px;
  font-size: 11px; color: #fff; text-shadow: 1px 1px 0 #000;
}

/* ---------- 模块面板：石头质感 + 3D 斜面边框 ---------- */
.theme-minecraft .tc-module {
  background-color: #b9b9b9;
  background-image: url("assets/stone.svg");
  background-size: 32px 32px;
  border: none;
  border-radius: 0;
  padding: 0 18px 18px;
  box-shadow:
    inset -4px -4px 0 var(--mc-panel-dark),
    inset 4px 4px 0 var(--mc-panel-light),
    0 6px 0 rgba(0,0,0,.25);
  margin-bottom: 30px;
}

/* 成就风格标题条：木牌质感 */
.theme-minecraft .tc-module-head {
  margin: 0 -18px 16px;
  padding: 10px 16px;
  background-color: #b3894f;
  background-image: url("assets/planks.svg");
  background-size: 32px 32px;
  box-shadow: inset -3px -3px 0 #7a5a30, inset 3px 3px 0 #d8b072;
  align-items: center;
}
.theme-minecraft .tc-module-head h2 {
  color: #fff; font-size: 18px; letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(0,0,0,.45);
}
.theme-minecraft .tc-module-icon { font-size: 22px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.3)); }

/* 内容里的白底卡片改为浅石纹描边卡片 */
.theme-minecraft .tc-msg,
.theme-minecraft .tc-wish,
.theme-minecraft .tc-diary,
.theme-minecraft .tc-link {
  background: #d7d7d7;
  box-shadow: inset -2px -2px 0 #9a9a9a, inset 2px 2px 0 #fff;
  border-radius: 0;
}

/* ---------- GUI 按钮 ---------- */
.theme-minecraft button,
.theme-minecraft .tc-game-btn,
.theme-minecraft .tc-form button,
.theme-minecraft .tc-game-reset {
  font-family: inherit;
  color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.5);
  background: var(--mc-btn);
  border: 3px solid #2b2620;
  border-radius: 0;
  box-shadow: inset -3px -3px 0 var(--mc-btn-dark), inset 3px 3px 0 #a9c47a;
  padding: 10px 18px; cursor: pointer; letter-spacing: 1px;
}
.theme-minecraft button:hover,
.theme-minecraft .tc-game-btn:hover { background: #86ab57; }
.theme-minecraft button:active { box-shadow: inset 3px 3px 0 var(--mc-btn-dark), inset -3px -3px 0 #a9c47a; }
.theme-minecraft .tc-game-reset { background: #8b8b8b; box-shadow: inset -3px -3px 0 #555, inset 3px 3px 0 #cfcfcf; }

/* 输入框：凹陷方框 */
.theme-minecraft input[type=text],
.theme-minecraft input[type=number],
.theme-minecraft textarea {
  font-family: inherit;
  background: #dedede;
  border: 3px solid #2b2620;
  border-radius: 0;
  box-shadow: inset 2px 2px 0 #9a9a9a;
  color: #2b2620;
}

/* ---------- 头像：做成方块 ---------- */
.theme-minecraft .tc-avatar {
  border-radius: 0;
  border: 3px solid #2b2620;
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.3);
  width: 84px; height: 84px;
}
.theme-minecraft .tc-avatar-empty { background: #7a9b4e; }

/* ---------- 相册：物品栏格子 ---------- */
.theme-minecraft .tc-photo img {
  border: 3px solid #373737;
  box-shadow: inset -3px -3px 0 #555, inset 3px 3px 0 #cfcfcf;
  border-radius: 0;
}

/* ---------- 访客计数：爱心血条 ---------- */
.theme-minecraft .tc-counter {
  flex-direction: column; gap: 8px;
}
.theme-minecraft .tc-counter-num {
  color: #fff; text-shadow: 2px 2px 0 #a11, 3px 3px 0 rgba(0,0,0,.4);
  font-size: 30px;
}
.theme-minecraft .tc-counter::after {
  content: "";
  display: inline-block;
  width: 180px; height: 18px;
  background-image: url("assets/heart.svg");
  background-size: 20px 20px;
  background-repeat: repeat-x;
  image-rendering: pixelated;
}

/* ---------- 猜数字游戏 ---------- */
.theme-minecraft .tc-game-result.is-win { color: #2e7d32; text-shadow: 1px 1px 0 #fff; }

/* ---------- 经验条页脚 ---------- */
.mc-foot { padding: 0 0 24px; }
.mc-xpbar {
  height: 12px; margin: 24px auto 10px; width: 82%; max-width: 640px;
  background: #3a3a3a;
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #555;
}
.mc-xp-fill { display: block; height: 100%; width: 72%; background: #7cf04a; box-shadow: inset 0 -3px 0 #4ea82a; }
.mc-foot-text { color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.5); font-size: 13px; }

/* ---------- 管理入口按钮：方块风 ---------- */
.mc-cms {
  background: #7a9b4e; color: #fff; border: 3px solid #2b2620; border-radius: 0;
  box-shadow: inset -2px -2px 0 #4f6a2f, inset 2px 2px 0 #a9c47a;
  text-shadow: 1px 1px 0 rgba(0,0,0,.5);
}

/* 移动端微调 */
@media (max-width: 520px) {
  .mc-title { font-size: 22px; }
  .mc-slot { width: 40px; height: 40px; }
  .mc-slot-icon { font-size: 20px; }
}
