:root {
  --bg: #0b0f14;
  --surface: #111827;
  --accent: #e11d48; /* red */
  --muted: #94a3b8;
  --card: #0c1118;
  --white: #e5e7eb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: radial-gradient(
    1200px 700px at 70% -20%,
    #1a2432 0%,
    #0b0f14 60%,
    #0b0f14 100%
  );
  color: var(--white);
}
header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
h1 {
  font-size: 18px;
  margin: 0;
  color: #fff;
}
.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
button {
  background: var(--surface);
  color: #fff;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s;
}
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
main {
  display: flex;
  justify-content: center;
  padding: 20px;
}
.table {
  width: min(1100px, 95vw);
  background: linear-gradient(180deg, #0e141c, #0b0f14);
  border: 1px solid #1f2937;
  border-radius: 24px;
  padding: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.stack {
  position: relative;
  width: 120px;
  height: 168px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack .stack-card {
  width: 120px;
  height: 168px;
  border-radius: 16px;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45));
}
.stack .count {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--muted);
}
.community {
  display: grid;
  grid-template-columns: repeat(5, 120px);
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin: 16px auto 24px;
}
.players {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 4px;
}
.hand {
  display: flex;
  gap: 12px;
  align-items: center;
  position: relative;
}
.hand span {
  position: absolute;
  top: -22px;
  left: 4px;
  color: var(--muted);
  font-size: 13px;
}
.slot {
  width: 120px;
  height: 168px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card {
  width: 120px;
  height: 168px;
  border-radius: 16px;
  transform-origin: center;
  animation: flip 0.6s ease both;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
@keyframes flip {
  0% {
    transform: rotateY(90deg) translateY(-6px);
    opacity: 0;
  }
  100% {
    transform: rotateY(0deg) translateY(0);
    opacity: 1;
  }
}
footer {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  opacity: 0.8;
}