.scoring-page {
  display: grid;
  gap: 20px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.players-grid.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.players-grid.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.player-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.player-card h2 {
  font-size: 30px;
  margin: 0 0 8px;
}

.turn-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.score-big {
  font-size: 72px;
  font-weight: 800;
  margin-bottom: 16px;
}

.special-stats {
  display: grid;
  gap: 8px;
  font-size: 22px;
  margin-bottom: 20px;
}

.action-grid {
  display: grid;
  gap: 12px;
}

.action-grid.four-grid {
  grid-template-columns: repeat(4, 1fr);
}

.action-grid.three-grid {
  grid-template-columns: repeat(3, 1fr);
}

.action-btn {
  min-height: 72px;
  border: none;
  border-radius: 16px;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  color: white;
}

.action-btn.gold {
  background: #d97706;
}

.action-btn.blue {
  background: #2563eb;
}

.action-btn.green {
  background: #16a34a;
}

.action-btn.red {
  background: #dc2626;
}

.action-btn.purple {
  background: #7c3aed;
}

.action-btn.orange {
  background: #ea580c;
}

.action-btn.ball1 {
  background: #b91c1c;
}

.action-btn.ball2 {
  background: #eab308;
  color: #111;
}

.action-btn.ball3 {
  background: #16a34a;
}

.action-btn.ball4 {
  background: #7c2d12;
}

.action-btn.ball5 {
  background: #2563eb;
}

.action-btn.ball6 {
  background: #db2777;
}

.action-btn.ball7 {
  background: #111827;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  background: #f9fafb;
  border-radius: 12px;
  padding: 14px 16px;
}

.timeline-title {
  font-size: 20px;
  font-weight: 700;
}

.timeline-meta {
  font-size: 14px;
  color: #666;
  margin-top: 6px;
}

/* ===== 3P 专用 ===== */

.scoring-page-3p {
  height: calc(100vh - 120px);
  overflow: hidden;
}

.players-grid-3p {
  height: calc(100vh - 220px);
  align-items: stretch;
}

.player-card-3p {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding: 14px 14px 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.player-head-3p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
}

.player-name-3p {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.turn-badge-3p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 24px;
  font-weight: 900;
  white-space: nowrap;
  color: #fff;
}

.turn-badge-3p.turn-current {
  background: #16a34a;
}

.turn-badge-3p.turn-next {
  background: #ea580c;
}

.turn-badge-3p.turn-third {
  background: #6b7280;
}

.score-wrap-3p {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-big-3p {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: 100%;
  font-size: clamp(170px, 15vw, 320px);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  margin: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.special-stats-3p {
  display: grid;
  gap: 4px;
  font-size: 18px;
  margin-bottom: 0;
}

.special-stats-3p .stats-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-grid-3p.top-row {
  grid-template-columns: repeat(4, 1fr);
}

.action-grid-3p.mid-row {
  grid-template-columns: repeat(3, 1fr);
}

.action-grid-3p.bottom-row {
  grid-template-columns: 1fr;
}

.player-card-3p .action-btn {
  min-height: 54px;
  font-size: 20px;
  border-radius: 14px;
  color: #fff !important;
}

.btn-big-gold {
  background: #ea580c;
}

.btn-small-gold {
  background: #f59e0b;
}

.btn-normal-win {
  background: #16a34a;
}

.btn-golden-nine {
  background: #7c3aed;
}

.btn-foul {
  background: #dc2626;
}

.btn-pass-penalty {
  background: #ea580c;
}

.btn-lose-round {
  background: #2563eb;
}

.btn-touch-gold-active {
  background: #facc15;
}

.btn-touch-gold-inactive {
  background: #9ca3af;
}

.disabled-btn {
  background: #d1d5db !important;
  color: #f3f4f6 !important;
  cursor: not-allowed;
}

.player-card-3p.score-pop {
  transform: scale(1.025);
}

.player-card-3p.score-up .score-big-3p {
  color: #16a34a;
  transform: scale(1.08);
}

.player-card-3p.score-down .score-big-3p {
  color: #dc2626;
  transform: scale(1.08);
}

/* ===== 追分专用 ===== */

.scoring-page-cp {
  height: calc(100vh - 120px);
  overflow: hidden;
}

.players-grid-cp {
  height: calc(100vh - 220px);
  align-items: stretch;
}

.player-card-cp {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding: 14px 14px 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.player-head-cp {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.player-name-cp {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.score-wrap-cp {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-big-cp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: 100%;
  font-size: clamp(170px, 15vw, 320px);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  margin: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.special-stats-cp {
  display: grid;
  gap: 4px;
  font-size: 18px;
  margin-bottom: 0;
}

.special-stats-cp .stats-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-grid-cp.top-row {
  grid-template-columns: repeat(4, 1fr);
}

.action-grid-cp.mid-row {
  grid-template-columns: 1fr;
}

.action-grid-cp.bottom-row {
  grid-template-columns: 1fr;
}

.player-card-cp .action-btn {
  min-height: 54px;
  font-size: 20px;
  border-radius: 14px;
  color: #fff !important;
}

.player-card-cp.score-pop {
  transform: scale(1.025);
}

.player-card-cp.score-up .score-big-cp {
  color: #16a34a;
  transform: scale(1.08);
}

.player-card-cp.score-down .score-big-cp {
  color: #dc2626;
  transform: scale(1.08);
}

/* ===== 中八 ===== */

.scoring-page-ce {
  height: calc(100vh - 120px);
  overflow: hidden;
}

.players-grid-ce {
  height: calc(100vh - 220px);
  align-items: stretch;
}

.player-card-ce {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding: 14px 14px 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.player-head-ce {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.player-name-ce {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.score-wrap-ce {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-big-ce {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: 100%;
  font-size: clamp(170px, 15vw, 320px);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  margin: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.special-stats-ce {
  display: grid;
  gap: 4px;
  font-size: 18px;
  margin-bottom: 0;
}

.special-stats-ce .stats-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-grid-ce.top-row {
  grid-template-columns: repeat(4, 1fr);
}

.player-card-ce .action-btn {
  min-height: 54px;
  font-size: 20px;
  border-radius: 14px;
  color: #fff !important;
}

.player-card-ce.score-pop {
  transform: scale(1.025);
}

.player-card-ce.score-up .score-big-ce {
  color: #16a34a;
  transform: scale(1.08);
}

.player-card-ce.score-down .score-big-ce {
  color: #dc2626;
  transform: scale(1.08);
}

/* ===== 标九 ===== */

.scoring-page-nb {
  height: calc(100vh - 120px);
  overflow: hidden;
}

.players-grid-nb {
  height: calc(100vh - 220px);
  align-items: stretch;
}

.player-card-nb {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding: 14px 14px 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.player-head-nb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.player-name-nb {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.score-wrap-nb {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-big-nb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: 100%;
  font-size: clamp(170px, 15vw, 320px);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  margin: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.special-stats-nb {
  display: grid;
  gap: 4px;
  font-size: 18px;
  margin-bottom: 0;
}

.special-stats-nb .stats-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.action-grid-nb.top-row {
  grid-template-columns: repeat(4, 1fr);
}

.player-card-nb .action-btn {
  min-height: 54px;
  font-size: 20px;
  border-radius: 14px;
  color: #fff !important;
}

.player-card-nb.score-pop {
  transform: scale(1.025);
}

.player-card-nb.score-up .score-big-nb {
  color: #16a34a;
  transform: scale(1.08);
}

.player-card-nb.score-down .score-big-nb {
  color: #dc2626;
  transform: scale(1.08);
}

/* ===== 斯诺克 ===== */

.scoring-page-sn {
  height: calc(100vh - 120px);
  overflow: hidden;
}

.players-grid-sn {
  height: calc(100vh - 220px);
  align-items: stretch;
}

.player-card-sn {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  height: 100%;
  overflow: hidden;
  padding: 14px 14px 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.player-head-sn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
}

.player-name-sn {
  font-size: 52px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.score-wrap-sn {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-big-sn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  height: 100%;
  font-size: clamp(170px, 15vw, 320px);
  font-weight: 900;
  line-height: 0.9;
  text-align: center;
  margin: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.special-stats-sn {
  display: grid;
  gap: 4px;
  font-size: 16px;
  margin-bottom: 0;
}

.special-stats-sn .stats-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.action-grid-sn.balls-row {
  grid-template-columns: repeat(8, 1fr);
}

.player-card-sn .action-btn {
  min-height: 54px;
  font-size: 18px;
  border-radius: 14px;
  color: #fff !important;
}

.player-card-sn.score-pop {
  transform: scale(1.025);
}

.player-card-sn.score-up .score-big-sn {
  color: #16a34a;
  transform: scale(1.08);
}

.player-card-sn.score-down .score-big-sn {
  color: #dc2626;
  transform: scale(1.08);
}

/* ===== 斯诺克新版布局 ===== */

.snooker-stage {
  position: relative;
  height: calc(100vh - 220px);
}

.players-grid-sn {
  height: 100%;
}

.snooker-center-board {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.snooker-center-board .frame-line {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.snooker-center-board .match-line {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 4px;
}

.ball-stats-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ball-chip {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}

.red-ball { background: #b91c1c; }
.yellow-ball { background: #eab308; color: #111; }
.green-ball { background: #16a34a; }
.brown-ball { background: #7c2d12; }
.blue-ball { background: #2563eb; }
.pink-ball { background: #db2777; }
.black-ball { background: #111827; }