body {
  margin: 0;
  display: grid;
  place-items: center;
  color: #17172a;
  background: radial-gradient(circle at top, #514e62, #222128 72%);
  font-family: system-ui, sans-serif;
}

.rps-game {
  width: min(94vw, 760px);
  margin: 12px auto;
  padding: clamp(12px, 3vw, 24px);
  border: 3px solid #24dfea;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}

.rps-game > h1 {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 8px 22px;
  border-radius: 12px;
  color: #fff;
  background: #a000a0;
  text-align: center;
  font-size: clamp(1.45rem, 6vw, 2.4rem);
}

.rps-arena {
  display: flex;
  align-items: stretch;
  gap: clamp(8px, 3vw, 26px);
}

.player-column,
.computer-column {
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(8px, 2.2vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 18px;
}

.player-column { background: #fff1f9; }
.computer-column { background: #eafcff; }

.player-column h2,
.computer-column h2 {
  min-height: 1.5em;
  margin: 0 0 10px;
  color: #4b285c;
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.45rem);
}

.options {
  width: min(100%, 150px);
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.8vw, 11px);
}

.option-card {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 289 / 324;
  padding: 0;
  overflow: hidden;
  border: 3px solid #a000a0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 11px rgba(40, 18, 48, .18);
  transform: scale(1);
  transform-origin: center;
  transition: transform 210ms ease, opacity 360ms ease, filter 360ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

button.option-card {
  cursor: pointer;
  touch-action: manipulation;
}

.option-card img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 9px;
  object-fit: contain;
}

.computer-options .option-card {
  border-color: transparent;
  box-shadow: none;
}

button.option-card:hover,
button.option-card:focus-visible {
  z-index: 3;
  outline: 3px solid #20c9d7;
  outline-offset: 2px;
  transform: scale(1.05);
}

.option-card.is-pulsing {
  z-index: 5;
  border-color: #20c9d7;
  filter: brightness(1.12) saturate(1.2);
  transform: scale(1.14);
  box-shadow: 0 0 20px rgba(32, 201, 215, .8);
}

.option-card.is-selected {
  z-index: 4;
  border-color: #a000a0;
  filter: saturate(1.15);
  transform: scale(1.07);
  box-shadow: 0 0 16px rgba(160, 0, 160, .42);
}

.option-card.is-winner {
  border-color: #19a85c;
  box-shadow: 0 0 24px rgba(25, 168, 92, .82);
}

.option-card.is-loser {
  border-color: #df4055;
  box-shadow: 0 0 24px rgba(223, 64, 85, .78);
}

.option-card.is-tie {
  border-color: #278ee8;
  box-shadow: 0 0 24px rgba(39, 142, 232, .8);
}

.option-card.is-dismissed {
  opacity: 0;
  filter: grayscale(1);
  transform: scale(.72);
  pointer-events: none;
  visibility: hidden;
}

.result {
  min-height: 58px;
  margin: 14px 0 0;
  padding: 10px;
  display: grid;
  place-items: center;
  border: 3px solid #6c6c78;
  border-radius: 14px;
  background: #fafafa;
  text-align: center;
  font-size: clamp(1.15rem, 5vw, 1.75rem);
  font-weight: 900;
}

.result[hidden] { display: none; }
.result[data-result="win"] { color: #087b3c; border-color: #0a9d4e; }
.result[data-result="lose"] { color: #a82737; border-color: #df5060; }
.result[data-result="draw"] { color: #61580a; border-color: #d1b918; }

@media (max-width: 480px) {
  body { place-items: start center; }
  .rps-game { margin-top: 6px; padding: 9px; }
  .rps-game > h1 { margin-bottom: 8px; }
  .rps-arena { gap: 6px; }
  .player-column, .computer-column { padding: 7px; }
  .options { width: min(100%, 125px); }
  .option-card { border-width: 2px; }
}
