/* Minecraft Style CSS */
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: 'VT323', monospace;
  background: #1a1a1a;
  color: #ffffff;
  overflow: hidden;
  cursor: default;
}

/* Main Menu */
#main-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2d5016 0%, #1a3a0a 50%, #0d1f05 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(93, 140, 58, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(93, 140, 58, 0.3) 0%, transparent 50%);
}

.minecraft-logo {
  font-size: 72px;
  font-weight: bold;
  color: #4a7c2a;
  text-shadow: 
    4px 4px 0px #2d5016,
    -2px -2px 0px #6b8e3a,
    0 0 20px rgba(93, 140, 58, 0.5);
  margin-bottom: 10px;
  letter-spacing: 4px;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.subtitle {
  font-size: 24px;
  color: #a0c878;
  margin-bottom: 60px;
  text-shadow: 2px 2px 0px #2d5016;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 300px;
}

.minecraft-btn {
  font-family: 'VT323', monospace;
  font-size: 24px;
  padding: 12px 24px;
  border: 3px solid #555;
  background: linear-gradient(180deg, #7a7a7a 0%, #555555 100%);
  color: white;
  cursor: pointer;
  transition: all 0.1s;
  text-shadow: 2px 2px 0px #333;
  position: relative;
  overflow: hidden;
}

.minecraft-btn:hover {
  background: linear-gradient(180deg, #8a8a8a 0%, #666666 100%);
  border-color: #888;
  transform: scale(1.02);
}

.minecraft-btn:active {
  background: linear-gradient(180deg, #555555 0%, #444444 100%);
  transform: scale(0.98);
}

.minecraft-btn.primary {
  background: linear-gradient(180deg, #5d8c3a 0%, #4a7c2a 100%);
  border-color: #4a7c2a;
}

.minecraft-btn.primary:hover {
  background: linear-gradient(180deg, #6b9e4a 0%, #5a8c3a 100%);
  border-color: #5d8c3a;
}

.minecraft-btn.warning {
  background: linear-gradient(180deg, #c84040 0%, #a83030 100%);
  border-color: #a83030;
}

.minecraft-btn.warning:hover {
  background: linear-gradient(180deg, #d85050 0%, #b84040 100%);
  border-color: #c84040;
}

.minecraft-btn.large {
  font-size: 28px;
  padding: 16px 32px;
}

.version-info {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 14px;
  color: #888;
}

.copyright {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 14px;
  color: #888;
}

/* Game Container */
#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#game-container canvas {
  display: block;
}

/* Crosshair */
#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crosshair-lines {
  position: relative;
  width: 100%;
  height: 100%;
}

.crosshair-lines::before,
.crosshair-lines::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
}

.crosshair-lines::before {
  width: 2px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.crosshair-lines::after {
  width: 100%;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

/* HUD */
#game-ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  display: none;
}

/* Hotbar */
#hotbar-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#hotbar {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px;
  border-radius: 4px;
}

.hotbar-slot {
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.1s;
}

.hotbar-slot.selected {
  border-color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.block-preview {
  width: 32px;
  height: 32px;
  border-radius: 2px;
}

.slot-number {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 12px;
  color: #aaa;
  text-shadow: 1px 1px 0 #000;
}

/* Status Bars */
#status-bars {
  position: absolute;
  bottom: 80px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#health-bar, #hunger-bar, #xp-bar {
  display: flex;
  gap: 2px;
  font-size: 16px;
}

.heart, .hunger {
  text-shadow: 1px 1px 0 #000;
}

.heart.full, .hunger.full { color: #ff3333; }
.heart.half { color: #ff6666; }
.heart.empty { color: #333; }

.hunger.full { color: #ff9933; }
.hunger.half { color: #ffcc66; }
.hunger.empty { color: #333; }

#xp-bar {
  color: #00ff00;
  font-size: 14px;
  text-shadow: 1px 1px 0 #000;
}

/* Coordinates */
#coordinates-display {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 16px;
  color: #ddd;
  text-shadow: 1px 1px 0 #000;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 4px;
}

/* FPS Counter */
#fps-counter {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 14px;
  color: #aaa;
  text-shadow: 1px 1px 0 #000;
}

/* Notification */
#notification {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 16px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Pause Menu */
#pause-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  gap: 12px;
}

.pause-title {
  font-size: 48px;
  color: #fff;
  text-shadow: 3px 3px 0 #333;
  margin-bottom: 20px;
}

.pause-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 280px;
}

/* Loading Screen */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.loading-text {
  font-size: 32px;
  color: #fff;
  margin-bottom: 20px;
}

.loading-bar {
  width: 400px;
  height: 24px;
  border: 3px solid #555;
  background: #333;
  position: relative;
}

.loading-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #5d8c3a, #6b9e4a);
  width: 0%;
  transition: width 0.3s;
}

.loading-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
}

/* Death Screen */
#death-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(139, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 400;
}

.death-title {
  font-size: 56px;
  color: #ff3333;
  text-shadow: 4px 4px 0 #330000;
  margin-bottom: 20px;
}

.death-score {
  font-size: 24px;
  color: #ffcccc;
  margin-bottom: 30px;
}

/* Debug Info */
#debug-info {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 12px;
  color: #aaa;
  text-shadow: 1px 1px 0 #000;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 4px;
  display: none;
  line-height: 1.5;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #333;
}

::-webkit-scrollbar-thumb {
  background: #666;
  border: 2px solid #333;
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* Inventory */
#inventory-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

#inventory {
  width: 600px;
  background: rgba(0, 0, 0, 0.8);
  border: 4px solid #555;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inventory-title {
  font-size: 28px;
  color: #fff;
  text-align: center;
  text-shadow: 2px 2px 0 #333;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
}

.inventory-slot {
  aspect-ratio: 1;
  background: rgba(100, 100, 100, 0.3);
  border: 2px solid #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inventory-slot:hover {
  border-color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .minecraft-logo {
    font-size: 48px;
  }
  
  .menu-buttons {
    width: 250px;
  }
  
  .minecraft-btn {
    font-size: 20px;
    padding: 10px 20px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

/* Tooltip */
.tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #555;
  padding: 8px 12px;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  z-index: 1000;
}

/* Particle effects */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #fff;
  pointer-events: none;
}

/* Block highlight */
.block-highlight {
  position: absolute;
  border: 3px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 100;
}

/* Chat */
#chat-container {
  position: absolute;
  bottom: 120px;
  left: 20px;
  width: 400px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-message {
  font-size: 16px;
  color: #fff;
  text-shadow: 1px 1px 0 #000;
  word-wrap: break-word;
}

.chat-message.system {
  color: #aaa;
}

.chat-message.player {
  color: #ffcc00;
}

/* Damage overlay */
#damage-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 50%, rgba(255, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.2s;
}
