/* ==========================================================================
 * Double-Sided Poker (双面扑克) — Dual-Zone Gold/Crimson 3D Card Table
 * ========================================================================== */

.dsp-arena {
  width: 100%;
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 4px 18px;
}

.dsp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--tg-radius-md);
  background: rgba(12, 14, 22, 0.88);
  border: 1px solid var(--tg-border);
}

.dsp-parity-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.4);
  font-family: var(--tg-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #a5f3fc;
}

/* Main Dual-Zone Velvet Table */
.dsp-table {
  position: relative;
  border-radius: 28px;
  padding: 22px 20px 24px;
  background:
    radial-gradient(ellipse 68% 50% at 50% 50%, rgba(56, 14, 30, 0.85) 0%, rgba(16, 15, 28, 0.96) 60%, #07080e 100%);
  border: 2px solid rgba(228, 185, 91, 0.44);
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.82),
    0 24px 64px rgba(0, 0, 0, 0.74),
    0 0 42px rgba(225, 29, 72, 0.18);
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 18px;
  overflow: hidden;
}

.dsp-table.is-double-active {
  border-color: var(--tg-garnet-bright);
  box-shadow:
    inset 0 0 90px rgba(217, 27, 58, 0.25),
    0 0 56px rgba(255, 46, 84, 0.45);
}

.dsp-seat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* Dual Betting Wells (FRONT & BACK) */
.dsp-zones-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 230px;
}

.dsp-plate {
  padding: 11px 14px;
  border-radius: 13px;
  background: rgba(8, 10, 17, 0.84);
  border: 1px solid var(--tg-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dsp-plate.is-active {
  border-color: var(--tg-gold-bright);
  box-shadow: 0 0 22px rgba(228, 185, 91, 0.28);
}

.dsp-plate.is-winner {
  border-color: var(--tg-emerald);
  box-shadow: 0 0 26px rgba(34, 197, 94, 0.38);
}

.dsp-bet-wells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dsp-well {
  padding: 8px 10px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 14, 24, 0.72);
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.dsp-well-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tg-ink-faint);
}

.dsp-well-val {
  font-family: var(--tg-font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--tg-ink-muted);
  margin-top: 2px;
}

.dsp-well.is-front-lit {
  border-color: var(--tg-gold);
  background: rgba(228, 185, 91, 0.14);
  box-shadow: 0 0 18px rgba(228, 185, 91, 0.28);
}

.dsp-well.is-front-lit .dsp-well-title,
.dsp-well.is-front-lit .dsp-well-val {
  color: var(--tg-gold-bright);
}

.dsp-well.is-back-lit {
  border-color: var(--tg-garnet-bright);
  background: rgba(217, 27, 58, 0.18);
  box-shadow: 0 0 18px rgba(255, 46, 84, 0.34);
}

.dsp-well.is-back-lit .dsp-well-title,
.dsp-well.is-back-lit .dsp-well-val {
  color: #ffb3c1;
}

.dsp-well.is-double-lit {
  border-color: #ff4d6d;
  background: linear-gradient(135deg, rgba(255, 46, 84, 0.28), rgba(228, 185, 91, 0.22));
  box-shadow: 0 0 24px rgba(255, 46, 84, 0.5);
  animation: dsp-double-pulse 1.5s ease-in-out infinite;
}

@keyframes dsp-double-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 46, 84, 0.42); }
  50% { box-shadow: 0 0 28px rgba(228, 185, 91, 0.6); }
}

/* Bespoke 3D Dual-Faced Metallic Card */
.dsp-card-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dsp-card-3d {
  width: 126px;
  height: 176px;
  perspective: 1100px;
  cursor: pointer;
}

.dsp-card-3d .tg-card-3d-inner {
  transition: transform 0.65s cubic-bezier(0.2, 0.88, 0.25, 1);
}

.dsp-face-gold {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 25%, rgba(228, 185, 91, 0.28), transparent 65%),
    linear-gradient(155deg, #272215 0%, #14120d 65%, #090806 100%);
  border: 2px solid var(--tg-gold);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.78),
    0 0 28px rgba(228, 185, 91, 0.25),
    inset 0 0 24px rgba(228, 185, 91, 0.1);
}

.dsp-face-crimson {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 46, 84, 0.34), transparent 65%),
    linear-gradient(155deg, #350d1a 0%, #18070e 65%, #090306 100%);
  border: 2px solid var(--tg-garnet-bright);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.8),
    0 0 32px rgba(255, 46, 84, 0.38),
    inset 0 0 24px rgba(255, 46, 84, 0.14);
}

.dsp-card-num {
  font-family: var(--tg-font-display);
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
}

.dsp-face-gold .dsp-card-num {
  background: linear-gradient(180deg, #fff9e0 0%, #e4b95b 58%, #9b7225 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dsp-face-crimson .dsp-card-num {
  background: linear-gradient(180deg, #ffe4ea 0%, #ff4769 58%, #ad0c2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dsp-card-corner {
  position: absolute;
  font-family: var(--tg-font-mono);
  font-size: 12px;
  font-weight: 800;
}

.dsp-card-corner.tl { top: 9px; left: 10px; }
.dsp-card-corner.br { bottom: 9px; right: 10px; }

.dsp-dual-pip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(10, 12, 20, 0.9);
  border: 1px solid var(--tg-border);
  font-family: var(--tg-font-mono);
  font-size: 12px;
  font-weight: 800;
}

/* Center Pot & Double-Bet Jackpot Indicator */
.dsp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dsp-pot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dsp-pot-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 24px;
  border-radius: 999px;
  background: rgba(10, 12, 22, 0.94);
  border: 1.5px solid var(--tg-gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.68), 0 0 24px rgba(228, 185, 91, 0.24);
}

.dsp-jackpot-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 46, 84, 0.28), rgba(228, 185, 91, 0.22));
  border: 1.5px solid var(--tg-garnet-bright);
  color: #ffe2e8;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  box-shadow: 0 0 28px rgba(255, 46, 84, 0.45);
  animation: dsp-double-pulse 1.4s ease-in-out infinite;
}

.dsp-banner {
  width: 100%;
  max-width: 600px;
  padding: 14px 18px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(22, 26, 44, 0.95), rgba(10, 12, 22, 0.97));
  border: 1.5px solid var(--tg-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.dsp-banner.is-jackpot {
  background: linear-gradient(135deg, rgba(102, 10, 30, 0.95), rgba(38, 8, 18, 0.97));
  border-color: var(--tg-garnet-bright);
  box-shadow: 0 14px 44px rgba(255, 46, 84, 0.45);
}

/* Controls & Side Selector */
.dsp-controls {
  padding: 14px 16px;
  border-radius: var(--tg-radius-md);
  background: rgba(10, 12, 20, 0.93);
  border: 1px solid var(--tg-border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dsp-side-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dsp-side-btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--tg-border);
  background: rgba(18, 22, 36, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.16s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.dsp-side-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.dsp-side-btn.is-front.is-selected {
  border-color: var(--tg-gold-bright);
  background: rgba(228, 185, 91, 0.18);
  box-shadow: 0 0 22px rgba(228, 185, 91, 0.34);
}

.dsp-side-btn.is-back.is-selected {
  border-color: var(--tg-garnet-bright);
  background: rgba(217, 27, 58, 0.2);
  box-shadow: 0 0 22px rgba(255, 46, 84, 0.38);
}

.dsp-side-btn.is-both {
  border-color: rgba(255, 46, 84, 0.45);
}

.dsp-side-btn.is-both.is-selected {
  border-color: #ff4d6d;
  background: linear-gradient(135deg, rgba(255, 46, 84, 0.3), rgba(228, 185, 91, 0.22));
  box-shadow: 0 0 28px rgba(255, 46, 84, 0.5);
}

.dsp-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dsp-act-btn {
  min-height: 48px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
}

.dsp-act-btn small {
  font-family: var(--tg-font-mono);
  font-size: 10.5px;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .dsp-table {
    padding: 15px 12px 18px;
    border-radius: 20px;
  }
  .dsp-card-3d {
    width: 104px;
    height: 146px;
  }
  .dsp-card-num {
    font-size: 48px;
  }
  .dsp-side-selector,
  .dsp-action-grid {
    grid-template-columns: 1fr;
  }
}
