/* Asset skin mapped from the supplied 65402 high-IQ Texas Hold'em package. */
:root {
  --legacy-wood: #4b2c19;
  --legacy-wood-light: #9c6532;
  --legacy-green: #27a56e;
  --legacy-green-deep: #0d5f45;
  --legacy-teal: #52c9d2;
  --legacy-gold: #e8b44e;
  --legacy-ink: #111617;
  --legacy-cream: #fff1cb;
}

body {
  background:
    radial-gradient(circle at 50% 22%, rgba(49, 106, 80, 0.24), transparent 45%),
    linear-gradient(180deg, #11191a 0%, #080d0e 100%);
}

.topbar {
  border-color: rgba(232, 180, 78, 0.33);
  background:
    linear-gradient(90deg, rgba(18, 24, 23, 0.98), rgba(36, 36, 29, 0.97), rgba(18, 24, 23, 0.98));
  box-shadow: 0 7px 24px rgba(0, 0, 0, 0.38);
}

.brand-mark {
  overflow: hidden;
  border-color: rgba(237, 190, 91, 0.75);
  background: #111816 url("assets/legacy/ui/GAME_LOGO.bmp") center / 64% 64% no-repeat;
  box-shadow:
    inset 0 0 0 2px rgba(255, 243, 202, 0.08),
    0 0 16px rgba(228, 174, 70, 0.16);
}

.brand-mark .brand-suit {
  display: none;
}

.brand-copy strong,
.brand-copy small {
  color: var(--legacy-cream);
}

.brand-copy small {
  color: rgba(242, 211, 153, 0.56);
}

.topbar-stats {
  border-color: rgba(219, 177, 91, 0.23);
  background: rgba(7, 14, 13, 0.6);
}

.top-stat + .top-stat {
  border-color: rgba(219, 177, 91, 0.16);
}

.top-stat span {
  color: rgba(238, 218, 179, 0.54);
}

.top-stat strong,
.top-stat--pot strong {
  color: var(--legacy-cream);
}

.btn {
  border-color: rgba(103, 211, 220, 0.36);
  color: #ecfbff;
  background-color: rgba(19, 68, 69, 0.78);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(0, 0, 0, 0.14)),
    url("assets/legacy/ui/ACTION_BACK.png");
  background-position: center, 20% center;
  background-size: cover, 600% 100%;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.11),
    0 4px 12px rgba(0, 0, 0, 0.28);
}

.btn:hover:not(:disabled) {
  border-color: rgba(255, 220, 139, 0.7);
  background-color: rgba(31, 95, 92, 0.92);
  background-position: center, 20% center;
}

.btn-gold,
.action-btn--raise {
  border-color: #fff0c6;
  color: #172322;
  background-color: #e3b85c;
  background-image:
    linear-gradient(120deg, rgba(255, 251, 219, 0.68), rgba(210, 159, 55, 0.3)),
    url("assets/legacy/ui/ACTION_BACK.png");
  background-position: center, 60% center;
  background-size: cover, 600% 100%;
}

.btn-gold:hover:not(:disabled),
.action-btn--raise:hover:not(:disabled) {
  border-color: #fff8df;
  background-color: #f2cb70;
}

.icon-btn {
  min-width: 48px;
}

.table-stage {
  isolation: isolate;
  border-color: rgba(224, 173, 74, 0.56);
  border-radius: 12px;
  background: #24160e url("assets/legacy/table/VIEW_BACK.bmp") center / 100% 100% no-repeat;
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255, 230, 179, 0.11);
}

.table-stage::before {
  z-index: 0;
  opacity: 0.16;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 56%, rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(90deg, transparent 0 4px, rgba(255, 255, 255, 0.012) 4px 5px);
}

.table-stage::after {
  display: none;
}

.table-wrap {
  z-index: 1;
}

.table-rim {
  inset: 11.5% 4.5% 15.5%;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.poker-table {
  inset: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.poker-table::before,
.poker-table::after,
.felt-pattern,
.table-watermark {
  display: none;
}

.board-cluster {
  z-index: 7;
  top: 34%;
  width: min(72%, 720px);
}

.hand-meta {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hand-number {
  color: #fff0c1;
  letter-spacing: 0.09em;
}

.phase-pill {
  color: #fff4cf;
  border-color: rgba(255, 228, 158, 0.42);
  background: rgba(10, 72, 55, 0.76);
}

.pot-display {
  border-color: rgba(255, 232, 170, 0.36);
  background:
    linear-gradient(180deg, rgba(11, 77, 58, 0.9), rgba(8, 55, 43, 0.92));
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.36),
    inset 0 1px rgba(255, 247, 216, 0.12);
}

.pot-copy small,
.top-stat span {
  color: rgba(236, 226, 196, 0.62);
}

.pot-copy strong,
.top-stat--pot strong {
  color: #ffe4a1;
}

.community {
  gap: clamp(5px, 0.55vw, 7px);
}

.community .playing-card {
  border-radius: 2px;
}

.street-copy {
  color: rgba(255, 241, 206, 0.76);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.hero-hand-reading {
  position: absolute;
  z-index: 12;
  display: flex;
  width: max-content;
  max-width: none;
  min-height: 27px;
  margin: 0;
  padding: 5px 12px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff0bd;
  border: 1px solid rgba(255, 225, 148, 0.52);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(20, 103, 73, 0.94), rgba(7, 61, 44, 0.96));
  box-shadow:
    0 5px 13px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 248, 217, 0.14);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.hero-hand-reading[hidden] {
  display: none;
}

.hero-hand-reading > span {
  color: rgba(255, 240, 201, 0.62);
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.hero-hand-reading > strong {
  color: #fff5d7;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Exact card atlas: 13 columns x 5 rows from CARD.png. */
.card-sprite-art {
  background-color: #fff;
  background-image: url("assets/legacy/cards/CARD.png") !important;
  background-repeat: no-repeat !important;
  background-size: 1300% 500% !important;
}

.playing-card.asset-card {
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: #fffdf5;
  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(61, 43, 25, 0.3);
}

.playing-card.asset-card::before,
.playing-card.asset-card::after {
  display: none;
}

.playing-card .card-fallback {
  border: 0;
  border-radius: 1px;
}

.card-slot {
  border-color: rgba(255, 239, 202, 0.15);
  background:
    repeating-linear-gradient(135deg, rgba(255, 245, 218, 0.025) 0 1px, transparent 1px 5px),
    rgba(0, 50, 34, 0.2);
}

/* D.png moves with state.dealerSeat and marks the current dealer position. */
.dealer.dealer--legacy {
  z-index: 8;
  top: var(--dealer-y, 21%);
  left: var(--dealer-x, 50%);
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  transition:
    top 420ms cubic-bezier(0.18, 0.8, 0.28, 1),
    left 420ms cubic-bezier(0.18, 0.8, 0.28, 1);
}

.dealer--legacy .legacy-dealer-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid #f6dc9b;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 246, 207, 0.24), transparent 58%),
    #3a2718;
  box-shadow:
    0 0 0 3px rgba(75, 44, 24, 0.78),
    0 0 0 4px rgba(255, 230, 159, 0.35),
    inset 0 0 16px rgba(0, 0, 0, 0.42);
}

.dealer--legacy .legacy-dealer-button img {
  width: 32px;
  height: 32px;
  image-rendering: auto;
  pointer-events: none;
  user-select: none;
}

/* The moving deck and chips also use the supplied card and chip atlases. */
.deal-source {
  z-index: 10;
}

.deal-source-card {
  border: 0;
  border-radius: 2px;
  background-color: #fff;
  background-image: url("assets/legacy/cards/CARD.png");
  background-position: 25% 100%;
  background-repeat: no-repeat;
  background-size: 1300% 500%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.42);
}

.deal-source-card--middle {
  transform: translate(2px, -2px);
}

.deal-source-card--front {
  transform: translate(4px, -4px);
}

.deal-source-glow {
  background: rgba(255, 211, 117, 0.24);
}

.table-chip,
.pot-chip {
  border: 0;
  border-radius: 50%;
  background-color: transparent;
  background-image: url("assets/legacy/chips/JETTON_VIEW.png");
  background-repeat: no-repeat;
  background-size: 1400% 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.table-chip {
  background-position: 35.714% 50%;
}

.table-chip--white {
  background-position: 0% 50%;
}

.table-chip--gold {
  background-position: 35.714% 50%;
}

.table-chip--green {
  background-position: 50% 50%;
}

.table-chip--blue {
  background-position: 78.571% 50%;
}

.pot-chip {
  background-position: 42.857% 50%;
}

.table-chip::after {
  display: none;
}

/* Player portraits from CustomUser.png: eight columns by two rows. */
.avatar,
.mini-avatar {
  overflow: hidden;
  color: transparent !important;
  border-radius: 50%;
  background-color: #d8d8d3;
  background-image: url("assets/legacy/avatars/CustomUser.png");
  background-repeat: no-repeat;
  background-size: 800% 200%;
  text-shadow: none;
}

.legacy-avatar--0 {
  background-position: 100% 100%;
}

.legacy-avatar--1 {
  background-position: 0% 0%;
}

.legacy-avatar--2 {
  background-position: 85.714% 0%;
}

.legacy-avatar--3 {
  background-position: 71.429% 0%;
}

.legacy-avatar--4 {
  background-position: 57.143% 0%;
}

.legacy-avatar--5 {
  background-position: 42.857% 0%;
}

.legacy-avatar--6 {
  background-position: 28.571% 0%;
}

.legacy-avatar--7 {
  background-position: 14.286% 0%;
}

.legacy-avatar--8 {
  background-position: 0% 100%;
}

.mini-avatar {
  background-position: 100% 100%;
}

.avatar-shell {
  border-color: #f2d38e;
  background: #16201d;
  box-shadow:
    0 0 0 2px rgba(20, 27, 24, 0.84),
    0 0 0 3px rgba(243, 204, 117, 0.25),
    0 4px 9px rgba(0, 0, 0, 0.42);
}

.seat--hero .avatar-shell {
  border-color: #fff1bd;
  box-shadow:
    0 0 0 2px rgba(20, 27, 24, 0.92),
    0 0 0 3px rgba(255, 222, 139, 0.58),
    0 0 18px rgba(236, 177, 68, 0.26);
}

.player-panel,
.seat--hero .player-panel {
  border-color: rgba(232, 195, 119, 0.45);
  border-radius: 5px;
  background-color: rgba(13, 24, 22, 0.92);
  background-image:
    linear-gradient(120deg, rgba(38, 87, 77, 0.48), rgba(10, 19, 18, 0.83)),
    url("assets/legacy/ui/ACTION_BACK.png");
  background-position: center, 20% center;
  background-size: cover, 600% 100%;
  box-shadow:
    0 6px 15px rgba(0, 0, 0, 0.56),
    inset 0 0 0 1px rgba(255, 238, 190, 0.07);
}

.seat--hero .player-panel {
  border-color: rgba(255, 225, 150, 0.75);
  background-image:
    linear-gradient(120deg, rgba(77, 70, 35, 0.58), rgba(15, 25, 22, 0.88)),
    url("assets/legacy/ui/ACTION_BACK.png");
}

.seat--current .player-panel {
  border-color: #ffe0a0;
  box-shadow:
    0 0 0 1px rgba(255, 235, 182, 0.3),
    0 0 24px rgba(246, 190, 82, 0.35);
}

.seat--winner .player-panel {
  border-color: #fff0b8;
  background-image:
    linear-gradient(120deg, rgba(43, 128, 77, 0.72), rgba(9, 49, 34, 0.9)),
    url("assets/legacy/ui/ACTION_BACK.png");
  box-shadow:
    0 0 0 2px rgba(255, 224, 145, 0.28),
    0 0 26px rgba(89, 220, 134, 0.3);
}

.player-name,
.seat--hero .player-name,
.player-stack {
  color: #fff4d4;
}

.player-stack::before {
  background: #ffd474;
  box-shadow: 0 0 6px rgba(255, 201, 91, 0.5);
}

.player-status {
  color: rgba(239, 228, 196, 0.67);
}

.position-badge {
  color: #17221f;
  border-color: #fff3c9;
  background: linear-gradient(180deg, #ffe6a4, #c99239);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.4);
}

.position-badge--sb,
.position-badge--bb {
  color: #fff3d1;
  border-color: rgba(255, 224, 148, 0.48);
  background: #3d321c;
}

.position-badge--utg {
  color: #fff;
  border-color: rgba(255, 185, 150, 0.54);
  background: #823f35;
}

.action-bubble {
  color: #1b2b27;
  border-color: #fff2ca;
  background: linear-gradient(180deg, #fffbea, #e7d6aa);
}

.empty-seat {
  width: 100%;
  color: rgba(255, 245, 213, 0.6);
  border-color: rgba(238, 213, 156, 0.33);
  background: rgba(22, 50, 42, 0.55);
  font-family: inherit;
}

.empty-seat:hover {
  color: #fff8df;
  border-color: rgba(255, 223, 143, 0.7);
  background: rgba(31, 78, 65, 0.76);
}

.action-dock {
  border-top-color: rgba(234, 187, 89, 0.26);
  background:
    linear-gradient(180deg, rgba(20, 35, 32, 0.97), rgba(8, 15, 14, 0.99));
}

.turn-light {
  background: #62d4ca;
  box-shadow: 0 0 10px rgba(86, 212, 200, 0.72);
}

.action-btn--fold {
  color: #ffe2d4;
  border-color: rgba(235, 140, 111, 0.48);
  background-color: rgba(92, 38, 31, 0.72);
  filter: saturate(0.86);
}

.action-btn--call {
  color: #efffff;
  border-color: rgba(109, 218, 222, 0.45);
  background-color: rgba(19, 82, 83, 0.8);
}

.btn-allin {
  color: #fff3d5;
  border-color: rgba(239, 180, 74, 0.55);
  background-color: rgba(121, 68, 20, 0.58);
}

.raise-control,
.chat-form {
  border-color: rgba(207, 181, 117, 0.24);
  background: rgba(9, 23, 21, 0.68);
}

.raise-control input[type="range"] {
  accent-color: var(--legacy-teal);
}

.raise-control {
  width: min(286px, 27vw);
  padding: 7px 8px;
  flex-direction: row;
  align-items: center;
  gap: 7px;
}

.raise-control-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.raise-step-button {
  display: grid;
  width: 31px;
  height: 36px;
  flex: 0 0 31px;
  place-items: center;
  padding: 0;
  color: #fff0c4;
  border: 1px solid rgba(222, 194, 126, 0.34);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(58, 88, 72, 0.88), rgba(16, 36, 29, 0.95));
  box-shadow:
    inset 0 1px rgba(255, 245, 215, 0.08),
    0 3px 8px rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.raise-step-button:hover:not(:disabled) {
  color: #192a23;
  border-color: #ffe6a7;
  background: linear-gradient(180deg, #f5dc99, #c6953d);
}

.raise-step-button:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

.raise-line {
  margin-bottom: 4px;
}

.side-panel .panel-block {
  border-color: rgba(217, 184, 111, 0.31);
  background:
    linear-gradient(155deg, rgba(24, 48, 43, 0.96), rgba(8, 20, 19, 0.98));
  box-shadow:
    0 7px 20px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 242, 208, 0.05);
}

.room-block {
  position: relative;
  overflow: hidden;
}

.room-block::after {
  position: absolute;
  right: -9px;
  bottom: -7px;
  width: 150px;
  height: 68px;
  content: "";
  background: url("assets/legacy/table/Table.png") 100% 50% / 200% auto no-repeat;
  opacity: 0.16;
  pointer-events: none;
}

.panel-heading h2,
.mini-profile strong,
.mini-stack strong,
.section-title-row h3 {
  color: #fff0c6;
}

.eyebrow,
.section-title-row > span,
.helper-text {
  color: rgba(227, 211, 173, 0.55);
}

.room-stats,
.bot-seat-row {
  border-color: rgba(222, 190, 123, 0.19);
}

.room-stats span,
.bot-seat-row span,
.mini-profile span {
  color: rgba(232, 217, 181, 0.58);
}

.room-stats strong,
.mini-stack strong {
  color: #ffe4a6;
}

.live-badge {
  color: #c9ffe0;
  border-color: rgba(87, 218, 139, 0.35);
  background: rgba(37, 131, 79, 0.24);
}

.quick-phrase {
  border-color: rgba(204, 182, 127, 0.25);
  background: rgba(100, 201, 201, 0.06);
}

.quick-phrase:hover {
  color: #fff1c8;
  border-color: rgba(238, 205, 133, 0.55);
  background: rgba(100, 201, 201, 0.15);
}

.chat-feed {
  background: rgba(3, 13, 12, 0.35);
}

.chat-form input::placeholder {
  color: rgba(220, 207, 174, 0.45);
}

.chat-form button {
  color: #172320;
  background: linear-gradient(180deg, #f0d37f, #c8943a);
}

.rules-dialog {
  border-color: rgba(237, 201, 123, 0.4);
  background:
    linear-gradient(150deg, rgba(25, 69, 56, 0.98), rgba(8, 21, 18, 0.99));
}

@media (max-width: 900px) {
  .table-rim {
    inset: 10.5% 2% 15%;
  }

  .dealer.dealer--legacy {
    transform: translate(-50%, -50%) scale(0.86);
    transform-origin: 50% 0;
  }
}

@media (max-width: 620px) {
  .table-stage {
    background-size: 100% 100%;
  }

  .table-rim {
    inset: 10% 1% 14%;
  }

  .dealer.dealer--legacy {
    transform: translate(-50%, -50%) scale(0.8);
  }

  .board-cluster {
    top: 35%;
    width: 88%;
  }

  .legacy-dealer-button {
    width: 48px !important;
    height: 48px !important;
  }
}
