/* src/styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body, #root {
  height: 100%;
}

body {
  display: grid;
  color: #e8e8ee;
  background: #0b0b0f;
  place-items:  center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
}

.menu, .lobby {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(90vw, 26rem);
  padding: 2rem;
}

h1 {
  font-size: 1.75rem;
}

.field {
  display: flex;
  color: #9a9aa8;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
}

input {
  color: inherit;
  background: #16161d;
  border: 1px solid #2a2a35;
  border-radius: .5rem;
  padding: .6rem .75rem;
  font-size: 1rem;
}

button {
  color: #fff;
  cursor: pointer;
  background: #3b3bd6;
  border: 0;
  border-radius: .5rem;
  padding: .6rem 1rem;
  font-size: 1rem;
}

button:disabled {
  opacity: .5;
  cursor: default;
}

.menu .join {
  display: flex;
  border-top: 1px solid #22222c;
  flex-direction: column;
  gap: .75rem;
  padding-top: 1rem;
}

.error {
  color: #ff8080;
  font-size: .9rem;
}

.banner {
  color: #ffd166;
  font-size: .9rem;
}

.code strong {
  letter-spacing: .15em;
  font-size: 1.2rem;
}

.roster {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.seat-row {
  display: flex;
  background: #16161d;
  border: 1px solid #22222c;
  border-radius: .5rem;
  align-items:  center;
  gap: .75rem;
  padding: .6rem .75rem;
}

.seat-row.vacant {
  opacity: .45;
}

.seat-row.disconnected {
  opacity: .55;
}

.slot {
  text-align: center;
  color: #6a6a78;
  width: 1.5rem;
}

.seat {
  display: flex;
  align-items:  center;
  gap: .5rem;
}

.badge {
  text-transform: uppercase;
  border-radius: .35rem;
  padding: .1rem .4rem;
  font-size: .7rem;
}

.host-badge {
  background: #3b3bd6;
}

.you-badge {
  background: #2a2a35;
}

.presence {
  color: #ffd166;
  font-size: .8rem;
}

.lobby-actions {
  display: flex;
  gap: .75rem;
}

.lobby-actions .start {
  background: #2f9e44;
}

.game {
  position: fixed;
  width: 100vw;
  height: 100vh;
  padding: 0;
  inset: 0;
}

.arena {
  position: absolute;
  display: block;
  touch-action: none;
  background: #0e0e14;
  width: 100vw;
  height: 100vh;
  inset: 0;
}

.game-header {
  position: absolute;
  z-index: 1;
  display: flex;
  background: linear-gradient(#0b0b0fcc, #0b0b0f00);
  align-items:  center;
  gap: 1rem;
  padding: .75rem 1rem;
  top: 0;
  left: 0;
  right: 0;
}

.game-header .code {
  color: #9a9aa8;
  margin-right: auto;
  font-size: .9rem;
}

.game .hint {
  position: absolute;
  z-index: 1;
  text-align: center;
  color: #9a9aa8;
  pointer-events: none;
  font-size: .85rem;
  bottom: .75rem;
  left: 0;
  right: 0;
}

.hud {
  position: absolute;
  z-index: 1;
  display: flex;
  pointer-events: none;
  align-items:  center;
  gap: .5rem;
  bottom: 1rem;
  left: 1rem;
}

.hud .hp-bar {
  overflow: hidden;
  background: #14141c;
  border: 1px solid #2a2a35;
  border-radius: 7px;
  width: 180px;
  height: 14px;
}

.hud .hp-fill {
  background: #40c463;
  height: 100%;
  transition: width .12s linear;
}

.hud .hp-fill[data-low="true"] {
  background: #ff5d5d;
}

.hud .hp-label {
  color: #e8e8ee;
  font-variant-numeric: tabular-nums;
  font-size: .85rem;
}
