:root {
  --bg: #081912;
  --table: #15402b;
  --felt: #0e2e1f;
  --gold: #ffd700;
  --gold-light: #ffec8b;
  --gold-dark: #c7a400;
  --accent: #ff6b6b;
  --success: #4ade80;
  --card-w: 48px;
  --card-h: 70px;
  --card-w-lg: 58px;
  --card-h-lg: 84px;
  --shadow-sm: 0 2px 6px rgba(0,0,0,.35);
  --shadow-md: 0 6px 18px rgba(0,0,0,.45);
  --shadow-gold: 0 0 14px rgba(255,215,0,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255,215,0,.06) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 90%, rgba(255,215,0,.05) 0%, transparent 40%),
    radial-gradient(circle at center, var(--table) 0%, var(--bg) 80%);
  color: #fff;
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ===== 顶部栏 ===== */
.top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.25));
  border-bottom: 1px solid rgba(255,215,0,.18);
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  flex-wrap: wrap;
  z-index: 10;
}
.top-bar h1 {
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
  letter-spacing: 1px;
  white-space: nowrap;
}
.scores {
  display: flex;
  gap: 10px;
  font-size: 13px;
  flex-wrap: wrap;
}
.scores span {
  background: rgba(0,0,0,.4);
  padding: 5px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255,215,0,.15);
  box-shadow: inset 0 1px 2px rgba(255,255,255,.06);
  transition: transform .15s;
}
.scores span:hover { transform: translateY(-1px); }
.scores .score-value { color: var(--gold); font-weight: bold; margin-left: 4px; }

.controls {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== 按钮系统 ===== */
button {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 50%);
  pointer-events: none;
}
button:active { transform: translateY(1px) scale(.98); }
button:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.6); }
button .icon { font-size: 15px; line-height: 1; }
button .label { display: inline; }

.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #2a1f00;
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
  box-shadow: 0 3px 10px rgba(255,215,0,.25), var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff3a8, #ffe033);
  box-shadow: 0 4px 14px rgba(255,215,0,.35), var(--shadow-sm);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(180deg, #2f6b4d, #1e4a33);
  color: #fff;
  border: 1px solid rgba(255,215,0,.2);
}
.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(180deg, #3a805c, #255a3e);
  border-color: rgba(255,215,0,.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(180deg, #e85d5d, #b83a3a);
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background: linear-gradient(180deg, #f06f6f, #c94444);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255,255,255,.08);
  color: var(--gold-light);
  border: 1px solid rgba(255,215,0,.2);
  padding: 8px;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-ghost.muted { opacity: .5; }

.btn-large { padding: 12px 32px; font-size: 15px; border-radius: 12px; }

/* ===== 桌面布局 ===== */
.table {
  flex: 1;
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 2.2fr 1fr;
  grid-template-rows: 1fr 1.1fr;
  grid-template-areas:
    "left top right"
    "left bottom right";
  padding: 12px;
  gap: 10px;
}

/* 绒布纹理 */
.table::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255,215,0,.06) 0%, transparent 55%),
    repeating-linear-gradient(45deg, rgba(0,0,0,.03) 0px, rgba(0,0,0,.03) 2px, transparent 2px, transparent 8px);
  pointer-events: none;
  z-index: 0;
}

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.seat-top { grid-area: top; justify-content: flex-start; }
.seat-left { grid-area: left; justify-content: center; align-items: flex-start; }
.seat-right { grid-area: right; justify-content: center; align-items: flex-end; }
.seat-bottom { grid-area: bottom; justify-content: flex-end; }

.seat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(0,0,0,.38);
  padding: 5px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.seat.active .seat-label {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255,215,0,.35), var(--shadow-gold);
  animation: labelGlow 2s ease-in-out infinite;
}
@keyframes labelGlow {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255,215,0,.35), var(--shadow-gold); }
  50% { box-shadow: 0 0 0 3px rgba(255,215,0,.5), 0 0 20px rgba(255,215,0,.45); }
}
.seat .name { opacity: .95; }
.seat .score { color: var(--gold); text-shadow: 0 0 8px rgba(255,215,0,.35); }

.rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: rgba(0,0,0,.22);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.2);
}

.row {
  display: flex;
  gap: 4px;
  min-height: var(--card-h-lg);
  align-items: center;
}

/* ===== 卡牌 ===== */
.card {
  width: var(--card-w);
  height: var(--card-h);
  background: linear-gradient(180deg, #fff 0%, #f3f3f3 100%);
  color: #222;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  user-select: none;
  box-shadow: 0 3px 6px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.8);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s, border .18s;
  position: relative;
  cursor: default;
  border: 1px solid rgba(0,0,0,.08);
}
.seat-bottom .card {
  width: var(--card-w-lg);
  height: var(--card-h-lg);
  font-size: 17px;
  cursor: pointer;
}
.card::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 5px;
  pointer-events: none;
}

.card.red { color: #e11; }
.card.black { color: #1a1a1a; }
.card.selected {
  transform: translateY(-12px) scale(1.05);
  box-shadow: 0 12px 22px rgba(0,0,0,.45), var(--shadow-gold);
  border: 2px solid var(--gold);
  z-index: 5;
}
.card .suit { font-size: 20px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.seat-bottom .card .suit { font-size: 24px; }
.card .rank.top { align-self: flex-start; margin-left: 5px; margin-top: 2px; }
.card .rank.bottom { align-self: flex-end; margin-right: 5px; margin-bottom: 2px; transform: rotate(180deg); }

.card.back {
  background:
    repeating-linear-gradient(45deg, #243b5e 0px, #243b5e 6px, #1b2f4d 6px, #1b2f4d 12px),
    linear-gradient(135deg, #2b4c7e, #1b3358);
  color: transparent;
  border: 1px solid #3a5f99;
  box-shadow: 0 3px 6px rgba(0,0,0,.4);
}
.card.back::before { border-color: rgba(255,255,255,.1); }

/* 发牌动画 */
.card.dealing { will-change: transform, opacity; }

.empty-slot {
  width: var(--card-w);
  height: var(--card-h);
  border: 2px dashed rgba(255,255,255,.18);
  border-radius: 7px;
  transition: background .15s, border-color .15s;
}
.seat-bottom .empty-slot { width: var(--card-w-lg); height: var(--card-h-lg); }
.empty-slot.drag-over {
  background: rgba(255,215,0,.16);
  border-color: rgba(255,215,0,.55);
  box-shadow: inset 0 0 10px rgba(255,215,0,.2);
}

.row-label {
  width: 30px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.65);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ===== 桌面中心 ===== */
.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 1;
}
.dealer-badge {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #2a1f00;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 4px 12px;
  border-radius: 14px;
  box-shadow: 0 3px 10px rgba(0,0,0,.35), var(--shadow-gold);
  margin-bottom: 8px;
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
}
.pot {
  background: rgba(0,0,0,.45);
  padding: 10px 22px;
  border-radius: 22px;
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
  border: 1px solid rgba(255,215,0,.15);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(4px);
}

.message {
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.8);
  text-align: center;
  min-height: 20px;
  padding: 0 10px;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.message.error { color: #ff9b9b; animation: shake .35s; }
.message.success { color: #a7ffb3; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ===== 比牌动画 ===== */
.card.revealing {
  animation: cardReveal .4s ease;
}
@keyframes cardReveal {
  0% { transform: rotateY(90deg) scale(.8); opacity: .3; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}

.seat-win .rows {
  border-color: rgba(255,215,0,.6);
  box-shadow: 0 0 20px rgba(255,215,0,.35), inset 0 2px 8px rgba(0,0,0,.2);
  animation: seatWinGlow 1.2s ease-in-out infinite;
}
@keyframes seatWinGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(255,215,0,.3), inset 0 2px 8px rgba(0,0,0,.2); }
  50% { box-shadow: 0 0 26px rgba(255,215,0,.55), inset 0 2px 8px rgba(0,0,0,.2); }
}
.seat-lose .rows { opacity: .6; filter: grayscale(.4); }

.float-score {
  position: absolute;
  font-size: 16px;
  font-weight: 900;
  animation: floatUp 1.4s ease-out forwards;
  text-shadow: 0 2px 4px rgba(0,0,0,.5);
  pointer-events: none;
}
.float-score.positive { color: #90ff9e; }
.float-score.negative { color: #ff8f8f; }
@keyframes floatUp {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  20% { transform: translateY(-6px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-34px) scale(1); opacity: 0; }
}

/* ===== 结算弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(5px);
  opacity: 1;
  transition: opacity .25s;
}
.modal.hidden { display: none; }
.hidden { display: none !important; }
.modal-content {
  background: linear-gradient(180deg, #163325, #0d2117);
  border: 1px solid rgba(255,215,0,.25);
  border-radius: 18px;
  padding: 22px;
  max-width: 540px;
  width: 92%;
  max-height: 82vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), var(--shadow-gold);
  animation: modalPop .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalPop {
  0% { transform: scale(.85) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}
.modal-content h2 { text-align: center; color: var(--gold); font-size: 22px; text-shadow: 0 2px 6px rgba(0,0,0,.4); }
.chip-icon { font-size: 28px; animation: spinChip 2.5s linear infinite; }
@keyframes spinChip {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(360deg); }
}
#settlementBody { font-size: 13px; }
.settle-row {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  transition: background .2s, border-color .2s;
}
.settle-row.winner {
  background: linear-gradient(135deg, rgba(255,215,0,.12), rgba(255,215,0,.04));
  border-color: rgba(255,215,0,.4);
  box-shadow: 0 0 14px rgba(255,215,0,.12);
}
.settle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.settle-name { font-weight: 700; }
.crown { font-size: 14px; }
.settle-total {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255,215,0,.3);
}
.settle-total.negative { color: #ff8f8f; text-shadow: none; }
.settle-total.positive { color: #90ff9e; text-shadow: 0 0 10px rgba(144,255,158,.3); }
.settle-parts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.settle-part {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0,0,0,.3);
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.08);
}
.settle-part .part-key {
  color: rgba(255,255,255,.6);
  font-weight: 700;
}
.settle-part .part-name { color: rgba(255,255,255,.9); }
.settle-part .part-score { font-weight: 800; }
.settle-part.win { border-color: rgba(144,255,158,.4); }
.settle-part.win .part-score { color: #90ff9e; }
.settle-part.lose { border-color: rgba(255,143,143,.4); }
.settle-part.lose .part-score { color: #ff8f8f; }
.settle-bonus-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.settle-bonus {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255,215,0,.12);
  color: var(--gold-light);
  border: 1px solid rgba(255,215,0,.25);
}
.settle-bonus.scoop {
  background: rgba(255,107,107,.12);
  color: #ffb3b3;
  border-color: rgba(255,107,107,.3);
}
.settle-row.total {
  font-weight: 700;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid rgba(255,215,0,.25);
  background: rgba(255,215,0,.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gold-light);
}
.total-scores {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.total-scores span { font-size: 12px; color: rgba(255,255,255,.8); }
.total-scores b { color: var(--gold); margin-left: 3px; }

/* ===== 特效粒子 ===== */
.particle {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 200;
  animation: particleFly .7s ease-out forwards;
}
@keyframes particleFly {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.coin {
  position: fixed;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold) 60%, var(--gold-dark));
  border: 2px solid var(--gold-dark);
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  pointer-events: none;
  z-index: 150;
  animation: coinFall 1.2s linear forwards;
}
.coin::after {
  content: '$';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  color: #6b5200;
}
@keyframes coinFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* 通用闪光 */
.flash { animation: flashAnim .5s ease; }
@keyframes flashAnim {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.4); }
}
.pulse { animation: pulseAnim .6s ease; }
@keyframes pulseAnim {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* ===== 响应式：平板/手机 ===== */
@media (max-width: 900px) {
  :root { --card-w: 34px; --card-h: 50px; --card-w-lg: 40px; --card-h-lg: 58px; }
  .top-bar { padding: 8px 10px; gap: 10px; }
  .top-bar h1 { font-size: 17px; }
  .scores { gap: 6px; font-size: 11px; }
  .scores span { padding: 4px 8px; }
  .controls { margin-left: 0; gap: 6px; width: 100%; justify-content: flex-end; }
  button { padding: 7px 9px; font-size: 12px; }
  button .label { display: none; }
  button .icon { font-size: 16px; }
  .table { grid-template-columns: 1fr 2fr 1fr; padding: 8px; gap: 6px; }
  .seat-label { font-size: 11px; padding: 4px 8px; }
  .rows { padding: 6px 7px; gap: 4px; }
  .row { gap: 3px; }
  .row-label { width: 24px; font-size: 10px; }
  .message { font-size: 11px; }
  .pot { font-size: 12px; padding: 7px 14px; }
  .dealer-badge { font-size: 9px; padding: 3px 8px; }
}

@media (max-width: 520px) {
  :root { --card-w: 28px; --card-h: 42px; --card-w-lg: 32px; --card-h-lg: 48px; }
  .top-bar h1 { display: none; }
  .scores { order: 1; width: 100%; justify-content: space-between; }
  .scores span { flex: 1; text-align: center; }
  .controls { order: 2; width: 100%; justify-content: space-between; }
  .table { grid-template-columns: 1fr 1.8fr 1fr; padding: 5px; gap: 4px; }
  .seat-label { font-size: 10px; margin-bottom: 3px; }
  .rows { padding: 4px 5px; border-radius: 8px; }
  .card { border-radius: 5px; font-size: 12px; }
  .card .suit { font-size: 14px; }
  .seat-bottom .card .suit { font-size: 16px; }
  .card .rank.top { margin-left: 2px; }
  .card .rank.bottom { margin-right: 2px; }
  .empty-slot { border-radius: 5px; }
  .row-label { display: none; }
  .message { font-size: 10px; margin-top: 4px; }
  .modal-content { padding: 16px; border-radius: 14px; }
  .modal-content h2 { font-size: 18px; }
  .settle-row { padding: 8px 10px; }
  .settle-part { font-size: 11px; padding: 2px 6px; }
  .settle-total { font-size: 16px; }
  .total-scores { justify-content: flex-start; }
}

@media (max-height: 620px) {
  :root { --card-w: 30px; --card-h: 44px; --card-w-lg: 36px; --card-h-lg: 52px; }
  .top-bar { padding: 6px 10px; }
  .message { min-height: 14px; }
  .table { padding: 6px; }
}

/* ========== 登录/注册界面 ========== */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a3a2a 0%, #0d1f16 70%, #07130d 100%);
  z-index: 100;
}
.auth-card {
  background: linear-gradient(160deg, #1e4a33, #14301f);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  padding: 36px 40px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  text-align: center;
}
.auth-logo { font-size: 56px; margin-bottom: 6px; }
.auth-card h1 { color: #f0d060; font-size: 30px; margin: 0 0 4px; letter-spacing: 2px; }
.auth-sub { color: #9fc7ad; font-size: 13px; margin: 0 0 22px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab {
  flex: 1; padding: 9px; border: 1px solid rgba(212,175,55,0.3);
  background: transparent; color: #bcd8c6; border-radius: 10px;
  cursor: pointer; font-size: 14px; transition: all .2s;
}
.auth-tab.active { background: #f0d060; color: #1a2a1e; font-weight: 700; border-color: #f0d060; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input {
  padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(212,175,55,0.25);
  background: rgba(0,0,0,0.25); color: #eaf5ee; font-size: 14px; outline: none;
}
.auth-form input:focus { border-color: #f0d060; }
.auth-form input::placeholder { color: #6f8f7c; }
.auth-error { color: #ff8a80; font-size: 13px; margin-top: 14px; min-height: 18px; }
.btn-retry { margin-top: 16px; }
.btn-offline { margin-top: 10px; }
.auth-hint { color: #5f7f6c; font-size: 11px; margin-top: 16px; }
.auth-hint code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; }

/* ========== 用户信息 ========== */
.user-info {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.25); border: 1px solid rgba(212,175,55,0.2);
  border-radius: 20px; padding: 4px 12px; font-size: 13px; color: #d8e8dd;
}
.user-avatar { font-size: 18px; }
.user-name { font-weight: 700; color: #f0d060; }
.user-stats { color: #9fc7ad; }
.user-stats b { color: #f0d060; }
.btn-logout { font-size: 12px; padding: 2px 8px; }

/* ========== 排行榜 ========== */
.ranking-content { width: 460px; max-width: 94vw; }
.modal-close {
  background: transparent; border: none; color: #9fc7ad; font-size: 20px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.ranking-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.ranking-tab {
  flex: 1; padding: 8px; border: 1px solid rgba(212,175,55,0.3);
  background: transparent; color: #bcd8c6; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.ranking-tab.active { background: #f0d060; color: #1a2a1e; font-weight: 700; }
.ranking-body { max-height: 380px; overflow-y: auto; }
.ranking-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid rgba(212,175,55,0.12); font-size: 14px;
}
.ranking-row.me { background: rgba(240,208,96,0.12); border-radius: 8px; }
.rank-num { width: 26px; text-align: center; font-weight: 700; color: #9fc7ad; }
.rank-num.top1 { color: #ffd700; }
.rank-num.top2 { color: #c0c0c0; }
.rank-num.top3 { color: #cd7f32; }
.rank-avatar { font-size: 18px; }
.rank-name { flex: 1; color: #eaf5ee; }
.rank-value { font-weight: 700; color: #f0d060; font-size: 15px; }
.rank-sub { color: #6f8f7c; font-size: 12px; }
.ranking-empty { text-align: center; color: #9fc7ad; padding: 30px 0; }

/* ========== 昵称设置 ========== */
.nickname-content { width: 320px; max-width: 90vw; text-align: center; }
.nickname-content input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(212,175,55,0.25); background: rgba(0,0,0,0.25);
  color: #eaf5ee; font-size: 14px; outline: none; margin-bottom: 14px; box-sizing: border-box;
}
.nickname-content input:focus { border-color: #f0d060; }
.user-name { cursor: pointer; border-bottom: 1px dashed rgba(240,208,96,0.5); }
.user-name:hover { color: #fff; }
