* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #111; color: #eee; font-family: 'Segoe UI', sans-serif; overflow: hidden; }

#lobby {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 10; background: #111;
  overflow-y: auto; padding: 2rem 0;
}
#lobby h1 { font-size: 4rem; letter-spacing: 0.3em; margin-bottom: 1rem; }
.accent { color: #f44; }
#lobby-controls { display: flex; flex-direction: column; gap: 0.8rem; align-items: center; max-width: 700px; width: 100%; }
#lobby-controls input, #lobby-controls select, #lobby-controls button {
  padding: 0.7rem 1.5rem; font-size: 1.1rem; border: 1px solid #444;
  background: #222; color: #eee; border-radius: 4px; min-width: 220px;
}
#lobby-controls button { background: #c33; border-color: #c33; cursor: pointer; }
#lobby-controls button:hover { background: #e44; }
#lobby-status { color: #aaa; min-height: 1.5em; }

/* Class Select */
#class-select {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
}
.class-btn {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
  padding: 0.5rem 0.8rem; background: #1a1a1a; border: 2px solid #444;
  border-radius: 6px; cursor: pointer; color: #eee; font-size: 0.85rem;
  min-width: 70px; transition: all 0.15s;
}
.class-btn:hover { background: #2a2a2a; transform: scale(1.05); }
.class-btn.selected { border-width: 3px; }
.class-icon { font-size: 1.4rem; }

/* Skill Loadout */
#skill-loadout { width: 100%; }
#skill-loadout h4 { margin: 0.5rem 0; color: #aaa; text-align: center; }

#equipped-slots {
  display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 0.5rem;
}
.equipped-slot {
  width: 100px; height: 70px; background: #1a1a1a; border: 2px dashed #444;
  border-radius: 8px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; cursor: pointer; transition: all 0.15s; gap: 0.2rem;
}
.equipped-slot.filled { border-style: solid; }
.equipped-slot:hover { background: #2a2a2a; }
.slot-key { font-size: 0.7rem; color: #888; background: #333; padding: 0.1rem 0.4rem; border-radius: 3px; }
.slot-name { font-size: 0.75rem; color: #eee; text-align: center; }
.slot-type { font-size: 0.6rem; color: #888; }

#skill-pool {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin: 0.5rem 0;
}
.skill-card {
  background: #1a1a1a; border: 1px solid #333; border-left: 4px solid #666;
  border-radius: 6px; padding: 0.5rem; cursor: pointer; transition: all 0.15s;
}
.skill-card:hover { background: #2a2a2a; transform: scale(1.02); }
.skill-card.equipped { opacity: 0.5; border-color: #555; }
.skill-header { display: flex; justify-content: space-between; align-items: center; }
.skill-name { font-size: 0.85rem; font-weight: bold; }
.skill-type-badge {
  font-size: 0.6rem; padding: 0.15rem 0.4rem; border-radius: 3px;
  text-transform: uppercase; font-weight: bold;
}
.skill-type-badge.main { background: #432; color: #fa8; }
.skill-type-badge.sub { background: #234; color: #8af; }
.skill-desc { font-size: 0.7rem; color: #aaa; margin: 0.2rem 0; }
.skill-meta { font-size: 0.65rem; color: #666; }

#passive-select { width: 100%; }
#passive-select h4 { margin: 0.5rem 0; color: #aaa; text-align: center; }
.passive-option {
  background: #1a1a1a; border: 1px solid #333; border-radius: 6px;
  padding: 0.5rem; margin: 0.3rem 0; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.passive-option:hover { background: #2a2a2a; }
.passive-option.selected { border-color: #4af; background: #1a2a3a; }
.passive-option strong { font-size: 0.85rem; color: #eee; }
.passive-option span { font-size: 0.7rem; color: #aaa; }

/* Game Canvas */
#game-canvas { display: block; width: 100vw; height: 100vh; }

/* HUD */
#hud {
  position: absolute; top: 1rem; left: 1rem; display: flex; gap: 1.5rem;
  font-size: 1rem; font-weight: bold; z-index: 5;
  text-shadow: 1px 1px 2px #000;
}
#hud-health { color: #4f4; }
#hud-ammo { color: #ff4; }
#hud-timer { color: #fff; }
#hud-kills { color: #f88; }

/* Skill Bar */
#skill-bar {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem; z-index: 6;
}
.skill-bar-slot {
  width: 70px; height: 70px; background: rgba(0,0,0,0.8); border: 2px solid #555;
  border-radius: 8px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; position: relative; overflow: hidden;
}
.sb-key {
  font-size: 0.7rem; color: #888; background: #333; padding: 0.1rem 0.3rem;
  border-radius: 3px; position: absolute; top: 4px; left: 4px;
}
.sb-name { font-size: 0.65rem; color: #eee; text-align: center; margin-top: 0.8rem; }
.sb-cooldown-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.7); display: none;
}

/* Inventory */
#inventory {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.85); padding: 1rem; border: 1px solid #444;
  border-radius: 6px; z-index: 6; min-width: 180px;
}
#inv-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem; }
.inv-slot {
  width: 60px; height: 60px; background: #222; border: 1px solid #555;
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: #aaa;
}

/* Death / Extract screens */
#death-screen, #extract-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 20;
  background: rgba(0,0,0,0.9);
}
#death-screen h2 { color: #f44; font-size: 3rem; }
#extract-screen h2 { color: #4f4; font-size: 3rem; }
#death-screen button, #extract-screen button {
  padding: 0.7rem 1.5rem; font-size: 1.1rem; border: 1px solid #444;
  background: #222; color: #eee; border-radius: 4px; cursor: pointer; margin-top: 1rem;
}

.hidden { display: none !important; }
