@import url('https://fonts.googleapis.com/css2?family=DotGothic16&family=Noto+Sans+JP:wght@400;700&display=swap');

:root {
  --mc-green: #5d8a28;
  --mc-dark-green: #3d5e1a;
  --mc-brown: #8b5a2b;
  --mc-dark-brown: #5c3d1e;
  --mc-sand: #e4d5a0;
  --mc-stone: #7c7c7c;
  --mc-dark-stone: #4a4a4a;
  --mc-sky: #5b9bd5;
  --mc-gold: #f0b429;
  --mc-diamond: #39d7e8;
  --mc-red: #c03030;
  --mc-text: #1a1a1a;
  --mc-bg: #f5f0e8;
}

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

body {
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #2d2d2d;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 31px,
      rgba(0,0,0,0.1) 31px,
      rgba(0,0,0,0.1) 32px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 31px,
      rgba(0,0,0,0.1) 31px,
      rgba(0,0,0,0.1) 32px
    );
  min-height: 100vh;
  color: var(--mc-text);
}

/* ===== HEADER ===== */
header {
  background: linear-gradient(180deg, #1a4a1a 0%, #2d7a2d 50%, #5d8a28 100%);
  border-bottom: 8px solid #3d5e1a;
  position: relative;
  overflow: hidden;
}

.header-sky {
  background: linear-gradient(180deg, #1a2a5e 0%, #2a4a8e 40%, #5b9bd5 100%);
  height: 120px;
  position: relative;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 4px;
  opacity: 0.85;
}
.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 4px;
}
.cloud-1 { width: 80px; height: 20px; top: 25px; left: 8%; }
.cloud-1::before { width: 40px; height: 24px; top: -12px; left: 12px; }
.cloud-1::after { width: 32px; height: 20px; top: -8px; left: 36px; }
.cloud-2 { width: 100px; height: 24px; top: 40px; left: 45%; }
.cloud-2::before { width: 50px; height: 28px; top: -14px; left: 16px; }
.cloud-2::after { width: 40px; height: 22px; top: -10px; left: 48px; }
.cloud-3 { width: 70px; height: 18px; top: 20px; right: 15%; }
.cloud-3::before { width: 36px; height: 22px; top: -11px; left: 10px; }
.cloud-3::after { width: 28px; height: 18px; top: -8px; left: 34px; }

.pixel-sun {
  position: absolute;
  right: 80px;
  top: 12px;
  width: 48px;
  height: 48px;
  background: var(--mc-gold);
  box-shadow: 0 0 0 8px rgba(240,180,41,0.3), 0 0 0 16px rgba(240,180,41,0.1);
  image-rendering: pixelated;
}

.header-ground {
  background: #5d8a28;
  height: 32px;
  display: flex;
  align-items: flex-start;
}

.grass-block {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: #5d8a28;
  border-right: 1px solid rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.header-content {
  padding: 20px 24px 24px;
  text-align: center;
  position: relative;
}

.site-title {
  font-family: 'DotGothic16', monospace;
  font-size: 3rem;
  color: #fff;
  text-shadow:
    3px 3px 0 #000,
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    3px 0 0 #000,
    0 3px 0 #000;
  letter-spacing: 4px;
  display: inline-block;
  padding: 8px 24px;
  background: rgba(0,0,0,0.3);
  border: 4px solid rgba(255,255,255,0.2);
  border-radius: 4px;
}

.site-title .title-icon {
  font-size: 2.4rem;
  margin-right: 8px;
}

.site-subtitle {
  font-family: 'DotGothic16', monospace;
  color: #c8e6a0;
  font-size: 1rem;
  margin-top: 8px;
  text-shadow: 1px 1px 0 #000;
}

.edition-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  padding: 4px 14px;
  font-family: 'DotGothic16', monospace;
  font-size: 0.82rem;
  color: #ffe080;
  text-shadow: 1px 1px 0 #000;
  letter-spacing: 1px;
}

.edition-badge .ed-sep {
  color: rgba(255,255,255,0.4);
  margin: 0 2px;
}

/* ===== NAV ===== */
nav {
  background: #2d2d2d;
  border-bottom: 4px solid #111;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.nav-inner a {
  font-family: 'DotGothic16', monospace;
  color: #d4d4d4;
  text-decoration: none;
  padding: 14px 20px;
  display: block;
  font-size: 0.9rem;
  border-right: 2px solid #444;
  transition: background 0.1s, color 0.1s;
  letter-spacing: 1px;
}

.nav-inner a:first-child {
  border-left: 2px solid #444;
}

.nav-inner a:hover, .nav-inner a.active {
  background: var(--mc-green);
  color: #fff;
}

/* ===== MAIN LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

/* ===== BLOCKS / CARDS ===== */
.mc-block {
  background: var(--mc-bg);
  border: 4px solid #888;
  border-bottom-color: #444;
  border-right-color: #444;
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}

.mc-block-header {
  background: linear-gradient(180deg, #7a7a7a 0%, #5a5a5a 100%);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px solid #333;
}

.mc-block-header h2 {
  font-family: 'DotGothic16', monospace;
  color: #fff;
  font-size: 1.2rem;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 2px;
}

.block-icon {
  font-size: 1.5rem;
}

.mc-block-body {
  padding: 20px;
}

/* ===== HERO BANNER ===== */
.hero-banner {
  background: linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 50%, #3d7a3d 100%);
  border: 4px solid #5d8a28;
  border-bottom-color: #2d4a10;
  border-right-color: #2d4a10;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg, transparent, transparent 15px,
      rgba(255,255,255,0.03) 15px, rgba(255,255,255,0.03) 16px
    ),
    repeating-linear-gradient(
      90deg, transparent, transparent 15px,
      rgba(255,255,255,0.03) 15px, rgba(255,255,255,0.03) 16px
    );
}

.hero-banner h2 {
  font-family: 'DotGothic16', monospace;
  color: #a0e060;
  font-size: 1.6rem;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 12px;
  position: relative;
}

.hero-banner p {
  color: #d0e8c0;
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

/* ===== GUIDE CARDS ===== */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.guide-card {
  background: var(--mc-bg);
  border: 3px solid #888;
  border-bottom-color: #444;
  border-right-color: #444;
  border-radius: 2px;
  padding: 16px;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
  transition: transform 0.1s;
  text-decoration: none;
  color: var(--mc-text);
  display: block;
}

.guide-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(0,0,0,0.4);
}

.guide-card-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}

.guide-card h3 {
  font-family: 'DotGothic16', monospace;
  font-size: 1rem;
  color: #2d2d2d;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.guide-card p {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
}

.guide-card.green { border-top: 4px solid var(--mc-green); }
.guide-card.brown { border-top: 4px solid var(--mc-brown); }
.guide-card.blue  { border-top: 4px solid var(--mc-sky); }
.guide-card.gold  { border-top: 4px solid var(--mc-gold); }
.guide-card.diamond { border-top: 4px solid var(--mc-diamond); }
.guide-card.red   { border-top: 4px solid var(--mc-red); }

/* ===== CRAFTING TABLE ===== */
.crafting-section h3 {
  font-family: 'DotGothic16', monospace;
  font-size: 1rem;
  color: #333;
  margin: 16px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px dashed #aaa;
  letter-spacing: 1px;
}

.crafting-recipe {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #e0d8c8;
  border: 2px solid #aaa;
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.crafting-grid {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 3px;
  background: #8b7355;
  padding: 6px;
  border: 2px solid #5c4a2a;
}

.crafting-cell {
  width: 40px;
  height: 40px;
  background: #c8b87a;
  border: 2px solid #8b7355;
  border-bottom-color: #5c4a2a;
  border-right-color: #5c4a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.crafting-cell.empty { background: #b8a860; }

/* 棒（スティック）描画 */
.mc-stick {
  width: 7px;
  height: 28px;
  background: linear-gradient(180deg, #c4922a 0%, #8b5a2b 60%, #5c3a1e 100%);
  border-radius: 2px;
  border-left: 1px solid #c8a050;
  border-top: 1px solid #c8a050;
  border-right: 1px solid #3a2010;
  border-bottom: 1px solid #3a2010;
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.15);
}

/* チェストプレート描画 */
.mc-chestplate {
  position: relative;
  width: 34px;
  height: 28px;
}
.mc-chestplate .cp-shoulder-l {
  position: absolute;
  top: 0; left: 0;
  width: 13px; height: 10px;
  background: linear-gradient(135deg, #d4d4d4 0%, #909090 100%);
  border-top: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #505050;
  border-bottom: 1px solid #505050;
}
.mc-chestplate .cp-shoulder-r {
  position: absolute;
  top: 0; right: 0;
  width: 13px; height: 10px;
  background: linear-gradient(135deg, #d4d4d4 0%, #909090 100%);
  border-top: 1px solid #e8e8e8;
  border-left: 1px solid #e8e8e8;
  border-right: 1px solid #505050;
  border-bottom: 1px solid #505050;
}
.mc-chestplate .cp-body {
  position: absolute;
  bottom: 0; left: 0;
  width: 34px; height: 16px;
  background: linear-gradient(180deg, #c8c8c8 0%, #787878 100%);
  border-top: 1px solid #e0e0e0;
  border-left: 1px solid #e0e0e0;
  border-right: 1px solid #404040;
  border-bottom: 1px solid #404040;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.2);
}

/* 盾（シールド）描画 */
.mc-shield {
  position: relative;
  width: 26px;
  height: 34px;
  background: linear-gradient(180deg, #c8c8c8 0%, #909090 55%, #686868 100%);
  clip-path: polygon(0% 0%, 100% 0%, 100% 62%, 50% 100%, 0% 62%);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.3), inset -1px -1px 0 rgba(0,0,0,0.3);
}
.mc-shield::after {
  content: '';
  position: absolute;
  top: 30%;
  left: 15%;
  width: 70%;
  height: 22%;
  background: linear-gradient(180deg, #c4922a 0%, #8b5a2b 100%);
  border-top: 1px solid #d4a040;
  border-bottom: 1px solid #5a3010;
}

.crafting-arrow {
  font-size: 2rem;
  color: #888;
}

.crafting-result {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-cell {
  width: 52px;
  height: 52px;
  background: #c8b87a;
  border: 3px solid #8b7355;
  border-bottom-color: #5c4a2a;
  border-right-color: #5c4a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.crafting-result p {
  font-size: 0.85rem;
  color: #555;
  max-width: 140px;
}

.crafting-result strong {
  display: block;
  font-family: 'DotGothic16', monospace;
  font-size: 0.9rem;
  color: #2d2d2d;
  margin-bottom: 4px;
}

/* ===== TIPS LIST ===== */
.tips-list {
  list-style: none;
  padding: 0;
}

.tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
}

.tips-list li:last-child { border-bottom: none; }

.tip-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ===== MOBS TABLE ===== */
.mob-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.mob-table th {
  background: #5a5a5a;
  color: #fff;
  font-family: 'DotGothic16', monospace;
  padding: 10px 12px;
  text-align: left;
  letter-spacing: 1px;
  font-weight: normal;
  border: 1px solid #333;
}

.mob-table td {
  padding: 9px 12px;
  border: 1px solid #ccc;
  background: #f5f0e8;
}

.mob-table tr:nth-child(even) td { background: #ece7db; }
.mob-table tr:hover td { background: #dff0d8; }

.mob-hostile { color: var(--mc-red); font-weight: bold; }
.mob-passive { color: var(--mc-dark-green); font-weight: bold; }
.mob-neutral { color: #b07a00; font-weight: bold; }

/* ===== SIDEBAR ===== */
.sidebar .mc-block { margin-bottom: 20px; }

.sidebar .mc-block-header {
  background: linear-gradient(180deg, #4a6a2a 0%, #3a5a1a 100%);
}

.quick-links {
  list-style: none;
}

.quick-links li {
  border-bottom: 1px dashed #ccc;
}

.quick-links li:last-child { border-bottom: none; }

.quick-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 4px;
  color: #333;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.1s;
}

.quick-links a:hover { color: var(--mc-dark-green); }

.quick-links a .ql-icon { font-size: 1.1rem; }

/* ===== DIFFICULTY BADGE ===== */
.badge {
  display: inline-block;
  font-family: 'DotGothic16', monospace;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 1px;
  vertical-align: middle;
  margin-left: 6px;
}

.badge-easy   { background: #5d8a28; color: #fff; }
.badge-normal { background: #e8a020; color: #fff; }
.badge-hard   { background: #c03030; color: #fff; }

/* ===== PIXEL ART DECORATION ===== */
.pixel-divider {
  display: flex;
  gap: 4px;
  margin: 20px 0;
  align-items: center;
}

.pixel-divider span {
  display: block;
  height: 8px;
  flex: 1;
}

.pd-green  { background: #5d8a28; }
.pd-brown  { background: #8b5a2b; }
.pd-stone  { background: #7c7c7c; }
.pd-sand   { background: #e4d5a0; }

/* ===== PROGRESS BAR (HP / Hunger) ===== */
.stat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.stat-bar .stat-label {
  font-family: 'DotGothic16', monospace;
  width: 60px;
  color: #444;
  font-size: 0.8rem;
}

.stat-bar .stat-track {
  flex: 1;
  height: 16px;
  background: #4a4a4a;
  border: 2px solid #222;
  display: flex;
  gap: 2px;
  padding: 2px;
}

.stat-pip {
  flex: 1;
  background: #ff4444;
  border: 1px solid #cc0000;
}

.stat-pip.hunger { background: #f0a020; border-color: #c07810; }
.stat-pip.empty  { background: #333; border-color: #222; }

/* ===== FOOTER ===== */
footer {
  background: #1a1a1a;
  border-top: 4px solid #333;
  color: #888;
  text-align: center;
  padding: 24px;
  font-size: 0.8rem;
  margin-top: 24px;
  font-family: 'DotGothic16', monospace;
  letter-spacing: 1px;
}

footer a { color: #5d8a28; text-decoration: none; }
footer a:hover { color: #a0d060; }

.footer-logo {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .site-title {
    font-size: 2rem;
  }
  .crafting-recipe {
    flex-direction: column;
    align-items: flex-start;
  }
}
