:root {
  --bg: #0d1324;
  --panel: rgba(15, 24, 45, 0.82);
  --panel-border: rgba(171, 227, 198, 0.35);
  --text: #eef7f4;
  --muted: #bdd3ca;
  --accent: #95f1b7;
  --accent-2: #89d8ff;
  --danger: #ff9aa2;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(108, 160, 255, 0.16), transparent 30%),
    radial-gradient(circle at bottom, rgba(129, 255, 178, 0.12), transparent 35%),
    linear-gradient(180deg, #09111d, #10162d 42%, #0a0f1d);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#game-shell {
  width: min(1100px, 100vw);
  position: relative;
  padding: 12px;
}

#game {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 100px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,255,255,0.03);
  background: #0a0f1f;
}

#game canvas {
  width: 100% !important;
  height: 100% !important;
}

#dialogue-root {
  pointer-events: none;
  position: absolute;
  inset: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px;
}

.dialogue-box {
  pointer-events: auto;
  width: min(860px, calc(100% - 24px));
  background: linear-gradient(180deg, rgba(17, 28, 54, 0.94), rgba(9, 17, 35, 0.94));
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  backdrop-filter: blur(12px);
}

.dialogue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.dialogue-name {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.84rem;
  color: var(--accent);
}

.dialogue-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.dialogue-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  min-height: 88px;
}

.dialogue-choices {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dialogue-choice {
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 12px 14px;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.dialogue-choice:hover,
.dialogue-choice:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(149, 241, 183, 0.45);
  background: rgba(149, 241, 183, 0.08);
  outline: none;
}

.dialogue-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.dialogue-next {
  cursor: pointer;
  border: 0;
  color: #07111b;
  background: linear-gradient(135deg, var(--accent), #d7ffe6);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

kbd {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
}
