:root {
  --bg: #08111f;
  --panel: #101a2e;
  --panel2: #16233d;
  --text: #eef2ff;
  --muted: #94a3b8;
  --green: #166534;
  --green2: #0f5132;
  --wood: #3b2a19;
  --card: #f8fafc;
  --cardText: #111827;
  --red: #dc2626;
  --accent: #22c55e;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #13233e, var(--bg));
  color: var(--text);
  font-family: system-ui, sans-serif;
}

.app { min-height: 100vh; padding: 16px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.brand { font-size: 1.4rem; font-weight: 800; }
.status { color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

.table-shell {
  background: rgba(255,255,255,.03);
  border-radius: 24px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.table {
  position: relative;
  min-height: 760px;
  border-radius: 48px;
  border: 8px solid var(--wood);
  background: radial-gradient(circle, var(--green), var(--green2));
  overflow: hidden;
}

.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.pot { font-weight: 800; margin-bottom: 14px; }

.board, .hand, .mini-cards {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.seat {
  position: absolute;
  width: 110px;
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(8, 17, 31, .62);
  border: 1px solid rgba(255,255,255,.08);
  text-align: center;
  box-shadow: var(--shadow);
}

.you {
  width: 180px;
  background: rgba(20, 38, 68, .9);
  border: 1px solid rgba(34,197,94,.35);
}

.player { font-weight: 800; font-size: .95rem; }
.chips { color: var(--muted); font-size: .85rem; margin: 4px 0 8px; }

.card {
  width: 64px;
  height: 92px;
  background: var(--card);
  color: var(--cardText);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.card.red { color: var(--red); }

.card.back {
  background: linear-gradient(135deg, #1d4ed8, #312e81);
  border: 2px solid rgba(255,255,255,.15);
}

.card.tiny {
  width: 22px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
}

.seat-1 { left: 50%; top: 18px; transform: translateX(-50%); }
.seat-2 { right: 90px; top: 72px; }
.seat-3 { right: 24px; top: 210px; }
.seat-4 { right: 24px; bottom: 220px; }
.seat-5 { right: 100px; bottom: 72px; }
.seat-6 { left: 100px; bottom: 72px; }
.seat-7 { left: 24px; bottom: 220px; }
.seat-8 { left: 24px; top: 210px; }
.seat-you { left: 50%; bottom: 18px; transform: translateX(-50%); }

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: rgba(16, 26, 46, .92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 800;
  background: var(--panel2);
  color: var(--text);
}

button.primary {
  background: var(--accent);
  color: #052e16;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
}

@media (max-width: 720px) {
  .app { padding: 10px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 4px; }

  .table {
    min-height: 640px;
    border-radius: 28px;
  }

  .seat {
    width: 84px;
    padding: 8px 6px;
  }

  .you { width: 160px; }
  .player { font-size: .8rem; }
  .chips { font-size: .72rem; }

  .card {
    width: 48px;
    height: 70px;
    border-radius: 10px;
    padding: 6px;
    font-size: .85rem;
  }

  .card.tiny {
    width: 18px;
    height: 26px;
  }

  .seat-2 { right: 24px; top: 84px; }
  .seat-3 { right: 8px; top: 205px; }
  .seat-4 { right: 8px; bottom: 190px; }
  .seat-5 { right: 24px; bottom: 86px; }
  .seat-6 { left: 24px; bottom: 86px; }
  .seat-7 { left: 8px; bottom: 190px; }
  .seat-8 { left: 8px; top: 205px; }
}

@media (max-width: 540px) {
  .table { min-height: 560px; }

  .seat-3, .seat-4, .seat-7, .seat-8 {
    display: none;
  }

  .seat-1 { top: 14px; }
  .seat-2 { right: 10px; top: 105px; }
  .seat-5 { right: 12px; bottom: 110px; }
  .seat-6 { left: 12px; bottom: 110px; }

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