:root {
  --bg: #090711;
  --p: #171021;
  --p2: #211632;
  --line: #4e3961;
  --w: #fcf8ff;
  --mut: #b5acbe;
  --pink: #ff45bd;
  --blue: #55e9ff;
  --lime: #d0ff5c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--w);
  font:
    16px/1.45 Inter,
    ui-rounded,
    system-ui,
    sans-serif;
  background:
    radial-gradient(circle at 10% 0, #37205e, transparent 29rem),
    radial-gradient(circle at 100% 8%, #51144d, transparent 32rem), var(--bg);
}
button,
input {
  font: inherit;
}
.app {
  width: min(1110px, 100%);
  min-height: 100vh;
  margin: auto;
  padding: 24px 20px 50px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 23px;
  letter-spacing: -0.06em;
}
.brand i {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: #1e0d28;
  font-size: 10px;
  font-style: normal;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--blue), var(--pink));
  box-shadow: 0 0 22px #ff45bd77;
}
.ghost,
.primary,
.card,
.answer {
  border: 0;
  cursor: pointer;
}
.ghost {
  padding: 9px 11px;
  color: #f9f4ff;
  border: 1px solid #543e67;
  border-radius: 10px;
  background: #161020;
  font-weight: 800;
}
.primary {
  padding: 12px 16px;
  color: #240a20;
  border-radius: 11px;
  background: linear-gradient(95deg, var(--pink), #ff8edc);
  font-weight: 1000;
  box-shadow: 0 10px 25px #ff45bd55;
}
.primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(42px, 7vw, 77px);
  line-height: 0.9;
  letter-spacing: -0.09em;
}
h1 em {
  font-style: normal;
  color: var(--pink);
}
h2 {
  font-size: 23px;
  letter-spacing: -0.05em;
}
.sub {
  color: var(--mut);
}
.intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 112px);
}
.intro-copy p {
  max-width: 470px;
  margin-top: 25px;
  color: #c9c0d0;
  font-size: 18px;
}
.panel {
  padding: 28px;
  border: 1px solid #6a5082;
  border-radius: 22px;
  background: linear-gradient(145deg, #221530, #100d18);
  box-shadow: 0 20px 65px #0007;
}
.panel h2 {
  margin: 7px 0 22px;
}
.field {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 900;
}
.field input {
  width: 100%;
  margin-top: 7px;
  padding: 12px;
  color: white;
  border: 1px solid #554063;
  border-radius: 10px;
  background: #0e0b14;
  outline: 0;
}
.field input:focus {
  border-color: var(--blue);
}
.targets {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}
.target {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: #d6ccdf;
  border: 1px solid #554063;
  border-radius: 9px;
  background: #110d19;
  font-weight: 900;
}
.target.on {
  color: #260b22;
  border-color: var(--pink);
  background: var(--pink);
}
.or {
  margin: 18px 0;
  color: #81748d;
  text-align: center;
  font-size: 12px;
}
.row {
  display: flex;
  gap: 8px;
}
.row input {
  min-width: 0;
  flex: 1;
}
.hint,
.error {
  margin-top: 13px;
  font-size: 12px;
}
.hint {
  color: var(--mut);
}
.error {
  color: #ffb5d2;
}
.game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 18px;
  margin-top: 35px;
}
.board {
  min-height: 620px;
  padding: 23px;
  border: 1px solid #4c395b;
  border-radius: 23px;
  background: linear-gradient(140deg, #1b1230, #0f0d1a 70%);
  overflow: hidden;
}
.side {
  padding: 18px;
  border: 1px solid #4c395b;
  border-radius: 19px;
  background: #120e1b;
}
.roomcode {
  margin: 8px 0 20px;
  padding: 11px;
  color: var(--pink);
  letter-spacing: 0.15em;
  font-size: 20px;
  font-weight: 1000;
  border-radius: 10px;
  background: #251a33;
}
.players {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.player {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d5cbdc;
  font-size: 13px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 9px var(--lime);
}
.score {
  margin: 20px 0;
  padding: 14px;
  text-align: center;
  border-radius: 13px;
  background: #21172f;
}
.score strong {
  display: block;
  color: var(--pink);
  font-size: 31px;
  line-height: 1.1;
}
.score small {
  color: var(--mut);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.timer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}
.timer b {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #190d23;
  background: var(--blue);
  clip-path: polygon(
    25% 6%,
    75% 6%,
    94% 25%,
    94% 75%,
    75% 94%,
    25% 94%,
    6% 75%,
    6% 25%
  );
}
.prompt {
  max-width: 700px;
  margin: 70px auto 35px;
  text-align: center;
}
.prompt h1 {
  font-size: clamp(35px, 5vw, 65px);
}
.prompt p {
  margin-top: 15px;
  color: var(--mut);
}
.hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 11px;
  min-height: 193px;
}
.card {
  width: 140px;
  min-height: 170px;
  padding: 14px;
  color: white;
  text-align: left;
  border: 1px solid #785d95;
  border-radius: 13px;
  background: linear-gradient(145deg, #231939, #100d1b);
  box-shadow: 0 10px 18px #0007;
  transition: 0.18s;
}
.card:nth-child(1) {
  transform: rotate(-6deg) translateY(9px);
}
.card:nth-child(2) {
  transform: rotate(-2deg) translateY(3px);
}
.card:nth-child(4) {
  transform: rotate(2deg) translateY(3px);
}
.card:nth-child(5) {
  transform: rotate(6deg) translateY(9px);
}
.card:hover,
.card.on {
  transform: translateY(-14px) scale(1.025) !important;
  border-color: var(--blue);
  box-shadow: 0 0 24px #55e9ff66;
}
.card small {
  color: var(--pink);
  font-weight: 1000;
}
.card span {
  display: block;
  margin-top: 27px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.center {
  text-align: center;
}
.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
}
.wait,
.lobby-state,
.result,
.end {
  display: grid;
  place-items: center;
  min-height: 450px;
  text-align: center;
}
.wait h1,
.lobby-state h1,
.result h1,
.end h1 {
  max-width: 700px;
}
.wait p,
.lobby-state p,
.result p,
.end p {
  max-width: 560px;
  margin: 14px auto;
  color: var(--mut);
}
.pulse {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin-bottom: 27px;
  color: var(--pink);
  font-size: 34px;
  border: 1px solid var(--pink);
  border-radius: 50%;
  box-shadow:
    0 0 0 13px #ff45bd14,
    0 0 0 29px #ff45bd0a,
    0 0 25px #ff45bd77;
}
.answers {
  display: grid;
  gap: 9px;
  max-width: 720px;
  margin: 28px auto;
}
.answer {
  padding: 15px;
  color: white;
  text-align: left;
  border: 1px solid #5a426c;
  border-radius: 11px;
  background: #231a30;
  font-weight: 800;
}
.answer:hover,
.answer.on {
  border-color: var(--pink);
  background: #382043;
}
.answer:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.win-card {
  max-width: 620px;
  margin: 27px auto;
  padding: 26px;
  color: #25122a;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff8ff, #dae3ff);
  box-shadow: 11px 12px 0 #3c1d56;
}
.win-card h2 {
  margin-top: 12px;
  font-size: 27px;
}
.rank {
  display: grid;
  gap: 7px;
  max-width: 500px;
  width: 100%;
  margin: 26px auto;
}
.rank div {
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  border-radius: 10px;
  background: #231831;
}
.rank div:first-child {
  border: 1px solid var(--pink);
}
@media (max-width: 780px) {
  .app {
    padding: 18px 12px;
  }
  .intro,
  .game {
    grid-template-columns: 1fr;
  }
  .intro {
    gap: 25px;
    padding: 45px 0;
  }
  .game {
    margin-top: 23px;
  }
  .side {
    order: -1;
    display: flex;
    align-items: center;
    gap: 13px;
    justify-content: space-between;
    padding: 12px;
  }
  .side h3,
  .players {
    display: none;
  }
  .roomcode {
    margin: 0;
    font-size: 15px;
  }
  .score {
    margin: 0;
    padding: 7px 13px;
  }
  .board {
    padding: 17px;
    min-height: 600px;
  }
  .prompt {
    margin: 44px auto 25px;
  }
  .hand {
    justify-content: flex-start;
    overflow: auto;
    margin: 0 -12px;
    padding: 4px 13px 18px;
  }
  .card {
    flex: 0 0 132px;
    min-height: 161px;
  }
  .card:nth-child(n) {
    transform: none;
  }
}
@media (max-width: 430px) {
  header .ghost:last-child {
    display: none;
  }
  .panel {
    padding: 20px;
  }
  .prompt h1 {
    font-size: 36px;
  }
}
