/* ==========================================================================
   VARIÁVEIS GLOBAIS DE TEMA E UI PADRÃO AAA
   ========================================================================== */
:root {
  --gold: #c9a959;
  --gold-bright: #e6b450;
  --bg-glass: rgba(0, 0, 0, 0.6);
  --bg-darker: rgba(0, 0, 0, 0.5);
  --blur-effect: blur(4px);
  --font-main: 'Segoe UI', 'Cinzel', 'Georgia', serif;
}

/* Reset Básico */
body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-main);
  overflow: hidden;
  color: #fff;
  user-select: none;
}

/* ==========================================================================
   CAMADA DA UI E CONTROLE DE EVENTOS DE PONTEIRO
   ========================================================================== */
.ui-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10;
  /* Fundamental: Deixa os cliques passarem direto para o canvas 3D */
  pointer-events: none; 
}
.interactive {
  /* Reativa os cliques apenas nos blocos reais de UI */
  pointer-events: auto; 
}

/* ==========================================================================
   ÁREA 1: HUD SUPERIOR ESQUERDO (STATUS E BUFFS)
   ========================================================================== */
.hud-container {
  position: fixed;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Coluna Esquerda: Status do Jogador */
.player-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-effect);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 12px;
  box-shadow: inset 0 0 10px rgba(201, 169, 89, 0.1);
}

/* Cabeçalho */
.player-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.player-level {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--gold);
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 2px;
  color: #fff;
}
.player-name {
  color: var(--gold-bright);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 0 4px rgba(230, 180, 80, 0.4);
}

/* Barras de Status */
.bars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bar-label {
  width: 40px;
  font-size: 10px;
  text-transform: uppercase;
  color: #ccc;
  text-align: right;
  letter-spacing: 1px;
}
.bar-bg {
  width: 200px;
  height: 10px;
  background: var(--bg-darker);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
}
.fill-chi { width: 100%; background: #cc3333; }
.fill-mana { width: 80%; background: #3a6ea5; }
.fill-cosmo { width: 60%; background: #4c8c4a; }
.fill-xp { width: 20%; background: rgba(170,170,170,0.7); }

/* Coluna Direita: Grade de Buffs */
.buff-grid {
  display: grid;
  grid-template-columns: repeat(6, 36px);
  grid-template-rows: repeat(2, 36px);
  gap: 4px;
}
.buff-slot {
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(201, 169, 89, 0.3);
  border-radius: 2px;
  backdrop-filter: var(--blur-effect);
}

/* ==========================================================================
   ÁREA 2: BARRA INFERIOR DE AÇÕES (HOTBAR)
   ========================================================================== */
.hotbar-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: flex-end; /* Mantém espaço livre na esquerda para o Chat */
  align-items: flex-end;
  gap: 16px;
}

.hotbar-group {
  display: flex;
  gap: 6px;
}

/* Estilos Genéricos de Botões do Hotbar */
.btn {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-effect);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: bold;
  font-size: 14px;
}
.btn:hover {
  background: rgba(30, 30, 30, 0.8);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Grupo 1: Perícias (Borda Azulada/Dourada) */
.btn-skill {
  width: 64px;
  height: 64px;
  border: 1px solid #7a8fb0;
  border-radius: 4px;
}
.btn-skill:hover { border-color: var(--gold); color: var(--gold-bright); }

/* Grupo 2: Habilidades (Esfumaçado sutil) */
.btn-ability {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.btn-ability:hover { border-color: rgba(255,255,255,0.4); }

/* Grupo 3: Cartas (Borda Ciano) */
.btn-card {
  width: 64px;
  height: 64px;
  border: 1px solid #4a9e9e;
  border-radius: 4px;
  font-size: 20px; /* Para o ícone visual */
}
.btn-card:hover { border-color: #6cf; box-shadow: inset 0 0 10px rgba(102, 204, 255, 0.2); }

/* Grupo 4: Menu Principal (Destaque Dourado) */
.btn-menu {
  width: 100px;
  height: 48px;
  border: 2px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(201, 169, 89, 0.3);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
}
.btn-menu:hover {
  box-shadow: 0 0 10px rgba(201, 169, 89, 0.6);
  background: rgba(201, 169, 89, 0.15);
  color: var(--gold-bright);
}