/* ==========================================================================
 * Indian Poker (印第安扑克) — Obsidian Broadcast Poker Arena Styling
 * ========================================================================== */

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

/* Top Telemetry Bar: Shoe Counter + Card Counting Tracker */
.ip-shoe-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--tg-radius-md);
  background: rgba(12, 14, 22, 0.86);
  border: 1px solid var(--tg-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.ip-shoe-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--tg-ink-muted);
}

.ip-shoe-count {
  font-family: var(--tg-font-mono);
  font-weight: 800;
  color: var(--tg-gold-bright);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(228, 185, 91, 0.14);
  border: 1px solid rgba(228, 185, 91, 0.38);
}

.ip-tracker-grid {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ip-tracker-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 30px;
  padding: 4px 5px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--tg-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--tg-ink-muted);
  transition: border-color 0.2s, opacity 0.2s;
}

.ip-tracker-cell.is-ten {
  border-color: rgba(255, 46, 84, 0.42);
  color: #ff8ba0;
}

.ip-tracker-cell.is-exhausted {
  opacity: 0.35;
}

.ip-tracker-pips {
  display: flex;
  gap: 3px;
}

.ip-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tg-gold);
  box-shadow: 0 0 6px var(--tg-gold-glow);
}

.ip-tracker-cell.is-ten .ip-pip {
  background: var(--tg-garnet-bright);
  box-shadow: 0 0 6px var(--tg-garnet-glow);
}

.ip-pip.is-spent {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.ip-pip.is-live-opp {
  background: var(--tg-cyan);
  box-shadow: 0 0 8px var(--tg-cyan-glow);
}

/* Main Obsidian Poker Felt Table */
.ip-table {
  position: relative;
  border-radius: 28px;
  padding: 24px 22px 26px;
  background:
    radial-gradient(ellipse 68% 54% at 50% 48%, rgba(36, 16, 26, 0.92) 0%, rgba(13, 15, 24, 0.98) 68%, #07080d 100%);
  border: 2px solid rgba(228, 185, 91, 0.42);
  box-shadow:
    inset 0 0 70px rgba(0, 0, 0, 0.85),
    inset 0 0 0 8px rgba(228, 185, 91, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.72),
    0 0 42px rgba(217, 27, 58, 0.16);
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 18px;
  overflow: hidden;
}

.ip-table::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 20px;
  border: 1px dashed rgba(228, 185, 91, 0.18);
  pointer-events: none;
}

.ip-table.is-penalty-flash {
  animation: ip-penalty-shake 0.7s ease-out;
  border-color: var(--tg-garnet-bright);
  box-shadow:
    inset 0 0 90px rgba(217, 27, 58, 0.45),
    0 0 60px rgba(255, 46, 84, 0.55);
}

@keyframes ip-penalty-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-7px); }
  30% { transform: translateX(7px); }
  45% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-2px); }
}

/* Seat Zones */
.ip-seat-zone {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ip-player-plate {
  min-width: 190px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(8, 10, 17, 0.78);
  border: 1px solid var(--tg-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

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

.ip-player-plate.is-winner {
  border-color: var(--tg-emerald);
  box-shadow: 0 0 28px rgba(34, 197, 94, 0.35);
}

.ip-plate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ip-plate-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--tg-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.ip-chip-stack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ip-chip-visual {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ip-mini-chip-tower {
  display: flex;
  align-items: center;
}

.ip-mini-disc {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6b86, #b81131 65%, #4a0412);
  border: 1.5px dashed rgba(228, 185, 91, 0.85);
  margin-left: -7px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.65);
}

.ip-mini-disc:first-child {
  margin-left: 0;
}

.ip-chip-num {
  font-family: var(--tg-font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--tg-gold-bright);
  text-shadow: 0 0 12px var(--tg-gold-glow);
}

.ip-bet-pill {
  font-family: var(--tg-font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(217, 27, 58, 0.2);
  border: 1px solid rgba(255, 46, 84, 0.5);
  color: #ffb3c1;
}

/* Dramatic Forehead Card (3D Flippable) */
.ip-card-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ip-card-caption {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tg-ink-muted);
}

.ip-card-3d {
  width: 124px;
  height: 174px;
  perspective: 1100px;
}

.ip-card-3d .tg-card-3d-inner {
  transition: transform 0.72s cubic-bezier(0.2, 0.9, 0.25, 1);
}

.ip-card-face-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 25%, rgba(228, 185, 91, 0.18), transparent 64%),
    linear-gradient(160deg, #1f253a 0%, #0d101b 65%, #07080e 100%);
  border: 2px solid var(--tg-gold);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.75),
    0 0 28px rgba(228, 185, 91, 0.22),
    inset 0 0 24px rgba(228, 185, 91, 0.08);
}

.ip-card-face-front.is-card-ten {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 46, 84, 0.34), transparent 66%),
    linear-gradient(160deg, #3a101d 0%, #17070d 65%, #0b0306 100%);
  border-color: var(--tg-garnet-bright);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.8),
    0 0 38px rgba(255, 46, 84, 0.45),
    inset 0 0 26px rgba(255, 46, 84, 0.18);
}

.ip-card-corner {
  position: absolute;
  font-family: var(--tg-font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--tg-gold);
  line-height: 1;
}

.ip-card-corner.is-tl { top: 10px; left: 11px; }
.ip-card-corner.is-br { bottom: 10px; right: 11px; transform: rotate(180deg); }

.ip-card-face-front.is-card-ten .ip-card-corner {
  color: #ff8ba0;
}

.ip-card-big-num {
  font-family: var(--tg-font-display);
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #fff8dc 0%, #e4b95b 60%, #9b7225 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 12px rgba(228, 185, 91, 0.35));
}

.ip-card-face-front.is-card-ten .ip-card-big-num {
  background: linear-gradient(180deg, #ffe2e8 0%, #ff3d62 55%, #b50c2b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 4px 18px rgba(255, 46, 84, 0.6));
}

.ip-card-sub {
  margin-top: 6px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(228, 185, 91, 0.72);
}

/* Mystery Crimson-Foil Mirror Back */
.ip-card-mirror-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(255, 46, 84, 0.24) 0%, transparent 45%, rgba(228, 185, 91, 0.14) 100%),
    repeating-linear-gradient(
      -45deg,
      rgba(217, 27, 58, 0.08) 0px,
      rgba(217, 27, 58, 0.08) 2px,
      transparent 2px,
      transparent 10px
    ),
    radial-gradient(circle at 50% 50%, #2b0b16 0%, #0d0a14 75%);
  border: 2px solid rgba(255, 46, 84, 0.65);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.8),
    0 0 32px rgba(217, 27, 58, 0.34),
    inset 0 0 28px rgba(255, 46, 84, 0.18);
}

.ip-mirror-q {
  font-family: var(--tg-font-display);
  font-size: 58px;
  font-weight: 900;
  color: #ff6280;
  text-shadow: 0 0 24px rgba(255, 46, 84, 0.75);
  line-height: 1;
}

.ip-mirror-tag {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 200, 210, 0.75);
}

/* Center Pot & Status Console */
.ip-center-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
}

.ip-pot-orb {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(24, 15, 24, 0.94), rgba(11, 13, 22, 0.96));
  border: 1.5px solid var(--tg-gold);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.7),
    0 0 28px rgba(228, 185, 91, 0.24),
    inset 0 1px 0 rgba(255, 240, 194, 0.28);
  animation: ip-pot-pulse 2.6s ease-in-out infinite;
}

@keyframes ip-pot-pulse {
  0%, 100% { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.7), 0 0 22px rgba(228, 185, 91, 0.2); }
  50% { box-shadow: 0 12px 34px rgba(0, 0, 0, 0.7), 0 0 36px rgba(228, 185, 91, 0.4); }
}

.ip-pot-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-ink-muted);
}

.ip-pot-value {
  font-family: var(--tg-font-mono);
  font-size: 30px;
  font-weight: 900;
  color: var(--tg-gold-bright);
  text-shadow: 0 0 18px var(--tg-gold-glow);
  line-height: 1;
}

.ip-resolution-banner {
  width: 100%;
  max-width: 560px;
  padding: 14px 18px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(135deg, rgba(24, 29, 46, 0.95), rgba(12, 14, 24, 0.97));
  border: 1.5px solid var(--tg-gold);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ip-resolution-banner.is-penalty {
  background: linear-gradient(135deg, rgba(95, 10, 26, 0.94), rgba(32, 6, 12, 0.96));
  border-color: var(--tg-garnet-bright);
  box-shadow: 0 14px 42px rgba(217, 27, 58, 0.45);
}

.ip-resolution-title {
  font-family: var(--tg-font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--tg-gold-bright);
}

.ip-resolution-banner.is-penalty .ip-resolution-title {
  color: #ffc2ce;
}

.ip-resolution-sub {
  font-size: 13px;
  color: var(--tg-ink-muted);
}

/* Judge Mode Strip */
.ip-judge-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ip-judge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--tg-border);
  background: rgba(14, 17, 28, 0.9);
}

.ip-judge-chip.is-go {
  border-color: rgba(34, 197, 94, 0.55);
  color: #86efac;
}

.ip-judge-chip.is-fold {
  border-color: rgba(255, 46, 84, 0.55);
  color: #ff99ab;
}

/* Action History Tape */
.ip-action-tape {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}

.ip-tape-pill {
  font-family: var(--tg-font-mono);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tg-ink-muted);
}

/* Controls Console */
.ip-controls {
  padding: 14px 16px;
  border-radius: var(--tg-radius-md);
  background: rgba(10, 12, 20, 0.92);
  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;
}

.ip-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.ip-raise-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.ip-slider {
  flex: 1;
  min-width: 120px;
  accent-color: var(--tg-garnet-bright);
  cursor: pointer;
}

.ip-quick-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.ip-action-btn {
  min-height: 48px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
}

.ip-action-btn small {
  font-family: var(--tg-font-mono);
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.85;
}

.ip-penalty-warn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(217, 27, 58, 0.14);
  border: 1px solid rgba(255, 46, 84, 0.4);
  font-size: 12px;
  font-weight: 600;
  color: #ff99ab;
}

.ip-waiting-bar {
  text-align: center;
  padding: 14px;
  font-size: 13.5px;
  color: var(--tg-ink-muted);
}

@media (max-width: 640px) {
  .ip-table {
    padding: 16px 12px 18px;
    border-radius: 20px;
  }
  .ip-card-3d {
    width: 104px;
    height: 148px;
  }
  .ip-card-big-num {
    font-size: 50px;
  }
  .ip-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
