/* ============================================================
   本局结算面板 — 麻将深色木板风格
   ============================================================ */

/* 面板容器（桌面居中） */
.settle-center {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 32;
  pointer-events: none;
  width: min(94vw, 460px);
}
.settle-center.hidden { display: none; }

/* 主面板：深色木板 + 金边 */
.settle-board {
  background: linear-gradient(160deg, #1f1408 0%, #120d04 100%);
  border: 2px solid #c8a032;
  border-radius: 10px;
  padding: 14px 14px 12px;
  box-shadow:
    0 0 0 1px #6b4e1a inset,
    0 12px 40px rgba(0,0,0,0.75),
    0 0 60px rgba(0,0,0,0.5);
}

/* 标题行 */
.settle-head {
  font-size: 17px;
  font-weight: bold;
  text-align: center;
  color: #ffd700;
  margin-bottom: 6px;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255,215,0,0.6), 0 1px 3px rgba(0,0,0,0.8);
}

/* 胡牌者+牌型行（大标题） */
.settle-head-player,
.settle-name-orange {
  color: #ffb347;
  font-weight: bold;
}
.settle-head-plain {
  color: #e8d8a0;
  font-weight: normal;
}
.settle-hu-xiao {
  color: #ffffff;
  font-weight: bold;
}
.settle-hu-da {
  color: #c77dff;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(199,125,255,0.6);
}
.settle-hu-yao {
  color: #ffd700;
  font-weight: bold;
}

/* 副标题（流局说明） */
.settle-subline {
  font-size: 12px;
  color: #b09060;
  text-align: center;
  margin-bottom: 8px;
  min-height: 0;
}

/* 分隔线 */
.settle-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #c8a032 30%, #c8a032 70%, transparent);
  margin: 8px 0;
  opacity: 0.6;
}

/* 表格容器 */
.settle-table { width: 100%; }

/* 表头 */
.settle-tr {
  display: grid;
  grid-template-columns: 1.3fr 0.5fr 0.5fr 0.85fr 1.3fr;
  gap: 4px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.settle-tr + .settle-tr { margin-top: 3px; }

.settle-th {
  color: #ffd54f;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px 6px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(200,160,50,0.35);
}

/* 数据行 */
.settle-tr:not(.settle-th) {
  background: rgba(255,200,80,0.06);
  border: 1px solid rgba(200,160,50,0.12);
}
.settle-tr-alt {
  background: rgba(255,200,80,0.13) !important;
}

/* 单元格 */
.settle-td {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settle-td-name {
  text-align: left;
  color: #ffb347;
  font-weight: bold;
  font-size: 13px;
}
.settle-td-gang {
  color: #c8a060;
  font-weight: bold;
}
.settle-td-birds {
  color: #ffd700;
  font-weight: bold;
}
.settle-td-money {
  font-weight: bold;
  font-size: 13px;
}
.settle-td-money.pos  { color: #4cdc80; text-shadow: 0 0 6px rgba(76,220,128,0.5); }
.settle-td-money.neg  { color: #ff5555; text-shadow: 0 0 6px rgba(255,85,85,0.5); }
.settle-td-money.zero { color: #888; }

/* 胡牌种类列 */
.settle-td-hu { font-size: 11px; }
.settle-hu-win {
  color: #4cdc80;
  font-weight: bold;
}
.settle-hu-lose {
  color: #ff6b35;
  font-weight: bold;
}

/* 倒计时 */
.settle-countdown {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
  color: #8a7040;
}

.settle-confirm-btn {
  display: block;
  width: min(220px, 72%);
  margin: 14px auto 0;
  padding: 11px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #3e2723;
  background: linear-gradient(180deg, #ffca28, #ff8f00);
  box-shadow: 0 4px 14px rgba(255,143,0,.35);
}
.settle-confirm-btn:hover:not(:disabled) { filter: brightness(1.06); }
.settle-confirm-btn:disabled {
  cursor: default;
  color: #b0bec5;
  background: rgba(255,255,255,.12);
  box-shadow: none;
}
.settle-confirm-btn.hidden { display: none; }

/* ============================================================
   鸟牌展示区
   ============================================================ */
.settle-birds-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
  padding: 10px 12px 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(200,160,50,0.3);
  border-radius: 6px;
}
.settle-birds-label {
  font-size: 12px;
  font-weight: bold;
  color: #ffd54f;
  margin-bottom: 7px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.settle-birds-tiles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

/* 单张鸟牌 */
.settle-bird-tile {
  position: relative;
  width: 36px;
  height: 50px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
  background: #1a1208;
  border: 1px solid rgba(200,160,50,0.2);
}
.settle-bird-tile.bird-hit {
  border: 2px solid #FFD700;
  box-shadow: 0 0 12px rgba(255,215,0,0.9), 0 2px 6px rgba(0,0,0,0.6);
}
.settle-bird-tile .sb-back {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
}
.settle-bird-tile .sb-face {
  position: absolute;
  top: 4%;
  left: 5%;
  right: 5%;
  bottom: 8%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settle-bird-tile .sb-face img {
  max-width: 84%;
  max-height: 84%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.settle-bird-tile .sb-hit-badge {
  position: absolute;
  bottom: 1px;
  right: 1px;
  background: rgba(255,215,0,0.95);
  color: #000;
  font-size: 8px;
  font-weight: bold;
  border-radius: 2px;
  padding: 0 2px;
  line-height: 1.4;
}

/* 中鸟倍率显示 */
.settle-birds-mult {
  margin-top: 8px;
  font-size: 16px;
  font-weight: bold;
  color: #FFD700;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255,215,0,0.8);
}

/* ============================================================
   板牌相关（手牌显示）
   ============================================================ */
.ban-covered-tile {
  position: relative;
  display: inline-block;
}
.ban-face-dim {
  opacity: 0.35;
}
.ban-quad-meld {
  outline: 2px solid #ff9800;
  outline-offset: 2px;
  border-radius: 3px;
}

@media (max-width: 900px) and (orientation: landscape),
       (max-height: 520px) and (orientation: landscape) {
  .settle-center {
    top: 48%;
    width: min(96vw, 400px);
  }
  .settle-board { padding: 10px 10px 8px; }
  .settle-head { font-size: 15px; margin-bottom: 4px; }
  .settle-subline { font-size: 11px; }
  .settle-row { padding: 6px 8px; font-size: 12px; }
  .settle-bird-tile { width: 28px; height: 38px; }
}
