/* 天天欢娱战绩界面样式。
   所有尺寸都写成 1560x720 设计坐标系里的 px，由 record-original-fix.js 对
   .aw-record-stage 做一次等比缩放（contain）适配任意窗口，屏幕留白由 #aw-record-dom 底色填充。
   这样在任何分辨率/长宽比下都保持原版比例，不再出现拉伸变形或内容被裁切。 */

#aw-record-dom {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  isolation: isolate;
  overflow: hidden;
  background: #190333;
  color: #fff;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  user-select: none;
}

#aw-record-dom *,
#aw-record-dom *::before,
#aw-record-dom *::after {
  box-sizing: border-box;
}

#aw-record-dom button {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: inherit;
  font: inherit;
  background: transparent;
  cursor: pointer;
}

#aw-record-dom .aw-hidden { display: none !important; }

/* 唯一的设计舞台：1560x720，居中后整体等比缩放。 */
.aw-record-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1560px;
  height: 720px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: 50% 50%;
}

.aw-record-list-page,
.aw-record-detail-page,
.aw-record-replay-page {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* 列表页底图原生 1560x720，与舞台 1:1。 */
.aw-record-list-page {
  z-index: 10;
  background: url('record_img_bg.jpg') 0 0 / 1560px 720px no-repeat;
}

/* 标题素材原生 184x145，left 160px 来自底图凹槽。 */
.aw-record-title {
  position: absolute;
  left: 160px;
  top: 0;
  width: 184px;
  height: 145px;
  object-fit: contain;
}

/* 关闭按钮压住底图烧录 × （中心 1512.5,36.3），外圈 49x54 时实心笔画约 48px。 */
.aw-record-close {
  position: absolute;
  z-index: 20;
  right: 23px;
  top: 9px;
  width: 49px;
  height: 54px;
}

.aw-record-close img,
.aw-record-detail-close img,
.aw-replay-exit img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 左侧标签面板（底图凹槽 x145..351）。 */
.aw-record-tabs {
  position: absolute;
  left: 133px;
  top: 182px;
  width: 236px;
  display: flex;
  flex-direction: column;
  gap: 9.7px;
}

.aw-record-tab {
  width: 100%;
  height: 73.8px;
  color: #2871ff !important;
  font-size: 29.9px !important;
  line-height: 73.8px;
  text-align: center;
  text-shadow: 0 0 7.9px rgba(28, 87, 255, .78);
}

.aw-record-tab.is-selected {
  color: #fff !important;
  border: 2.45px solid #ff59c0 !important;
  border-radius: 7.2px;
  background: rgba(72, 0, 84, .28) !important;
  box-shadow: 0 0 8.6px #ff37b0, inset 0 0 10.1px rgba(255, 52, 176, .38);
}

/* 右侧粉色列表面板内框（x384.5..1337.5，顶边 y110）。 */
.aw-record-list {
  position: absolute;
  left: 380.6px;
  right: 218.4px;
  top: 109.2px;
  bottom: 21.6px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
}

.aw-record-list::-webkit-scrollbar,
.aw-record-round-list::-webkit-scrollbar { display: none; }

#aw-record-dom .aw-record-row {
  position: relative;
  width: 100%;
  height: 77.8px;
  margin: 0 0 5.8px;
  overflow: hidden;
  border-radius: 8.6px;
  border: 1px solid rgba(255, 91, 194, .78);
  background: transparent !important;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
}

.aw-record-row-date,
.aw-record-row-game,
.aw-record-row-score,
.aw-record-row-room,
.aw-record-row-rounds {
  position: absolute;
  z-index: 1;
  white-space: nowrap;
  pointer-events: none;
}

.aw-record-row-date {
  left: 6%;
  top: 17%;
  color: #fff;
  font-size: 18.7px;
  line-height: 1;
}

.aw-record-row-room {
  left: 6%;
  bottom: 16%;
  color: rgba(255, 226, 249, .74);
  font-size: 14.4px;
  line-height: 1;
}

.aw-record-row-game {
  left: 50%;
  top: 17%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 21.6px;
  line-height: 1;
  text-align: center;
}

.aw-record-row-rounds {
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  color: rgba(255, 226, 249, .74);
  font-size: 14.4px;
  line-height: 1;
}

.aw-record-row-score {
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  color: #ffed22;
  font-size: 27.4px;
  font-weight: 700;
  line-height: 1;
}

.aw-record-row-score.is-negative { color: #54cfff; }

.aw-record-row-head {
  height: 54.2px;
  padding: 0 2.1%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 22.5px;
  color: #fff;
}

.aw-record-player-grid {
  height: 137px;
  display: grid;
  grid-template-columns: 1.38fr repeat(4, 1fr);
  align-items: stretch;
}

.aw-record-player-cell {
  min-width: 0;
  padding-top: 23px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 2.3px solid rgba(45, 16, 112, .55);
}

.aw-record-player-cell:last-child { border-right: 0; }

.aw-record-player-name {
  width: 100%;
  height: 35.3px;
  padding: 0 7.8px;
  overflow: hidden;
  color: #fff;
  font-size: 22.5px;
  line-height: 35.3px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aw-record-total {
  margin-top: 23px;
  color: #ffed22;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.aw-record-empty,
.aw-record-loading {
  padding-top: 129.6px;
  color: #e5bee9;
  font-size: 21.6px;
  text-align: center;
}

.aw-record-detail-page {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(21, 0, 43, .92);
}

/* 明细底板原生 1142x682，原版按原生尺寸居中显示，不随窗口缩放。 */
.aw-record-detail-shell {
  position: relative;
  width: 1142px;
  height: 682px;
  overflow: hidden;
  background: url('recordDetail_img_bg.png') center / 100% 100% no-repeat;
}

.aw-record-detail-close {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 24px;
  width: 42px;
  height: 42px;
}

.aw-record-detail-player {
  position: absolute;
  left: 129.6px;
  right: 68.5px;
  top: 98.9px;
  height: 34.1px;
  display: flex;
  align-items: center;
  color: #fff;
  font-size: 24px;
}

.aw-record-round-list {
  position: absolute;
  left: 48px;
  right: 48px;
  top: 150.7px;
  bottom: 20.5px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

/* 逐局条目素材原生 1046x80，列表宽 1046 时 1:1 显示。 */
.aw-record-round-row {
  width: 100%;
  height: 80px;
  margin: 2.3px 0;
  padding: 0 6.3px 0 29.3px;
  display: grid;
  grid-template-columns: 5.2% 1fr 14%;
  align-items: center;
  background: url('recordDetail_img_itemBg.png') center / 100% 100% no-repeat;
}

.aw-record-round-no,
.aw-record-round-score {
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  white-space: nowrap;
}

.aw-record-play {
  justify-self: end;
  width: 100%;
  height: 51.8px;
  background: url('record_btn_playback_normal.png') center / contain no-repeat !important;
}

.aw-record-replay-page {
  z-index: 30;
  background: #071735;
}

.aw-replay-space {
  position: absolute;
  inset: 0;
  background-image: url('replay/nn/bg/xkbj.png');
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 133.34% 118.52%;
}

.aw-replay-space::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -11%;
  width: 187.5px;
  height: 191.2px;
  transform: translateX(-50%) scale(2.75);
  transform-origin: 50% 0;
  background: url('replay/nn/bg/xkbj.png') -588.1px -194.3px / 780px 396.4px no-repeat;
}

.aw-replay-exit {
  position: absolute;
  z-index: 8;
  top: 5.5%;
  right: 2.8%;
  width: 64px;
  height: 66.6px;
  filter: drop-shadow(0 0 4.3px rgba(255, 255, 255, .35));
}

.aw-replay-avatar {
  position: absolute;
  z-index: 4;
  left: 13.6%;
  bottom: 1.6%;
  width: 130.3px;
  height: 155.6px;
  padding: 9.4px 7.8px 7.9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: rgba(19, 31, 90, .82);
}

.aw-replay-avatar::after {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: url('replay/nn/image/nn_img_zhuangKuang.png') center / 100% 100% no-repeat;
}

.aw-replay-avatar-head {
  position: relative;
  z-index: 2;
  width: 73.7%;
  height: 62.7%;
  border-radius: 6.5px;
  object-fit: cover;
}

.aw-replay-banker {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  width: 29.2%;
  height: 24.9%;
  background: url('replay/nn/image/nn_img_zhuang.png') center / contain no-repeat;
}

.aw-replay-avatar-score {
  position: relative;
  z-index: 4;
  color: #ffdb31;
  font-size: 19.4px;
  font-weight: 400;
  line-height: 1;
}

.aw-replay-hand {
  position: absolute;
  z-index: 3;
  left: calc(50% + 5.5px);
  bottom: 1.2%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 9.9px;
}

.aw-replay-card {
  position: relative;
  flex: 0 0 118.9px;
  width: 118.9px;
  height: 181.2px;
  filter: drop-shadow(0 2.5px 3.2px rgba(0, 0, 0, .45));
  animation: awReplayCard .35s ease-out both;
}

@keyframes awReplayCard {
  from { opacity: 0; transform: translateY(21.6px) rotateY(90deg); }
  to { opacity: 1; transform: none; }
}

.aw-replay-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.aw-replay-card-face {
  position: absolute;
  left: 5%;
  top: 3.7%;
  width: 90.4%;
  height: 92.6%;
  object-fit: fill;
}

.aw-replay-niutype {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1.2%;
  transform: translateX(-50%);
  width: 233.1px;
  height: 112.2px;
  pointer-events: none;
}

.aw-replay-niutype-word,
.aw-replay-niutype-bull {
  position: absolute;
  bottom: 0;
  display: block;
  height: 100%;
  background-image: url('replay/nn/spine/nnType/meiniu.png');
  background-repeat: no-repeat;
  background-size: 390px 198.2px;
}

.aw-replay-niutype-word {
  left: 0;
  width: 100%;
  background-position: 0 0;
}

.aw-replay-niutype-bull {
  right: 45.75%;
  width: 47.39%;
  background-position: -233.8px 0;
}

.aw-replay-niutype.is-niuniu .aw-replay-niutype-word,
.aw-replay-niutype.is-niuniu .aw-replay-niutype-bull { display: none; }

.aw-replay-type-sheet,
.aw-replay-niuniu {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 1.2%;
  transform: translateX(-50%);
  width: 233.1px;
  height: 112.2px;
  pointer-events: none;
}

.aw-replay-type-sheet {
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 167%;
}

.aw-replay-niuniu-piece {
  position: absolute;
  display: block;
  background-image: url('replay/nn/spine/nnType/niuniu.png');
  background-repeat: no-repeat;
  background-size: 390px 198.2px;
}

.aw-replay-niuniu-cow {
  left: 0;
  bottom: 0;
  width: 110.4px;
  height: 112.2px;
  background-position: 0 0;
}

.aw-replay-niuniu-word1,
.aw-replay-niuniu-word2 {
  bottom: 0;
  width: 65.5px;
  height: 51.1px;
}

.aw-replay-niuniu-word1 {
  left: 110.8px;
  background-position: -187.2px -139.3px;
}

.aw-replay-niuniu-word2 {
  left: 166.9px;
  background-position: -289.4px -139.3px;
}

.aw-replay-niutype-text {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 3.2%;
  transform: translateX(-50%);
  padding: 5.8px 31.2px;
  color: #fff;
  font-size: 39.6px;
  font-weight: 900;
  text-shadow: 0 1.8px 0 #111, 0 0 7.2px #f5c928;
  white-space: nowrap;
}
