/* ============================================================
   PR#2 UI基盤刷新（設計書 D-1〜D-2）
   DotGothic16ピクセルフォント × マイクラ風GUIテーマ
   styles.css の後に読み込み、上書きテーマとして機能する
   ============================================================ */

:root {
  --mc-font: "DotGothic16", "Hiragino Kaku Gothic ProN", "Yu Gothic", monospace;
  --mc-stone: #7d7d7d;
  --mc-stone-light: #a8a8a8;
  --mc-slot: #8b8b8b;
  --mc-panel: #c6c6c6;
  --mc-dark: #1f1f1f;
  --mc-green: #7efc20;
  --mc-gold: #ffff55;
}

/* ---------- D-1: ピクセルフォントの全面適用 ---------- */
.app-shell,
.app-shell button,
.app-shell input,
.app-shell h1,
.app-shell h2,
.app-shell h3,
.mc-toast {
  font-family: var(--mc-font) !important;
  letter-spacing: 0.02em;
}

/* ---------- D-1: 角丸を廃止してブロック感を出す ---------- */
.app-shell button,
.app-shell input,
.quest-card,
.next-action,
.battle-log,
.status-line,
.reward-mini,
.inventory-belt,
.chest-choice,
.player-tab,
.view-switch,
.view-switch button,
.item-slot,
.fun-detail,
.skin-bar button,
.adventure-panel button,
.guild-player,
.approval-row {
  border-radius: 0 !important;
}

/* ---------- D-1: 石ボタン（押すと1px沈む） ---------- */
.app-shell button {
  background: linear-gradient(180deg, #a6a6a6, #7d7d7d 55%, #6f6f6f);
  border: 2px solid;
  border-color: #dcdcdc #3f3f3f #2b2b2b #d0d0d0;
  color: #ffffff;
  text-shadow: 1px 1px 0 #3f3f3f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 0 rgba(0, 0, 0, 0.35);
}
.app-shell button:active {
  transform: translateY(1px);
  border-color: #3f3f3f #dcdcdc #d0d0d0 #2b2b2b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}
.app-shell button:disabled {
  opacity: 0.55;
  transform: none;
}
.app-shell button.danger {
  background: linear-gradient(180deg, #c65b4e, #a03b30 55%, #8c3227);
  border-color: #e8a196 #55160f #40100a #e09488;
}
.view-switch button.active,
.next-action button,
.quest-card button {
  background: linear-gradient(180deg, #8fd15f, #5ea832 55%, #4c8f27);
  border-color: #cdf0a8 #2c5214 #1f3d0d #c2e89a;
}

/* ---------- D-1: 土・木・石のパネル ---------- */
.quest-card,
.next-action,
.chest-choice {
  background:
    linear-gradient(rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.1)),
    repeating-linear-gradient(180deg, #b98a53 0 14px, #ad7f4b 14px 28px);
  border: 3px solid;
  border-color: #e3c79a #4a3213 #38260e #d9bd8e;
  color: #2a1c09;
}
.quest-card h3,
.next-action strong {
  color: #2a1c09;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.battle-log,
.status-line,
.reward-mini,
.action-log {
  background: linear-gradient(180deg, #565656, #404040);
  border: 3px solid;
  border-color: #8f8f8f #1c1c1c #141414 #808080;
  color: #f4efe4;
}
.battle-log strong,
.reward-mini span {
  color: var(--mc-gold);
}
.reward-mini strong {
  color: #ffffff;
}
.status-line span {
  color: #f4efe4;
}
.player-tab {
  border: 2px solid;
  border-color: #dcdcdc #3f3f3f #2b2b2b #d0d0d0;
}
.app-header h1 {
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}

/* ---------- D-2: ハートHP ---------- */
.mc-hearts {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 6px;
}
.mc-heart {
  position: relative;
  width: 16px;
  height: 15px;
  background: #2b0808;
  clip-path: polygon(50% 100%, 100% 55%, 100% 22%, 86% 8%, 62% 8%, 50% 22%, 38% 8%, 14% 8%, 0 22%, 0 55%);
}
.mc-heart i {
  position: absolute;
  inset: 2px;
  background: #555555;
  clip-path: polygon(50% 100%, 100% 55%, 100% 22%, 86% 8%, 62% 8%, 50% 22%, 38% 8%, 14% 8%, 0 22%, 0 55%);
}
.mc-heart.full i {
  background: linear-gradient(180deg, #ff6157, #e3170d 60%, #b01008);
}
.mc-heart.half i {
  background: linear-gradient(90deg, #e3170d 0 50%, #555555 50% 100%);
}
.mc-hearts b {
  margin-left: 6px;
  font-size: 12px;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000000;
}

/* ---------- D-2: XPバー（緑・中央にレベル数字） ---------- */
.mc-xp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.mc-xp-level {
  min-width: 26px;
  text-align: center;
  font-size: 16px;
  color: var(--mc-green);
  text-shadow: 1px 1px 0 #000000, -1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000;
}
.mc-xp-bar {
  flex: 1;
  height: 10px;
  background: #262626;
  border: 2px solid #000000;
  box-shadow: inset 0 0 0 1px #4d4d4d;
}
.mc-xp-bar i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(90deg, #7efc20 0 8px, #5fd414 8px 16px);
  transition: width 0.4s ease-out;
}
.mc-xp small {
  font-size: 11px;
  color: #d8ffb0;
  text-shadow: 1px 1px 0 #000000;
}

/* ---------- D-2: 9スロット・ホットバー ---------- */
.inventory-belt.hotbar {
  position: sticky;
  bottom: 6px;
  z-index: 40;
  background: rgba(30, 30, 30, 0.92);
  border: 3px solid;
  border-color: #6e6e6e #0d0d0d #060606 #5f5f5f;
  color: #f4efe4;
}
.inventory-belt.hotbar header strong {
  color: var(--mc-gold);
}
.inventory-belt.hotbar header span {
  color: #dddddd;
}
.inventory-belt.hotbar > div {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
}
.item-slot {
  background: var(--mc-slot);
  border: 2px solid;
  border-color: #373737 #ffffff #ffffff #373737;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35);
  min-width: 0;
}
.item-slot.empty {
  background: #6f6f6f;
}
.item-slot.equipped {
  outline: 3px solid #ffffff;
  outline-offset: -1px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}
.item-slot small {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- D-2: 実績トースト ---------- */
.mc-toast-stack {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.mc-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 300px;
  padding: 8px 14px 8px 10px;
  background: rgba(23, 23, 23, 0.95);
  border: 2px solid;
  border-color: #5a5a5a #000000 #000000 #5a5a5a;
  animation: mcToastIn 0.35s ease-out;
}
.mc-toast.hide {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.35s, transform 0.35s;
}
.mc-toast-icon {
  width: 22px;
  height: 22px;
  flex: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0 30%, transparent 30%),
    linear-gradient(180deg, #ffe14d, #d9a514);
  border: 2px solid;
  border-color: #fff2a8 #7a5c08 #5c4406 #ffec96;
}
.mc-toast-text b {
  display: block;
  font-size: 13px;
  color: var(--mc-gold);
}
.mc-toast-text small {
  font-size: 12px;
  color: #ffffff;
}
@keyframes mcToastIn {
  from {
    transform: translateX(120%);
  }
  to {
    transform: none;
  }
}

/* ---------- 微調整 ---------- */
.app-shell {
  image-rendering: pixelated;
}
.app-shell input {
  background: #1f1f1f;
  border: 2px solid;
  border-color: #000000 #5a5a5a #5a5a5a #000000;
  color: #ffffff;
}
