/* ==========================================================================
   MINECRAFT PIXEL ENCYCLOPEDIA STYLESHEET
   Accurate Minecraft Java & Bedrock GUI Theme with Korean Pixel Fonts
   ========================================================================== */

/* Web Fonts: Galmuri11 & NeoDunggeunmo for Authentic Minecraft Korean Pixel Typography */
@import url('https://cdn.jsdelivr.net/npm/galmuri@latest/dist/galmuri.css');
@import url('https://cdn.jsdelivr.net/gh/neodunggeunmo/neodunggeunmo@latest/neodunggeunmo.css');

:root {
  --mc-font: 'Galmuri11', 'NeoDunggeunmo', 'Minecraft', monospace;
  --mc-gui-bg: #c6c6c6;
  --mc-gui-border-light: #ffffff;
  --mc-gui-border-dark: #555555;
  --mc-slot-bg: #8b8b8b;
  --mc-slot-border-dark: #373737;
  --mc-slot-border-light: #ffffff;
  --mc-btn-bg: #737373;
  --mc-btn-border-light: #a0a0a0;
  --mc-btn-border-dark: #373737;
  --mc-text-shadow: 2px 2px 0px #3f3f3f;
  --mc-yellow: #ffff55;
  --mc-green: #55ff55;
  --mc-aqua: #55ffff;
  --mc-red: #ff5555;
  --mc-gold: #ffaa00;
  --mc-purple: #aa00aa;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  image-rendering: pixelated;
  font-smooth: never;
  -webkit-font-smoothing: none;
}

body {
  font-family: var(--mc-font);
  background-color: #141414;
  color: #ffffff;
  overflow-x: hidden;
  user-select: none;
  min-height: 100vh;
  letter-spacing: 1px;
}

/* ==========================================================================
   CUSTOM CURSOR (Minecraft Wooden Sword / Crosshair)
   ========================================================================== */
body, button, input, select, a {
  cursor: url('https://minecraft.wiki/images/Wooden_Sword_JE2_BE2.png'), auto;
}

/* ==========================================================================
   MINECRAFT BUTTONS
   ========================================================================== */
.mc-btn {
  font-family: var(--mc-font);
  font-size: 16px;
  color: #e0e0e0;
  text-shadow: 2px 2px 0px #222222;
  background: linear-gradient(180deg, #7c7c7c 0%, #646464 100%);
  border: 2px solid #000000;
  box-shadow: inset -2px -4px 0px #373737, inset 2px 2px 0px #a8a8a8;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: filter 0.1s;
  cursor: pointer;
  letter-spacing: 1px;
}

.mc-btn:hover {
  filter: brightness(1.15);
  color: #ffffa0;
  box-shadow: inset -2px -4px 0px #4b4b4b, inset 2px 2px 0px #ffffff;
}

.mc-btn:active {
  box-shadow: inset 2px 4px 0px #2a2a2a, inset -2px -2px 0px #707070;
  transform: translateY(2px);
}

.mc-btn-primary {
  background: linear-gradient(180deg, #5b8731 0%, #3f601f 100%);
  box-shadow: inset -2px -4px 0px #233711, inset 2px 2px 0px #7ab743;
}
.mc-btn-primary:hover {
  box-shadow: inset -2px -4px 0px #2d4516, inset 2px 2px 0px #97e154;
}

.mc-btn-danger {
  background: linear-gradient(180deg, #a73c3c 0%, #7b2626 100%);
  box-shadow: inset -2px -4px 0px #401010, inset 2px 2px 0px #d65555;
}

/* ==========================================================================
   VIEW 1: MINECRAFT TITLE SCREEN (MAIN MENU)
   ========================================================================== */
#titleScreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #0c0906;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#titleScreen.hidden {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* Dynamic Landscape Background Slideshow (산, 바다, 건축물) */
.title-bg-slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.title-bg-slide {
  position: absolute;
  inset: -30px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.0);
}

.title-bg-slide.active {
  opacity: 1;
  animation: kenBurnsZoom 8.5s ease-out forwards;
}

@keyframes kenBurnsZoom {
  0% {
    transform: scale(1.0) translate(0, 0);
  }
  100% {
    transform: scale(1.06) translate(-1%, -0.8%);
  }
}

/* Vignette & Contrast Overlay */
.title-bg-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: 
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 25%, transparent 70%, rgba(0,0,0,0.8) 100%);
}

/* Location Indicator Badge in Title Screen (Top-left HUD style) */
.title-location-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 15;
  background: rgba(14, 14, 18, 0.85);
  border: 2px solid #000000;
  box-shadow: inset 1px 1px 0px #555555, inset -1px -1px 0px #111111, 0 4px 15px rgba(0,0,0,0.6);
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #ffffa0;
  text-shadow: 1px 1px 0px #000000;
  letter-spacing: 1px;
  pointer-events: none;
  border-radius: 2px;
  transition: opacity 0.4s ease;
}

.title-location-badge .location-icon {
  font-size: 14px;
}

.title-location-badge .location-text {
  font-weight: normal;
}

/* Central Unified Main Content: Logo + Menu Buttons */
.title-main-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  z-index: 10;
  width: 100%;
  max-width: 560px;
  margin: auto 0;
  padding: 24px 0;
  transition: transform 0.3s ease;
}

/* Title Logo Area */
.title-logo-container {
  position: relative;
  margin: 0;
  text-align: center;
  z-index: 2;
}

.mc-logo-text {
  font-size: clamp(38px, 7.5vw, 76px);
  font-weight: 900;
  letter-spacing: 4px;
  color: #c4c4c4;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #a8a8a8 45%, #666666 50%, #3a3a3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(4px 4px 0px #181818) drop-shadow(-2px -2px 0px #ffffff);
  transform: perspective(300px) rotateX(8deg);
  line-height: 1.1;
  display: block;
}

.mc-logo-sub {
  font-size: clamp(13px, 2.2vw, 20px);
  letter-spacing: 2px;
  color: #ffffa0;
  text-shadow: 2px 2px 0px #3f3f00, -1px -1px 0px #000000;
  margin-top: 10px;
}

/* Animated Yellow Splash Text */
.mc-splash-text {
  position: absolute;
  right: -24px;
  bottom: -18px;
  font-size: clamp(15px, 2.2vw, 22px);
  color: var(--mc-yellow);
  text-shadow: 2px 2px 0px #3f3f00;
  transform: rotate(-20deg);
  transform-origin: center;
  white-space: nowrap;
  animation: splashBounce 1.4s ease-in-out infinite alternate;
  z-index: 10;
  pointer-events: none;
}

@keyframes splashBounce {
  0% { transform: rotate(-20deg) scale(0.92); }
  100% { transform: rotate(-20deg) scale(1.08); }
}

/* Title Screen Menu Buttons */
.title-menu-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 440px;
  z-index: 2;
}

.title-menu-container .mc-btn {
  width: 100%;
  font-size: 18px;
  padding: 13px 20px;
}

.title-menu-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.title-menu-row .mc-btn {
  flex: 1;
}

/* Title Footer Info (Absolute Bottom) */
.title-footer {
  position: absolute;
  bottom: 16px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #aaaaaa;
  text-shadow: 1px 1px 0px #000000;
  z-index: 5;
  pointer-events: none;
}

/* ==========================================================================
   VIEW 2: IN-GAME WORKSPACE & CRAFTING TABLE GUI
   ========================================================================== */
#gameScreen {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background: 
    linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(10,15,20,0.85) 100%),
    url('https://minecraft.wiki/images/Dirt.png');
  background-size: cover, 64px 64px;
  opacity: 1;
  transition: opacity 0.3s;
}

#gameScreen.hidden {
  display: none;
}

/* Top Navigation Bar */
.mc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(20, 20, 20, 0.92);
  border-bottom: 4px solid #000000;
  box-shadow: inset 0 -2px 0px #373737;
  gap: 16px;
  flex-wrap: wrap;
}

.mc-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mc-topbar-title {
  font-size: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 0px #222222;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Search Bar (Minecraft Text Input Field) */
.mc-search-box {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.mc-search-input {
  width: 100%;
  background-color: #000000;
  color: #ffffff;
  font-family: var(--mc-font);
  font-size: 16px;
  padding: 10px 14px 10px 38px;
  border: 2px solid #a0a0a0;
  box-shadow: inset 2px 2px 0px #000000;
  outline: none;
  letter-spacing: 1px;
}

.mc-search-input:focus {
  border-color: #ffffff;
  box-shadow: inset 2px 2px 0px #222222, 0 0 6px rgba(255,255,255,0.4);
}

.mc-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
}

.mc-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #888888;
  font-family: var(--mc-font);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
}
.mc-search-clear:hover {
  color: #ffffff;
}

.mc-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Category Filter Bar */
.category-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 24px;
  background: rgba(30, 30, 30, 0.85);
  border-bottom: 2px solid #373737;
  scrollbar-width: thin;
}

.cat-tab {
  font-family: var(--mc-font);
  font-size: 13px;
  color: #b0b0b0;
  background: #4a4a4a;
  border: 2px solid #222222;
  box-shadow: inset 1px 1px 0px #707070, inset -1px -1px 0px #222222;
  padding: 6px 12px;
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.1s;
}

.cat-tab:hover {
  background: #606060;
  color: #ffffff;
}

.cat-tab.active {
  background: #8b8b8b;
  color: #ffff55;
  border-color: #000000;
  box-shadow: inset 2px 2px 0px #ffffff, inset -2px -2px 0px #373737;
}

/* ==========================================================================
   MAIN IN-GAME CONTAINER (Split View)
   ========================================================================== */
.mc-workspace-container {
  display: flex;
  flex: 1;
  padding: 24px;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* Left/Center: Crafting Table GUI Console */
.crafting-console-wrapper {
  flex: 0 0 auto;
  width: 620px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Minecraft Window Frame (Classic Beige/Gray Texture Frame) */
.mc-gui-window {
  background-color: var(--mc-gui-bg);
  border: 4px solid #000000;
  box-shadow: 
    inset 4px 4px 0px var(--mc-gui-border-light),
    inset -4px -4px 0px var(--mc-gui-border-dark),
    0 10px 30px rgba(0,0,0,0.6);
  padding: 16px 20px 20px 20px;
  color: #404040;
  position: relative;
}

.mc-gui-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mc-gui-title {
  font-size: 19px;
  font-weight: bold;
  color: #3f3f3f;
  text-shadow: 1px 1px 0px #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* External Navigation Bar outside Crafting Table (Top-left below categories) */
.crafting-external-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.crafting-external-nav .mc-btn.mc-btn-back {
  font-size: 14px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #5c5c5c 0%, #444444 100%);
  color: #ffffa0;
  border: 2px solid #000000;
  box-shadow: inset 2px 2px 0px #888888, inset -2px -2px 0px #222222;
  gap: 6px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.1s, transform 0.05s, box-shadow 0.05s;
}

.crafting-external-nav .mc-btn.mc-btn-back:hover {
  background: linear-gradient(180deg, #747474 0%, #525252 100%);
  color: #ffffff;
  box-shadow: inset 2px 2px 0px #ffffff, inset -2px -2px 0px #222222;
}

.crafting-external-nav .mc-btn.mc-btn-back:active {
  background: linear-gradient(180deg, #3a3a3a 0%, #484848 100%);
  box-shadow: inset -2px -2px 0px #888888, inset 2px 2px 0px #1a1a1a;
  transform: translateY(1px);
}

/* Highlighted state when there is a sub-recipe history to return to */
.crafting-external-nav .mc-btn.mc-btn-back.has-history {
  background: linear-gradient(180deg, #375973 0%, #253d50 100%);
  color: #a8e3ff;
  border-color: #000000;
  box-shadow: inset 2px 2px 0px #5c8fb8, inset -2px -2px 0px #13222e;
}

.crafting-external-nav .mc-btn.mc-btn-back.has-history:hover {
  background: linear-gradient(180deg, #487294 0%, #304e66 100%);
  color: #ffffff;
  box-shadow: inset 2px 2px 0px #ffffff, inset -2px -2px 0px #13222e;
}

.crafting-external-nav .mc-btn.mc-btn-back.has-history:active {
  background: linear-gradient(180deg, #1d3242 0%, #29455c 100%);
  box-shadow: inset -2px -2px 0px #5c8fb8, inset 2px 2px 0px #0b151c;
  transform: translateY(1px);
}

/* Recipe Book Toggle Button (Green Book Icon) */
.recipe-book-btn {
  background: linear-gradient(180deg, #5b9b37 0%, #3e6d24 100%);
  border: 2px solid #000000;
  box-shadow: inset 1px 1px 0px #85d654, inset -1px -1px 0px #243e15;
  color: #ffffff;
  font-family: var(--mc-font);
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-shadow: 1px 1px 0px #000000;
}
.recipe-book-btn:hover {
  filter: brightness(1.2);
}

/* Crafting Grid & Output Section */
.crafting-core-area {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.05);
  border: 2px solid #a0a0a0;
}

/* 3x3 Slots Grid */
.crafting-3x3-grid {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(3, 56px);
  gap: 4px;
}

/* Individual Minecraft Inventory/Crafting Slot */
.mc-slot {
  width: 56px;
  height: 56px;
  background-color: var(--mc-slot-bg);
  border: 3px solid #373737;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: inset 2px 2px 0px #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background-color 0.1s;
}

.mc-slot:hover {
  background-color: #9e9e9e;
}

.mc-slot::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0);
  transition: background-color 0.1s;
}

.mc-slot:hover::after {
  background-color: rgba(255, 255, 255, 0.25);
}

.mc-slot.filled {
  cursor: pointer;
}

/* Nested Craftable Item on 3x3 Grid (Hover to see recipe, click to open) */
.mc-slot.craftable-ingredient {
  border-color: #ffaa00;
  box-shadow: inset 2px 2px 0px #ffff55, 0 0 6px rgba(255, 170, 0, 0.6);
  position: relative;
}

.mc-slot.craftable-ingredient::before {
  content: '🔨';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(1px 1px 0px #000000);
  z-index: 2;
}

.mc-slot.craftable-ingredient:hover {
  background-color: #555520;
  box-shadow: inset 2px 2px 0px #ffffff, 0 0 10px rgba(255, 255, 85, 0.9);
}

/* Slot Item Image & Label */
.slot-item-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0px rgba(0,0,0,0.35));
}

.slot-item-name-chip {
  font-size: 11px;
  color: #ffffff;
  text-shadow: 1px 1px 0px #000000;
  text-align: center;
  word-break: keep-all;
  line-height: 1.1;
  pointer-events: none;
  padding: 2px;
}

/* Big Arrow In-between Grid and Result */
.crafting-arrow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.crafting-arrow {
  width: 48px;
  height: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crafting-arrow svg {
  width: 48px;
  height: 32px;
  filter: drop-shadow(1px 1px 0px #ffffff);
}

/* Result Slot (Large) */
.crafting-result-slot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mc-slot.result-slot {
  width: 76px;
  height: 76px;
  border-width: 4px;
  background-color: #8f8f8f;
}

.mc-slot.result-slot .slot-item-img {
  width: 56px;
  height: 56px;
}

.item-count-badge {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-family: var(--mc-font);
  font-size: 16px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 2px 2px 0px #000000;
  pointer-events: none;
}

/* Section Separator Label */
.inventory-section-label {
  font-size: 15px;
  font-weight: bold;
  color: #3f3f3f;
  text-shadow: 1px 1px 0px #ffffff;
  margin: 12px 0 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inventory-section-hint {
  font-size: 11px;
  color: #666666;
  font-weight: normal;
}

/* Hotbar Slots (9 slots: perfectly contained within 620px UI window) */
.hotbar-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}

.hotbar-grid .mc-slot {
  width: 100%;
  height: auto;
  min-width: 0;
  aspect-ratio: 1;
}

.hotbar-grid .mc-slot .slot-item-img {
  width: 68%;
  height: 68%;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
}

/* Recipe Details Card under GUI */
.recipe-details-card {
  background-color: rgba(25, 25, 25, 0.95);
  border: 3px solid #000000;
  box-shadow: inset 2px 2px 0px #444444, inset -2px -2px 0px #111111;
  padding: 16px 20px;
  color: #e0e0e0;
}

.recipe-details-title {
  font-size: 20px;
  color: #ffffff;
  text-shadow: 2px 2px 0px #000000;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recipe-badges-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mc-badge {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #000000;
  background: #333333;
  color: #ffff55;
  text-shadow: 1px 1px 0px #000000;
}

.mc-badge.badge-2x2 {
  background: #204060;
  color: #55ffff;
}

.mc-badge.badge-shaped {
  background: #403010;
  color: #ffaa00;
}

.recipe-ingredients-summary {
  font-size: 14px;
  margin-bottom: 10px;
  color: #a8e063;
  line-height: 1.5;
}

.recipe-desc-text {
  font-size: 13px;
  color: #cccccc;
  line-height: 1.6;
  border-top: 1px dashed #444444;
  padding-top: 8px;
}

/* ==========================================================================
   RIGHT PANEL: USAGE LOOKUP / RECIPE EXPLORER
   ========================================================================== */
.explorer-panel-wrapper {
  flex: 1;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.explorer-header-card {
  background: rgba(20, 20, 20, 0.95);
  border: 3px solid #000000;
  box-shadow: inset 2px 2px 0px #444444;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.explorer-header-title {
  font-size: 18px;
  color: #ffffff;
  text-shadow: 2px 2px 0px #000000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.explorer-count-badge {
  background: #55ff55;
  color: #000000;
  font-weight: bold;
  padding: 2px 8px;
  font-size: 13px;
  border-radius: 2px;
}

/* Recipe Grid Cards (List of items that can be crafted) */
.recipes-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
  padding-right: 6px;
  scrollbar-width: thin;
}

/* Individual Crafted Item Card */
.craftable-item-card {
  background: rgba(35, 35, 35, 0.9);
  border: 2px solid #000000;
  box-shadow: inset 2px 2px 0px #505050, inset -2px -2px 0px #181818;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s, border-color 0.1s, background-color 0.1s;
}

.craftable-item-card:hover {
  background-color: #4a4a4a;
  border-color: #ffff55;
  box-shadow: inset 2px 2px 0px #ffffff, inset -2px -2px 0px #222222, 0 0 10px rgba(255,255,85,0.4);
  transform: translateY(-2px);
}

.craftable-item-card:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset -2px -2px 0px #505050, inset 2px 2px 0px #181818;
}

.craftable-item-card.active {
  background-color: #3b5030;
  border-color: #55ff55;
  box-shadow: inset 2px 2px 0px #85d654, inset -2px -2px 0px #1c2b14;
}

.card-icon-frame {
  width: 48px;
  height: 48px;
  background-color: #1a1a1a;
  border: 2px solid #000000;
  box-shadow: inset 2px 2px 0px #0a0a0a, inset -1px -1px 0px #333333;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-icon-frame img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.card-item-title {
  font-size: 14px;
  color: #ffffff;
  text-shadow: 1px 1px 0px #000000;
  line-height: 1.2;
}

.card-item-category {
  font-size: 11px;
  color: #888888;
}

/* ==========================================================================
   MINECRAFT HOVER TOOLTIP WITH 3x3 MINI CRAFTING GRID
   (Instant Crafting Recipe Preview on Cursor Hover)
   ========================================================================== */
#mcHoverTooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  display: none;
  background-color: #100010;
  border: 3px solid #28007f;
  box-shadow: 
    inset 0 0 0 1px #5000ff,
    3px 3px 12px rgba(0, 0, 0, 0.9);
  padding: 12px 14px;
  max-width: 320px;
  min-width: 250px;
  color: #ffffff;
  font-family: var(--mc-font);
  border-radius: 4px;
  transition: opacity 0.05s ease;
}

.tooltip-title {
  font-size: 16px;
  color: var(--mc-yellow);
  text-shadow: 2px 2px 0px #3f3f00;
  margin-bottom: 4px;
}

.tooltip-sub {
  font-size: 11px;
  color: #aaaaaa;
  margin-bottom: 10px;
}

/* Mini 3x3 Grid inside Tooltip */
.tooltip-mini-crafting {
  background-color: #8b8b8b;
  border: 2px solid #373737;
  padding: 6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-3x3-grid {
  display: grid;
  grid-template-columns: repeat(3, 26px);
  grid-template-rows: repeat(3, 26px);
  gap: 2px;
}

.mini-slot {
  width: 26px;
  height: 26px;
  background-color: #6e6e6e;
  border: 1px solid #373737;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: inset 1px 1px 0px #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: #ffffff;
}

.mini-slot img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.mini-arrow {
  font-size: 16px;
  color: #373737;
  text-shadow: 1px 1px 0px #ffffff;
}

.mini-result-slot {
  width: 34px;
  height: 34px;
  background-color: #7a7a7a;
  border: 2px solid #373737;
  border-right-color: #ffffff;
  border-bottom-color: #ffffff;
  box-shadow: inset 1px 1px 0px #222222;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mini-result-slot img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.mini-count-badge {
  position: absolute;
  right: 1px;
  bottom: 0px;
  font-size: 10px;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 1px 1px 0px #000000;
}

.tooltip-ingredients {
  font-size: 12px;
  color: #55ff55;
  text-shadow: 1px 1px 0px #003300;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tooltip-action-hint {
  font-size: 11px;
  color: #ffff55;
  border-top: 1px solid #330066;
  padding-top: 6px;
  text-align: center;
}

/* ==========================================================================
   RESPONSIVENESS & SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #1e1e1e;
  border: 1px solid #000000;
}
::-webkit-scrollbar-thumb {
  background: #555555;
  border: 1px solid #000000;
  box-shadow: inset 1px 1px 0px #888888;
}
::-webkit-scrollbar-thumb:hover {
  background: #777777;
}

@media (max-width: 1024px) {
  .mc-workspace-container {
    flex-direction: column;
    align-items: center;
  }
  .crafting-console-wrapper {
    width: 100%;
    max-width: 620px;
  }
  .explorer-panel-wrapper {
    width: 100%;
  }
}

/* Muted state for sound toggle buttons */
.mc-btn.sound-muted {
  background: linear-gradient(180deg, #444444 0%, #303030 100%) !important;
  color: #aaaaaa !important;
  box-shadow: inset 1px 1px 0px #555555, inset -1px -1px 0px #1a1a1a !important;
  opacity: 0.85;
}

@media (max-width: 600px) {
  .title-main-content {
    gap: 20px;
    padding: 16px 0;
  }
  .title-footer {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    bottom: 8px;
    left: 12px;
    right: 12px;
    font-size: 11px;
  }
  .title-location-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    font-size: 11px;
  }
}

@media (max-height: 640px) {
  .title-main-content {
    gap: 16px;
    padding: 8px 0;
  }
  .title-logo-container {
    transform: scale(0.85);
    transform-origin: center top;
  }
}

