:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #111314;
  color: #f4f1ea;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(190, 54, 45, 0.2), transparent 32rem),
    linear-gradient(135deg, #151816 0%, #22221d 48%, #111314 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem);
  gap: 1.25rem;
  width: min(1180px, calc(100vw - 2rem));
  min-height: calc(100vh - 2rem);
  margin: 0 auto;
  padding: 1rem 0;
}

.table-panel,
.side-panel {
  min-width: 0;
}

.table-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1rem, 2vw, 1.75rem);
  border: 1px solid rgba(244, 241, 234, 0.12);
  border-radius: 8px;
  background: rgba(18, 20, 19, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.top-bar,
.section-heading,
.leaderboard li,
.seat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: #f1b84b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 5rem);
}

h2 {
  font-size: 1.25rem;
}

.primary-button {
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 8px;
  background: #e3493f;
  color: #fff9f2;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.primary-button:hover {
  background: #f25a4f;
  transform: translateY(-1px);
}

.felt-table {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34rem;
  overflow: hidden;
  border: 1px solid rgba(241, 184, 75, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle, #255a43 0%, #164231 62%, #0e2e23 100%);
  background-size: 42px 42px, 42px 42px, cover;
  box-shadow:
    inset 0 0 0 18px rgba(70, 42, 22, 0.72),
    inset 0 0 42px rgba(0, 0, 0, 0.42);
}

.pot {
  display: grid;
  place-items: center;
  width: 9.5rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(10, 22, 18, 0.72);
  box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.12);
}

.pot span,
.stats-grid span,
.seat small,
.match-log,
.leaderboard {
  color: rgba(244, 241, 234, 0.68);
}

.pot strong {
  display: block;
  color: #fff;
  font-size: 2rem;
}

.seat {
  position: absolute;
  min-width: 11.5rem;
  padding: 0.7rem;
  border: 1px solid rgba(244, 241, 234, 0.12);
  border-radius: 8px;
  background: rgba(13, 16, 15, 0.84);
  backdrop-filter: blur(18px);
}

.seat strong,
.leaderboard span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-top {
  top: 2rem;
}

.seat-left {
  left: 2rem;
}

.seat-right {
  right: 2rem;
}

.seat-bottom {
  bottom: 2rem;
}

.seat.active {
  border-color: rgba(241, 184, 75, 0.8);
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 2.4rem;
  width: 2.4rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f1b84b;
  color: #14110d;
  font-size: 0.82rem;
  font-weight: 900;
}

.side-panel {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.panel-section {
  padding: 1rem;
  border: 1px solid rgba(244, 241, 234, 0.12);
  border-radius: 8px;
  background: rgba(18, 20, 19, 0.82);
}

.section-heading.compact {
  margin-bottom: 0.8rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.stats-grid div {
  min-width: 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(244, 241, 234, 0.07);
}

.stats-grid span,
.stats-grid strong {
  display: block;
}

.stats-grid span {
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
}

.leaderboard,
.match-log {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(244, 241, 234, 0.07);
}

.match-log li {
  padding: 0.68rem 0;
  border-bottom: 1px solid rgba(244, 241, 234, 0.09);
}

.match-log li:last-child {
  border-bottom: 0;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .felt-table {
    min-height: 30rem;
    border-radius: 8px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100vw - 1rem, 1180px);
    padding: 0.5rem 0;
  }

  .felt-table {
    min-height: 27rem;
  }

  .seat {
    min-width: 9.5rem;
    max-width: calc(100% - 2rem);
  }

  .seat-left,
  .seat-right {
    left: auto;
    right: auto;
  }

  .seat-left {
    top: 8rem;
  }

  .seat-right {
    bottom: 8rem;
  }

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

