/* Minecraft Christmas Edition - Complete Styles */

/* Pixel Font */
@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Minecraft Colors */
  --mc-green: #55aa55;
  --mc-green-dark: #2d5a2d;
  --mc-brown: #8b5a2b;
  --mc-brown-dark: #5d3a1a;
  --mc-gray: #8a8a8a;
  --mc-dark: #1a1a1a;
  --mc-white: #ffffff;
  --mc-red: #ff5555;
  --mc-blue: #5555ff;

  /* UI Colors */
  --ui-bg: rgba(0, 0, 0, 0.7);
  --ui-border: #c6c6c6;
  --slot-bg: #8b8b8b;
  --slot-hover: #a0a0a0;
  --slot-selected: #ffffff;
}

body {
  font-family: "Press Start 2P", cursive;
  background: #1a1a2e;
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Sky with Day/Night Cycle */
.sky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #87ceeb 0%, #b0e0e6 50%, #e0f6ff 100%);
  z-index: -2;
  animation: skyCycle 120s linear infinite;
}

@keyframes skyCycle {
  0% {
    background: linear-gradient(180deg, #1a1a2e 0%, #2d3436 100%);
  }
  25% {
    background: linear-gradient(180deg, #87ceeb 0%, #b0e0e6 100%);
  }
  50% {
    background: linear-gradient(180deg, #ff9f43 0%, #feca57 50%, #87ceeb 100%);
  }
  75% {
    background: linear-gradient(180deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
  }
  100% {
    background: linear-gradient(180deg, #1a1a2e 0%, #2d3436 100%);
  }
}

/* Weather Container */
.weather-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
}

.weather-particle {
  position: absolute;
  animation: weatherFall linear infinite;
}

@keyframes weatherFall {
  0% {
    transform: translateY(-10px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0.3;
  }
}

/* Main Game World */
.game-world {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

/* HUD (Heads-Up Display) */
.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  padding: 15px;
  background: var(--ui-bg);
  border-radius: 8px;
  margin-bottom: 20px;
  border: 3px solid var(--ui-border);
}

.stat-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: var(--slot-bg);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.3),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

.bar-fill {
  width: 100px;
  height: 12px;
  background: linear-gradient(180deg, #ff5555 0%, #aa0000 100%);
  border: 2px solid #000;
  transition: width 0.3s;
}

.health-bar .bar-fill {
  background: linear-gradient(180deg, #ff5555 0%, #aa0000 100%);
}

.hunger-bar .bar-fill {
  background: linear-gradient(180deg, #ffaa00 0%, #aa7700 100%);
}

.armor-bar .bar-fill {
  background: linear-gradient(180deg, #aaddff 0%, #6699cc 100%);
}

.bar-icon {
  font-size: 14px;
}

.bar-text {
  font-size: 8px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

/* XP Bar */
.xp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid #555;
  border-radius: 4px;
}

.xp-fill {
  width: 150px;
  height: 8px;
  background: linear-gradient(90deg, #55ffff 0%, #00aaaa 50%, #55ffff 100%);
  border: 2px solid #000;
}

.xp-level {
  font-size: 10px;
  color: #ffff55;
  text-shadow: 2px 2px 0 #000;
}

/* Time Display */
.time-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  font-size: 10px;
  margin-left: auto;
}

#timeIcon {
  font-size: 14px;
}

/* Hotbar */
.hotbar {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: var(--ui-bg);
  border: 3px solid var(--ui-border);
  border-radius: 8px;
  margin-bottom: 20px;
  justify-content: center;
}

.hotbar-slot {
  width: 50px;
  height: 50px;
  background: var(--slot-bg);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.3),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  cursor: pointer;
  transition: all 0.1s;
}

.hotbar-slot:hover {
  background: var(--slot-hover);
}

.hotbar-slot.selected {
  background: var(--slot-selected);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.hotbar-slot.selected::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 3px solid #fff;
  border-radius: 4px;
}

.slot-number {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 8px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

/* Crosshair */
.crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  pointer-events: none;
  z-index: 1000;
}

/* World Title */
.world-title {
  text-align: center;
  padding: 30px;
}

.world-title h1 {
  font-size: 3rem;
  text-shadow: 4px 4px 0 #000;
  letter-spacing: 4px;
}

.mc-logo {
  color: var(--mc-green);
  text-shadow: 4px 4px 0 var(--mc-green-dark);
}

.craft-logo {
  color: var(--mc-brown);
  text-shadow: 4px 4px 0 var(--mc-brown-dark);
}

.christmas-subtitle {
  margin-top: 15px;
  font-size: 1rem;
  color: var(--mc-red);
  text-shadow: 2px 2px 0 #000;
}

/* Scene / Chunk */
.scene {
  perspective: 1000px;
  margin: 30px 0;
}

.chunk {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 600px;
  transform-style: preserve-3d;
  transform: rotateX(60deg) rotateZ(45deg);
}

/* Ground Layers */
.layer {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 3px solid #000;
}

.layer-bedrock {
  bottom: -40px;
  width: 300px;
  height: 20px;
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
}

.layer-stone {
  bottom: -20px;
  width: 300px;
  height: 30px;
  background: linear-gradient(
    135deg,
    var(--mc-gray) 0%,
    #6a6a6a 50%,
    var(--mc-gray) 100%
  );
}

.layer-dirt {
  bottom: 10px;
  width: 300px;
  height: 25px;
  background: linear-gradient(180deg, #8b6914 0%, #654321 100%);
}

.layer-snow {
  bottom: 35px;
  width: 300px;
  height: 15px;
  background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
  box-shadow: 0 5px 20px rgba(255, 255, 255, 0.5);
}

/* Minecraft Christmas Tree */
.tree-container {
  position: relative;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
}

.tree-leaves {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--mc-green);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border: 3px solid #0a3d0a;
  box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.2);
}

.layer-leaf-1 {
  bottom: 200px;
  width: 40px;
  height: 35px;
  background: linear-gradient(180deg, #1e7b1e 0%, #2d9b2d 100%);
}

.layer-leaf-2 {
  bottom: 165px;
  width: 70px;
  height: 45px;
  background: linear-gradient(180deg, #2d8b2d 0%, #3dab3d 100%);
}

.layer-leaf-3 {
  bottom: 120px;
  width: 100px;
  height: 55px;
  background: linear-gradient(180deg, #1e7b1e 0%, #2d9b2d 100%);
}

.layer-leaf-4 {
  bottom: 70px;
  width: 130px;
  height: 60px;
  background: linear-gradient(180deg, #3dab3d 0%, #4dba4d 100%);
}

.layer-leaf-5 {
  bottom: 15px;
  width: 160px;
  height: 65px;
  background: linear-gradient(180deg, #1e7b1e 0%, #2d9b2d 100%);
}

.tree-trunk {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  background: linear-gradient(
    90deg,
    var(--mc-brown-dark) 0%,
    var(--mc-brown) 50%,
    var(--mc-brown-dark) 100%
  );
  border: 3px solid #2d1a0a;
}

/* Ornaments */
.ornament-mc {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  border-radius: 50%;
  animation: ornamentGlow 1.5s ease-in-out infinite alternate;
}

.ornament-mc::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background: #444;
}

@keyframes ornamentGlow {
  0% {
    box-shadow: 0 0 5px currentColor;
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
    transform: scale(1.1);
  }
}

.o1 {
  bottom: 180px;
  left: calc(50% - 30px);
  background: #ff0000;
  color: #ff0000;
  animation-delay: 0s;
}

.o2 {
  bottom: 150px;
  left: calc(50% + 20px);
  background: #ffd700;
  color: #ffd700;
  animation-delay: 0.2s;
}

.o3 {
  bottom: 110px;
  left: calc(50% - 45px);
  background: #00ff00;
  color: #00ff00;
  animation-delay: 0.4s;
}

.o4 {
  bottom: 80px;
  left: calc(50% + 35px);
  background: #ff0000;
  color: #ff0000;
  animation-delay: 0.6s;
}

.o5 {
  bottom: 45px;
  left: calc(50% - 25px);
  background: #00ffff;
  color: #00ffff;
  animation-delay: 0.8s;
}

.o6 {
  bottom: 25px;
  left: calc(50% + 40px);
  background: #ff00ff;
  color: #ff00ff;
  animation-delay: 1s;
}

.o7 {
  bottom: 85px;
  left: calc(50% - 55px);
  background: #ffd700;
  color: #ffd700;
  animation-delay: 0.3s;
}

.o8 {
  bottom: 55px;
  left: calc(50% + 10px);
  background: #ff0000;
  color: #ff0000;
  animation-delay: 0.7s;
}

/* Tree Star */
.tree-star {
  position: absolute;
  bottom: 245px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: #ffd700;
  animation: starPulse 1s ease-in-out infinite alternate,
    starSpin 4s linear infinite;
  filter: drop-shadow(0 0 15px #ffd700) drop-shadow(0 0 30px #ffaa00);
  text-shadow: 0 0 20px #ffd700;
}

@keyframes starPulse {
  0% {
    transform: translateX(-50%) scale(1);
    filter: drop-shadow(0 0 15px #ffd700);
  }
  100% {
    transform: translateX(-50%) scale(1.3);
    filter: drop-shadow(0 0 30px #ffd700) drop-shadow(0 0 50px #ffaa00);
  }
}

@keyframes starSpin {
  0% {
    filter: drop-shadow(0 0 15px #ffd700) hue-rotate(0deg);
  }
  100% {
    filter: drop-shadow(0 0 15px #ffd700) hue-rotate(360deg);
  }
}

/* Gift Boxes */
.gift-mc {
  position: absolute;
  border: 3px solid #000;
  transform-style: preserve-3d;
  animation: giftBounce 2s ease-in-out infinite;
}

.gift-mc::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 50%
  );
}

.g1 {
  bottom: -25px;
  left: calc(50% - 100px);
  width: 35px;
  height: 30px;
  background: linear-gradient(180deg, #cc0000 0%, #990000 100%);
  animation-delay: 0s;
}

.g2 {
  bottom: -20px;
  left: calc(50% + 60px);
  width: 40px;
  height: 35px;
  background: linear-gradient(180deg, #228b22 0%, #006400 100%);
  animation-delay: 0.3s;
}

.g3 {
  bottom: -30px;
  left: calc(50% - 70px);
  width: 30px;
  height: 25px;
  background: linear-gradient(180deg, #4169e1 0%, #0000cd 100%);
  animation-delay: 0.6s;
}

.g4 {
  bottom: -28px;
  left: calc(50% + 80px);
  width: 38px;
  height: 32px;
  background: linear-gradient(180deg, #ffd700 0%, #daa520 100%);
  animation-delay: 0.9s;
}

.gift-ribbon-mc {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 6px;
  background: #fff;
  transform: translateY(-50%);
}

.gift-ribbon-mc::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 100%;
  background: #fff;
  transform: translate(-50%, -50%);
}

@keyframes giftBounce {
  0%,
  100% {
    transform: translateY(0) rotateY(0deg);
  }
  50% {
    transform: translateY(-8px) rotateY(15deg);
  }
}

/* Snowmen */
.snowman-mc {
  position: absolute;
  bottom: -15px;
  width: 30px;
  height: 60px;
  background: linear-gradient(135deg, #fff 0%, #e8e8e8 50%, #d0d0d0 100%);
  border: 3px solid #000;
  border-radius: 50%;
}

.snowman-mc::before {
  content: "";
  position: absolute;
  bottom: 20px;
  left: -8px;
  width: 46px;
  height: 35px;
  background: inherit;
  border: 3px solid #000;
  border-radius: 50%;
}

.snowman-mc::after {
  content: "";
  position: absolute;
  bottom: 35px;
  left: 2px;
  width: 26px;
  height: 26px;
  background: inherit;
  border: 3px solid #000;
  border-radius: 50%;
}

.sm1 {
  left: calc(50% - 120px);
  animation: snowmanBob 1.5s ease-in-out infinite;
}

.sm2 {
  left: calc(50% + 90px);
  animation: snowmanBob 1.5s ease-in-out infinite 0.5s;
}

@keyframes snowmanBob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Mobs */
.mob {
  position: absolute;
  bottom: -10px;
  animation: mobWalk 2s ease-in-out infinite;
}

.mob::before {
  content: "";
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 15px;
  border: 2px solid #000;
  border-radius: 50%;
}

.mob-pig {
  left: calc(50% - 150px);
  width: 35px;
  height: 25px;
  background: #ffb6c1;
  border: 3px solid #000;
  border-radius: 40% 40% 50% 50%;
}

.mob-pig::before {
  bottom: 15px;
  width: 10px;
  height: 8px;
  background: #ffb6c1;
}

.mob-cow {
  left: calc(50% + 110px);
  width: 40px;
  height: 30px;
  background: #8b4513;
  border: 3px solid #000;
  border-radius: 40% 40% 50% 50%;
}

.mob-cow::before {
  background: #8b4513;
}

.mob-christmas-creeper {
  left: calc(50% + 30px);
  width: 30px;
  height: 50px;
  background: linear-gradient(180deg, #00aa00 0%, #008800 100%);
  border: 3px solid #000;
  border-radius: 20% 20% 50% 50%;
}

.mob-christmas-creeper::before {
  display: none;
}

.mob-christmas-creeper::after {
  content: "🎄";
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
}

@keyframes mobWalk {
  0%,
  100% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
}

/* Section Titles */
.section-title {
  font-size: 1.2rem;
  color: #fff;
  text-shadow: 3px 3px 0 #000;
  margin: 30px 0 20px;
  text-align: center;
  padding: 10px;
  background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
  border: 4px solid #3d2817;
  box-shadow: 4px 4px 0 #000;
}

/* Crafting Section */
.crafting-section {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 8px;
  border: 3px solid #8b4513;
  margin-bottom: 30px;
}

.crafting-grid {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  gap: 5px;
  justify-content: center;
  margin: 20px 0;
}

.craft-slot {
  width: 60px;
  height: 60px;
  background: var(--slot-bg);
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.3),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

.craft-slot.center {
  background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
}

.craft-arrow {
  font-size: 2rem;
  text-align: center;
  margin: 10px 0;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

.craft-result {
  text-align: center;
}

.result-slot {
  display: inline-block;
  width: 80px;
  height: 80px;
  background: var(--slot-bg);
  border: 4px solid #ffd700;
  border-radius: 8px;
  line-height: 80px;
  font-size: 2.5rem;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.craft-hint {
  text-align: center;
  margin-top: 15px;
  font-size: 0.7rem;
  color: #aaa;
  text-shadow: 1px 1px 0 #000;
}

/* Recipe Section */
.recipe-section {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 8px;
  border: 3px solid #654321;
  margin-bottom: 30px;
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.recipe-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
  border: 3px solid #3d2817;
  box-shadow: 3px 3px 0 #000;
}

.recipe-icon {
  font-size: 2rem;
}

.recipe-name {
  flex: 1;
  font-size: 0.7rem;
  color: #f0d090;
}

.recipe-craft {
  font-size: 0.5rem;
  color: #aaa;
}

/* Achievement Section */
.achievement-section {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 8px;
  border: 3px solid #ffd700;
  margin-bottom: 30px;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.achievement {
  padding: 15px;
  background: #555;
  border: 3px solid #333;
  text-align: center;
  opacity: 0.5;
  transition: all 0.3s;
}

.achievement.unlocked {
  opacity: 1;
  background: linear-gradient(180deg, #ffd700 0%, #daa520 100%);
  border-color: #b8860b;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.ach-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.ach-name {
  font-size: 0.6rem;
  color: #000;
  text-shadow: none;
}

/* Stats Section */
.stats-section {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 8px;
  border: 3px solid #5555ff;
  margin-bottom: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.stat-item {
  padding: 15px;
  background: linear-gradient(180deg, #2d2d2d 0%, #1a1a1a 100%);
  border: 3px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: 0.6rem;
  color: #aaa;
}

.stat-value {
  font-size: 0.8rem;
  color: #ffff55;
  text-shadow: 2px 2px 0 #000;
}

/* Controls Section */
.controls-section {
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 8px;
  border: 3px solid #55aa55;
  margin-bottom: 30px;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: rgba(85, 170, 85, 0.2);
  border: 2px solid #55aa55;
}

.key {
  padding: 8px 12px;
  background: linear-gradient(180deg, #8b8b8b 0%, #6a6a6a 100%);
  border: 2px solid #000;
  border-radius: 4px;
  font-size: 0.7rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.3),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

.action {
  font-size: 0.6rem;
  color: #ccc;
}

/* Chat Container */
.chat-container {
  position: fixed;
  bottom: 80px;
  left: 20px;
  width: 350px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.chat-message {
  padding: 8px 12px;
  margin-bottom: 5px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 4px;
  font-size: 0.7rem;
  text-shadow: 1px 1px 0 #000;
  animation: chatFadeIn 0.3s ease-out;
}

.chat-message.system {
  color: #ffff55;
}

@keyframes chatFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Command Input */
.command-input-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  z-index: 100;
}

#commandInput {
  width: 100%;
  padding: 12px 15px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.7);
  border: 3px solid #555;
  border-radius: 4px;
  color: #fff;
  outline: none;
}

#commandInput:focus {
  border-color: #55aa55;
  box-shadow: 0 0 10px rgba(85, 170, 85, 0.5);
}

#commandInput::placeholder {
  color: #888;
}

/* Action Bar */
.action-bar {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  font-size: 0.7rem;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 100;
}

.action-bar.show {
  opacity: 1;
}

/* Inventory Modal */
.inventory-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.inventory-modal.show {
  display: flex;
}

.inventory-container {
  background: linear-gradient(180deg, #c6c6c6 0%, #8b8b8b 100%);
  padding: 20px;
  border: 4px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.inventory-title {
  text-align: center;
  padding: 10px;
  background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
  color: #fff;
  font-size: 1rem;
  border: 3px solid #3d2817;
  margin-bottom: 15px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(9, 50px);
  gap: 4px;
}

.inv-slot {
  width: 50px;
  height: 50px;
  background: #8b8b8b;
  border: 3px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.3),
    inset -2px -2px 0 rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.1s;
}

.inv-slot:hover {
  background: #a0a0a0;
}

.inv-item {
  font-size: 1.8rem;
}

/* Death Screen */
.death-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 3000;
  justify-content: center;
  align-items: center;
}

.death-screen.show {
  display: flex;
}

.death-content {
  text-align: center;
}

.death-content h2 {
  font-size: 3rem;
  color: #ff0000;
  text-shadow: 4px 4px 0 #8b0000;
  margin-bottom: 20px;
}

.death-content p {
  font-size: 1rem;
  color: #fff;
  margin-bottom: 30px;
}

.respawn-btn {
  padding: 15px 30px;
  font-family: "Press Start 2P", cursive;
  font-size: 1rem;
  background: linear-gradient(180deg, #55aa55 0%, #2d5a2d 100%);
  border: 4px solid #1a3a1a;
  color: #fff;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: all 0.1s;
}

.respawn-btn:hover {
  background: linear-gradient(180deg, #66bb66 0%, #3d6a3d 100%);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

.respawn-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

/* Debug Screen */
.debug-screen {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  font-size: 0.6rem;
  font-family: monospace;
  color: #fff;
  z-index: 4000;
  line-height: 1.6;
}

.debug-screen.show {
  display: block;
}

.debug-row {
  white-space: nowrap;
}

/* Particles Container */
.particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 500;
}

.particle-mc {
  position: absolute;
  animation: particleFloat 1s ease-out forwards;
  pointer-events: none;
}

@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.5) translateY(-50px);
  }
}

/* Mob Spawner */
.mob-spawner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

/* Sound Toggle */
.sound-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 100;
  transition: all 0.2s;
}

.sound-toggle:hover {
  background: rgba(85, 170, 85, 0.6);
  transform: scale(1.1);
}

/* Floating Particles (Ambient) */
.floating-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.floating-particle {
  position: absolute;
  animation: floatUp 10s linear infinite;
  opacity: 0.6;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .world-title h1 {
    font-size: 2rem;
  }

  .christmas-subtitle {
    font-size: 0.8rem;
  }

  .hotbar {
    flex-wrap: wrap;
  }

  .hotbar-slot {
    width: 40px;
    height: 40px;
  }

  .crafting-grid {
    grid-template-columns: repeat(3, 50px);
  }

  .craft-slot {
    width: 50px;
    height: 50px;
  }

  .chat-container {
    width: 280px;
    left: 10px;
  }

  .command-input-container {
    width: 300px;
  }

  .inventory-grid {
    grid-template-columns: repeat(5, 50px);
  }
}

@media (max-width: 480px) {
  .world-title h1 {
    font-size: 1.5rem;
  }

  .hud {
    flex-direction: column;
    align-items: center;
  }

  .stat-bar {
    width: 100%;
    justify-content: center;
  }

  .bar-fill {
    width: 80px;
  }

  .hotbar-slot {
    width: 35px;
    height: 35px;
  }

  .recipe-list,
  .achievement-grid,
  .stats-grid,
  .controls-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border: 2px solid #333;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* Selection */
::selection {
  background: rgba(85, 170, 85, 0.5);
  color: #fff;
}
