:root {
  --bg: #0c1118;
  --panel: rgba(11, 18, 28, 0.92);
  --line: #35506f;
  --accent: #ffd36a;
  --text: #edf4ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 10%, #1a2a3e, #090d12 60%);
  color: var(--text);
}

.layout {
  width: 100%;
  height: 100%;
  position: relative;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  background: #111;
}

.menu {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100vw - 2rem));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  backdrop-filter: blur(3px);
}

.menu h1 {
  margin: 0.2rem 0 0.4rem;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.subtitle {
  margin-top: 0;
  opacity: 0.9;
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.class-card {
  background: #101826;
  border: 1px solid #27435f;
  border-radius: 12px;
  padding: 0.8rem;
  cursor: pointer;
}

.class-card:hover,
.class-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 211, 106, 0.45);
}

.class-card h3 {
  margin: 0 0 0.5rem;
}

.class-card p {
  margin: 0;
  font-size: 0.92rem;
  opacity: 0.9;
}

#start-btn {
  background: #ffd36a;
  color: #201600;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
}

#start-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.hint {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.hud {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: pre;
}
