:root {
  --bg-dark: #05070d;
  --panel-bg: rgba(15, 23, 42, 0.9);
  --panel-border: rgba(245, 158, 11, 0.4);
  --accent-cyan: #06b6d4;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  font-family: 'Cinzel', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-main);
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  z-index: 1;
}

#fps-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  color: var(--accent-gold);
  font-weight: 900;
  pointer-events: none;
  z-index: 15;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.9);
}

#interaction-prompt {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  pointer-events: none;
  z-index: 25;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Warhammer Gothic Glassmorphism UI Panels */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid var(--panel-border);
  border-radius: 6px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.85);
  z-index: 10;
}

/* MINIMAP HUD WIDGET */
#minimap-container {
  position: absolute;
  top: 240px;
  right: 16px;
  width: 160px;
  padding: 10px;
  z-index: 20;
  border-color: var(--accent-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
}

#minimap-canvas {
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
  background: rgba(15, 23, 42, 0.95);
}

/* TOP HUD BAR */
#top-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 64px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.stat-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-bar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 140px;
}

.stat-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
}

.bar-bg {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.bar-hp { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.bar-armour { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.bar-xp { background: linear-gradient(90deg, #d97706, #f59e0b); }
.bar-nafis { background: linear-gradient(90deg, #10b981, #34d399); }

/* WARHAMMER ACTION BAR (Skills 1-4) */
#warcraft-actionbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  z-index: 20;
}

.action-skill {
  width: 60px;
  height: 60px;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid var(--accent-gold);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-skill:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
}

.skill-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 11px;
  font-weight: 900;
  color: var(--accent-gold);
}

.skill-name {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  margin-top: 10px;
  text-align: center;
}

#quest-widget {
  position: absolute;
  top: 90px;
  right: 16px;
  width: 280px;
  padding: 12px 16px;
  z-index: 20;
  border-color: var(--accent-gold);
  transition: all 0.3s ease;
}

#quest-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  width: 560px;
  max-width: 90vw;
  max-height: 80vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #ef4444;
}

/* BUTTONS & INPUTS */
.btn {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  border: 1px solid var(--accent-gold);
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #b45309);
  color: #05070d;
}

.btn-gold:hover {
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
}

.input-field {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-gold);
  padding: 10px 14px;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  width: 100%;
}

.input-field:focus {
  outline: none;
  border-color: var(--accent-cyan);
}

/* DIALOGUE STYLES */
.dialogue-text {
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #e2e8f0;
}

.dialogue-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.opt-btn {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-gold);
  padding: 12px 16px;
  border-radius: 4px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.opt-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  transform: translateX(6px);
}

/* CRAFTING ITEMS */
.recipe-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--accent-gold);
  padding: 12px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.recipe-info h4 {
  font-size: 15px;
  color: var(--accent-gold);
}

.recipe-info p {
  font-size: 12px;
  color: var(--text-muted);
}

/* CHAT BOX */
#chat-box {
  position: absolute;
  bottom: 90px;
  left: 16px;
  width: 320px;
  height: 180px;
  display: flex;
  flex-direction: column;
  padding: 10px;
  z-index: 20;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-msg {
  color: #cbd5e1;
}

.chat-msg strong {
  color: var(--accent-gold);
}
