:root {
  --bg-a: #f1f4f7;
  --bg-b: #dfe5eb;
  --ink: #142029;
  --muted: #445661;
  --card: rgba(255, 255, 255, 0.78);
  --line: #5f6b76;
  --dot: #555b61;
  --edge-empty: #c9d0d7;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  background: linear-gradient(155deg, var(--bg-a), var(--bg-b));
  color: var(--ink);
}

.app-shell {
  width: min(1240px, 95vw);
  margin: 24px auto;
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 16px;
}

.panel {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 20px 45px rgba(29, 56, 67, 0.14);
}

.game-panel {
  padding: 18px;
}

.hero h1 {
  margin: 3px 0 7px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 2.4vw, 2.5rem);
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.72rem;
  color: #637480;
  font-weight: 800;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.game-meta {
  margin-top: 11px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
}

.game-meta p {
  margin: 0;
}

.board {
  margin-top: 14px;
  display: grid;
  justify-content: center;
  align-content: center;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(238, 242, 246, 0.96), rgba(217, 223, 230, 0.94));
  min-height: 640px;
  overflow: auto;
}

.dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #6e757e, var(--dot));
  align-self: center;
  justify-self: center;
  box-shadow: 0 3px 6px rgba(39, 43, 47, 0.27);
  z-index: 4;
}

.h-edge,
.v-edge {
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 9px;
  background: var(--edge-empty);
  transition: transform 120ms ease, filter 120ms ease, background 120ms ease;
}

.h-edge {
  width: 62px;
  height: 12px;
  align-self: center;
  justify-self: center;
}

.v-edge {
  width: 12px;
  height: 62px;
  align-self: center;
  justify-self: center;
}

.h-edge:hover:not(:disabled),
.v-edge:hover:not(:disabled) {
  transform: scale(1.03);
  filter: brightness(1.04);
}

.h-edge:disabled,
.v-edge:disabled {
  cursor: not-allowed;
}

.box-cell {
  width: 62px;
  height: 62px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #1c2430;
  background: rgba(255, 255, 255, 0.2);
}

.side-panel {
  padding: 13px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(242, 247, 250, 0.72));
  box-shadow: 0 10px 25px rgba(29, 56, 67, 0.12);
  padding: 14px;
}

.card h2 {
  margin: 0 0 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.79rem;
  color: #506773;
}

.meta-line {
  margin: 3px 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334751;
}

.controls {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

input,
button {
  font: inherit;
}

input {
  border: 1px solid #bdc9d2;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.9rem;
  background: #fbfdff;
}

#roomCodeInput {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

button {
  border: none;
  border-radius: 11px;
  padding: 9px 11px;
  background: linear-gradient(130deg, #294e5a, #3e6474);
  color: #edf8ff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.04);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.players-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  font-size: 0.88rem;
}

.progress-text {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #415762;
  font-weight: 700;
}

.steps,
.feed-list {
  margin: 0;
  padding-left: 17px;
  display: grid;
  gap: 5px;
  font-size: 0.83rem;
  color: #3a4f5a;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .board {
    min-height: 520px;
  }
}
