/* Hillsfar Web - Main Stylesheet */

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

body {
  background: #000;
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#canvas-container {
  position: relative;
  border: 2px solid #4444aa;
  box-shadow: 0 0 20px #2222aa, 0 0 40px #111155;
}

#main-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#hud-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

#controls {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}

#controls button {
  background: #1a1a4a;
  color: #aaaaff;
  border: 1px solid #4444aa;
  padding: 4px 12px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.1s;
}

#controls button:hover {
  background: #2a2a6a;
  color: #ffffff;
}

#controls button:active {
  background: #4444aa;
}

#lang-switcher {
  background: #1a1a4a;
  color: #aaaaff;
  border: 1px solid #4444aa;
  padding: 4px 8px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  font-size: 12px;
}

#message-bar {
  font-size: 11px;
  color: #ffff88;
  text-align: center;
  min-height: 18px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px #aaaa00;
}

#loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#loading h1 {
  font-size: 48px;
  color: #ffff00;
  text-shadow: 0 0 20px #aaaa00;
  letter-spacing: 8px;
  margin-bottom: 20px;
}

#loading p {
  color: #aaaaff;
  font-size: 14px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Touch controls for mobile */
#touch-controls {
  display: none;
  grid-template-columns: repeat(3, 60px);
  grid-template-rows: repeat(3, 60px);
  gap: 4px;
  margin-top: 8px;
}

#touch-controls button {
  background: #1a1a4a;
  color: #aaaaff;
  border: 1px solid #4444aa;
  font-size: 24px;
  cursor: pointer;
  border-radius: 4px;
  touch-action: manipulation;
}

#touch-controls button:active {
  background: #4444aa;
}

@media (max-width: 768px) or (pointer: coarse) {
  #touch-controls { display: grid; }
}

/* Dialog overlay */
#dialog-overlay {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 30, 0.95);
  border: 2px solid #4444aa;
  padding: 16px;
  min-width: 300px;
  max-width: 480px;
  z-index: 10;
}

#dialog-overlay.active {
  display: block;
}
