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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0a1a;
  color: #e0e0ff;
  overflow: hidden;
}

#game-container {
  width: 100vw;
  height: 100vh;
  position: relative;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 30, 0.85);
  pointer-events: all;
}

.screen.hidden {
  display: none;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px #66f;
  color: #fff;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  max-width: 900px;
}

.class-card {
  background: rgba(30, 30, 60, 0.9);
  border: 2px solid #446;
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.class-card:hover, .class-card.selected {
  border-color: #88f;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(100, 100, 255, 0.3);
}

button {
  background: linear-gradient(135deg, #446, #228);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  margin: 0.5rem;
  transition: all 0.2s;
}

button:hover {
  background: linear-gradient(135deg, #668, #44a);
  transform: scale(1.05);
}

#hud {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0,0,0,0.7);
  padding: 1rem;
  border-radius: 8px;
  pointer-events: none;
  min-width: 250px;
}

.bar {
  height: 20px;
  background: #333;
  border-radius: 4px;
  margin: 5px 0;
  overflow: hidden;
}

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

.hp { background: #e44; }
.mp { background: #44e; }
.xp { background: #4e4; }

#quest-log, #inventory {
  position: absolute;
  right: 20px;
  top: 20px;
  background: rgba(0,0,0,0.8);
  padding: 1rem;
  border-radius: 8px;
  max-width: 300px;
  pointer-events: all;
  max-height: 60vh;
  overflow-y: auto;
}

.hidden-ui { display: none !important; }