:root {
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: #eef3ed;
  background: #101923;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 1px solid #ffffff25;
  background: #ffffff08;
  border-radius: 7px;
  padding: 12px 15px;
  font-weight: 600;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #ffffff18;
  transform: translateY(-1px);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid #c6ef70;
  outline-offset: 3px;
}
a {
  color: inherit;
  text-decoration: none;
}
canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 20% 50%, transparent, #09141b30);
}
header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  pointer-events: none;
}
header > * {
  pointer-events: auto;
}
.brand {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand-icon {
  color: #c6ef70;
  font-size: 34px;
  transform: rotate(-15deg);
}
.edition {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.7px;
  color: #8b9da6;
  margin-left: 18px;
  border-left: 1px solid #56636a;
  padding-left: 18px;
}
#connection {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #9eb3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}
#connection i {
  width: 6px;
  height: 6px;
  background: #c6ef70;
  border-radius: 50%;
}
#home {
  position: absolute;
  left: 8vw;
  top: 50%;
  transform: translateY(-46%);
  z-index: 2;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #c6ef70;
  font-weight: 700;
}
h1 {
  font-size: clamp(44px, 5.2vw, 80px);
  line-height: 1.05;
  letter-spacing: -4px;
  margin: 23px 0;
  font-weight: 800;
}
h1 em {
  font-style: normal;
  color: #c6ef70;
}
.intro {
  font-size: 14px;
  line-height: 1.8;
  color: #a2b1b9;
  margin-bottom: 26px;
}
.join-card {
  width: 365px;
  padding: 22px;
  background: #17242de8;
  border: 1px solid #ffffff16;
  border-radius: 12px;
  box-shadow: 0 20px 80px #0002;
}
label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #95a8b1;
  margin-bottom: 9px;
}
input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #ffffff1a;
  background: #101b23;
  color: #fff;
  border-radius: 6px;
  outline: none;
}
input::placeholder {
  color: #7a8d98;
}
#code {
  text-transform: uppercase;
  min-width: 0;
}
.join-row {
  display: flex;
  gap: 8px;
  margin: 9px 0;
}
.join-row button {
  white-space: nowrap;
  font-size: 11px;
}
.primary {
  background: #c6ef70;
  color: #1b2b20;
  border: none;
  width: 100%;
  padding: 16px;
  font-size: 11px;
  letter-spacing: 1px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.primary:hover {
  background: #d8ff8c;
}
.join-card small {
  display: block;
  color: #8195a0;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 13px;
}
.features {
  display: flex;
  gap: 20px;
  color: #a2b4bc;
  font-size: 10px;
  margin-top: 23px;
}
#home-caption {
  position: absolute;
  right: 6vw;
  bottom: 110px;
  color: #bfd4d9;
  font-size: 10px;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#home-caption span {
  font-size: 8px;
  color: #788e9a;
}
footer {
  position: fixed;
  bottom: 0;
  left: 4vw;
  right: 4vw;
  height: 65px;
  border-top: 1px solid #ffffff13;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7e959f;
  font-size: 9px;
  letter-spacing: 1.8px;
}
footer button {
  border: 0;
  font-size: 11px;
  letter-spacing: 0;
}
.hidden {
  display: none !important;
}
.panel {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(580px, 94vw);
  max-height: 85vh;
  overflow: auto;
  padding: 30px;
  border: 1px solid #ffffff20;
  border-radius: 16px;
  background: #14232df5;
  box-shadow: 0 30px 150px #0008;
  backdrop-filter: blur(18px);
}
h2 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 15px 0 22px;
}
.muted,
.rules p,
#help p {
  color: #a3b5bf;
  font-size: 13px;
  line-height: 1.7;
}
.room-code {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  color: #93a7b0;
}
.room-code b {
  color: #c6ef70;
  font-size: 24px;
  letter-spacing: 3px;
}
.room-code button {
  margin-left: auto;
  font-size: 10px;
  padding: 10px;
}
#teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 17px 0;
}
.team-card {
  padding: 15px;
  text-align: left;
  border-left: 3px solid var(--team);
  min-height: 87px;
}
.team-card strong {
  color: var(--team);
  display: block;
  margin-bottom: 9px;
}
.team-card span {
  display: block;
  color: #bccad1;
  font-size: 12px;
}
.team-card.mine {
  background: #ffffff12;
}
.actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.actions button {
  font-size: 11px;
}
.rules {
  margin-top: 23px;
  border-top: 1px solid #ffffff15;
  padding-top: 18px;
}
.rules b {
  font-size: 12px;
}
.rules p {
  margin-bottom: 0;
}
.close {
  position: absolute;
  right: 15px;
  top: 15px;
  border: 0;
  font-size: 22px;
  padding: 4px 10px;
}
#scoreboard {
  position: absolute;
  top: 100px;
  left: 30px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.score {
  background: #11232cde;
  border: 1px solid #ffffff13;
  border-radius: 7px;
  padding: 11px 15px;
  min-width: 170px;
  display: flex;
  gap: 12px;
  font-size: 12px;
}
.score .bed-state {
  margin-left: auto;
  font-size: 10px;
}
.top-game {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}
#clock {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 20px;
}
.top-game button {
  font-size: 9px;
}
#feed {
  position: absolute;
  top: 110px;
  right: 25px;
  font-size: 11px;
  color: #c1d0d5;
  text-align: right;
  line-height: 2.3;
  text-shadow: 0 2px 6px #000;
}
.bottom {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
#resources {
  display: inline-flex;
  gap: 25px;
  background: #12232de8;
  border: 1px solid #ffffff17;
  border-radius: 9px;
  padding: 13px 23px;
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 14px;
}
#resources small {
  font-size: 10px;
  color: #a1b5be;
  font-weight: 400;
}
.controls {
  font-size: 10px;
  color: #a2b6c0;
  margin-bottom: 12px;
}
.controls b {
  color: #edf4f5;
  margin: 0 4px 0 12px;
}
.hotbar {
  display: flex;
  justify-content: center;
  gap: 7px;
}
.hotbar button {
  font-size: 10px;
  background: #142630ed;
}
.hotbar span {
  font-size: 20px;
  vertical-align: middle;
  margin: 0 9px;
}
.hotbar .selected {
  border-color: #c6ef70;
  background: #293d32;
}
.status {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 25px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 3px 20px #000;
  pointer-events: none;
}
#shop-items {
  display: grid;
  gap: 12px;
}
#shop-items button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 20px;
}
#shop-items small {
  display: block;
  color: #a5b5bd;
  margin-top: 5px;
  font-weight: 400;
}
#shop-items b {
  color: #c6ef70;
  font-size: 13px;
}
#toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: #e6f0df;
  color: #1a2e24;
  padding: 14px 23px;
  border-radius: 9px;
  box-shadow: 0 10px 40px #0004;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
@media (max-height: 780px) {
  h1 {
    font-size: 52px;
    margin: 16px 0;
  }
  .intro {
    margin-bottom: 17px;
  }
  .join-card {
    padding: 17px;
  }
  #home {
    transform: translateY(-44%);
  }
  header {
    height: 70px;
  }
  .features {
    margin-top: 15px;
  }
  .panel {
    padding: 23px;
  }
  footer {
    height: 45px;
  }
}
@media (max-width: 900px) {
  .edition {
    display: none;
  }
  #home {
    left: 5vw;
  }
  #home-caption {
    display: none;
  }
  #connection {
    font-size: 8px;
  }
  #scoreboard {
    left: 12px;
  }
  .score {
    min-width: 130px;
    padding: 8px;
  }
  .controls {
    font-size: 9px;
  }
  #feed {
    max-width: 230px;
  }
  .features {
    gap: 12px;
  }
}

#feed {
  top: 270px;
  max-width: 250px;
}
