* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(38, 166, 91, 0.25), transparent 35%),
    linear-gradient(135deg, #07140d, #0c2517, #020403);
  color: #f4f4f4;
  padding: 24px;
}

.game {
  max-width: 1100px;
  margin: 0 auto;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -2px;
}

.top-bar p {
  color: #b9c8bd;
  margin-top: 4px;
}

.top-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: #f5c542;
  color: #181818;
  transition: 0.2s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

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

button.secondary {
  background: #26352b;
  color: #f4f4f4;
  border: 1px solid #445547;
}

button.danger {
  background: #c0392b;
  color: white;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.stat span {
  display: block;
  color: #b9c8bd;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.stat strong {
  font-size: 1.8rem;
}

.stat.pot {
  background: rgba(245, 197, 66, 0.18);
  border-color: rgba(245, 197, 66, 0.45);
}

.table {
  background:
    radial-gradient(circle at center, #176b3a, #0d4a28 60%, #062715);
  border: 10px solid #5d351a;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.45),
    0 20px 60px rgba(0, 0, 0, 0.4);
  border-radius: 40px;
  padding: 28px;
  min-height: 540px;
  display: grid;
  gap: 24px;
}

.phase {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f5c542;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.player-area,
.community-area {
  text-align: center;
}

.player-area h2,
.community-area h2,
.log h2 {
  font-size: 1rem;
  color: #d8e6dc;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.hand-info {
  min-height: 24px;
  color: #f5c542;
  font-weight: 700;
  margin-bottom: 12px;
}

.cards {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 112px;
}

.card {
  width: 76px;
  height: 106px;
  border-radius: 12px;
  background: #fafafa;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9px;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.35),
    inset 0 0 0 2px rgba(0, 0, 0, 0.06);
  font-weight: 900;
  position: relative;
  user-select: none;
}

.card.red {
  color: #c0392b;
}

.card.black {
  color: #111;
}

.card .rank {
  font-size: 1.1rem;
  text-align: left;
}

.card .suit {
  font-size: 2.4rem;
  line-height: 1;
  text-align: center;
}

.card .rank.bottom {
  transform: rotate(180deg);
}

.card.hidden {
  background:
    linear-gradient(135deg, #1b4d89, #0b2748);
  color: white;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.card.empty {
  background: rgba(255, 255, 255, 0.08);
  border: 2px dashed rgba(255, 255, 255, 0.25);
  box-shadow: none;
  color: rgba(255, 255, 255, 0.35);
  justify-content: center;
  align-items: center;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 22px 0;
  flex-wrap: wrap;
}

.actions button {
  min-width: 140px;
}

.log {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 18px;
}

#messageLog {
  display: grid;
  gap: 8px;
  color: #d8e6dc;
  line-height: 1.4;
}

#messageLog p {
  border-left: 3px solid #f5c542;
  padding-left: 10px;
}

@media (max-width: 720px) {
  body {
    padding: 14px;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .table {
    border-radius: 28px;
    padding: 18px;
  }

  .card {
    width: 62px;
    height: 90px;
  }

  .card .suit {
    font-size: 2rem;
  }

  .actions button {
    width: 100%;
  }
}
