* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #060e06;
  font-family: 'Microsoft YaHei', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px;
  color: #fff;
}

#app {
  width: 960px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* HEADER */
#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: rgba(0,0,0,0.5);
  border-radius: 10px;
  border: 1px solid #2a5a2a;
}
#title {
  font-size: 22px;
  font-weight: bold;
  color: #f0c040;
  letter-spacing: 8px;
  text-shadow: 0 0 14px #f0c040aa;
}
#round-display { color: #888; font-size: 13px; }

/* ROUND TABLE */
#table-wrap {
  position: relative;
  width: 960px;
  height: 510px;
}

#felt {
  position: absolute;
  left: 170px;
  top: 90px;
  width: 620px;
  height: 300px;
  background: radial-gradient(ellipse at center, #1d6632 0%, #0e3d1c 65%, #082910 100%);
  border-radius: 50%;
  border: 6px solid #8B6914;
  box-shadow:
    0 0 0 3px #5a4010,
    0 0 50px rgba(0,0,0,0.7),
    inset 0 0 60px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

#center-info {
  text-align: center;
  pointer-events: none;
}
#pot-label { font-size: 12px; color: #aaa; letter-spacing: 4px; margin-bottom: 2px; }
#pot-value {
  font-size: 32px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 12px #ffd700aa;
}
#stake-info { font-size: 12px; color: #888; margin-top: 4px; }
#stake-info span { color: #f0c040; font-weight: bold; }

/* SEATS */
.seat {
  position: absolute;
  width: 145px;
  background: rgba(5, 20, 5, 0.88);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.3s, box-shadow 0.3s;
  z-index: 2;
}

.seat.active {
  border-color: #f0c040;
  box-shadow: 0 0 18px rgba(240,192,64,0.6);
  animation: glow 1s ease-in-out infinite alternate;
}
.seat.folded { opacity: 0.38; filter: grayscale(0.7); }
.seat.allin  { border-color: #ff5555; box-shadow: 0 0 14px rgba(255,85,85,0.5); }

@keyframes glow {
  from { box-shadow: 0 0 12px rgba(240,192,64,0.5); }
  to   { box-shadow: 0 0 24px rgba(240,192,64,0.9); }
}

/* seat positions (clock-face around oval) */
#seat-0 { left: 15px;  top: 300px; } /* 老虎  8:00 */
#seat-1 { left: 15px;  top: 125px; } /* 狐狸  10:00 */
#seat-2 { left: 180px; top: 10px;  } /* 乌龟  11:30 */
#seat-3 { left: 555px; top: 10px;  } /* 赌神  12:30 */
#seat-4 { left: 798px; top: 125px; } /* 新手  2:00 */
#seat-5 { left: 798px; top: 300px; } /* 疯子  4:00 */
#seat-h {
  left: 370px; top: 390px;
  width: 220px;
  border-color: rgba(240,192,64,0.3);
  background: rgba(5,20,5,0.95);
}

.seat-header {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}
.seat-avatar { font-size: 18px; }
.seat-name   { font-size: 12px; font-weight: bold; color: #f0e0a0; flex: 1; }
.seat-chips  { font-size: 11px; color: #ffd700; white-space: nowrap; }

.seat-desc {
  font-size: 9px;
  color: #666;
  text-align: center;
  line-height: 1.3;
  width: 100%;
}

.seat-cards {
  display: flex;
  gap: 3px;
  align-items: center;
  min-height: 55px;
  justify-content: center;
}

.seat-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

/* STATUS BADGES */
.badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 8px;
  font-weight: bold;
  white-space: nowrap;
}
.badge-blind  { background:#1a3d7a; color:#88aaff; }
.badge-seen   { background:#1a5a1a; color:#88ff88; }
.badge-fold   { background:#4a1010; color:#ff8888; }
.badge-allin  { background:#6a1010; color:#ff4444; }

.bet-amt {
  font-size: 10px;
  color: #f0c040;
}

/* CARDS */
.card {
  border-radius: 5px;
  background: #fff;
  border: 1px solid #bbb;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  box-shadow: 1px 2px 5px rgba(0,0,0,0.6);
  user-select: none;
  flex-shrink: 0;
}
.card.red   { color: #cc0000; }
.card.black { color: #111; }

/* normal size (human) */
.card.n { width: 52px; height: 74px; padding: 3px 4px; }
.card.n .cr { font-size: 12px; line-height: 1; }
.card.n .cs { font-size: 20px; line-height: 1; }

/* small size (AI seats) */
.card.s { width: 36px; height: 52px; padding: 2px 3px; }
.card.s .cr { font-size: 10px; line-height: 1; }
.card.s .cs { font-size: 14px; line-height: 1; }

.cr.bot { transform: rotate(180deg); }

.card-back {
  background: linear-gradient(145deg, #1a3585, #0d2060);
  border: 2px solid #3a5aaa;
  position: relative;
  overflow: hidden;
}
.card-back::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 3px,
    rgba(255,255,255,0.06) 3px, rgba(255,255,255,0.06) 6px
  );
}

@keyframes dealIn {
  from { opacity: 0; transform: scale(0.6) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.deal-anim { animation: dealIn 0.25s ease-out; }

.hand-label {
  font-size: 11px;
  color: #aaa;
  margin-left: 4px;
  align-self: center;
}

/* 位置1：日志/信息面板，毡布左侧 */
#log-wrap {
  position: absolute;
  left: 182px;
  top: 175px;
  width: 195px;
  height: 155px;
  background: rgba(0,0,0,0.70);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 3;
}

#info-panel {
  font-size: 11px;
  color: #888;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 3px;
  line-height: 1.7;
}
#info-round { color: #f0c040; font-weight: bold; font-size: 12px; }
#info-pot span   { color: #ffd700; font-weight: bold; }
#info-stake span { color: #aaa; }
#info-players { color: #555; }

#log-box {
  flex: 1;
  overflow-y: auto;
  font-size: 10px;
  color: #bbb;
  line-height: 1.55;
  pointer-events: auto;
}
#log-box::-webkit-scrollbar { width: 3px; }
#log-box::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }
.log-hi { color: #f0c040; }

/* 位置3：操作按钮，右下角 */
#action-wrap {
  position: absolute;
  left: 600px;
  top: 450px;
  width: 355px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  background: rgba(0,0,0,0.6);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 10px 12px;
  z-index: 3;
}

/* 位置2：轮到你了/思考中，毡布右侧 */
#turn-banner {
  position: absolute;
  left: 565px;
  top: 190px;
  width: 210px;
  font-size: 14px;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 12px;
  letter-spacing: 1px;
  text-align: center;
  z-index: 3;
}
#turn-banner.your-turn {
  background: rgba(240,192,64,0.18);
  border: 1px solid #f0c040;
  color: #f0c040;
}
#turn-banner.waiting {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.12);
  color: #888;
}
#turn-banner.empty { display: none; }

#actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}

/* BUTTONS */
.btn {
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.15s, transform 0.1s;
  letter-spacing: 0.5px;
}
.btn:hover  { filter: brightness(1.18); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-start   { background: linear-gradient(135deg,#f0c040,#c08010); color:#000; font-size:16px; padding:12px 32px; }
.btn-look    { background: linear-gradient(135deg,#2a8a30,#155a1a); color:#fff; }
.btn-call    { background: linear-gradient(135deg,#2060bb,#104088); color:#fff; }
.btn-raise   { background: linear-gradient(135deg,#b86010,#7a3a08); color:#fff; }
.btn-fold    { background: linear-gradient(135deg,#882020,#551010); color:#fff; }
.btn-compare { background: linear-gradient(135deg,#208888,#105555); color:#fff; }
.btn-allin   { background: linear-gradient(135deg,#882288,#551055); color:#fff; }
.btn-next    { background: linear-gradient(135deg,#f0c040,#c08010); color:#000; }

/* compare select */
.cmp-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  transition: background 0.15s;
}
.cmp-btn:hover { background: rgba(255,255,255,0.18); border-color:#f0c040; }

/* HAND RANK LEGEND */
#rank-legend {
  font-size: 11px;
  color: #555;
  text-align: center;
  letter-spacing: 0.5px;
}

/* MODAL */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
#modal.hidden { display: none; }
#modal-box {
  background: linear-gradient(160deg,#152515,#0c180c);
  border: 2px solid #8B6914;
  border-radius: 16px;
  padding: 28px 36px;
  max-width: 620px;
  width: 92%;
  text-align: center;
  box-shadow: 0 0 50px rgba(0,0,0,0.9);
}
#modal-title {
  font-size: 22px;
  font-weight: bold;
  color: #f0c040;
  margin-bottom: 16px;
  text-shadow: 0 0 12px #f0c040aa;
}
#modal-body {
  margin-bottom: 20px;
  line-height: 1.9;
}
#modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  justify-content: center;
  flex-wrap: wrap;
}
.result-row.winner-row {
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.4);
  border-radius: 10px;
  margin-bottom: 4px;
}
.result-cards { display: flex; gap: 4px; }
.hand-name {
  font-size: 12px; margin-left: 6px; padding: 2px 8px; border-radius: 6px;
  background: rgba(240,192,64,0.2); color: #f0c040; font-weight: bold;
}
.result-hand {
  font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: rgba(255,255,255,0.08); color: #ccc;
}
.result-hand.top { background: rgba(240,192,64,0.25); color:#f0c040; }
.result-chips { font-size: 13px; color: #ffd700; }
