/* ════════════════════════════════════════════════════
   心动信号 · 情侣卡牌游戏  —  全局样式 v2.0
   ════════════════════════════════════════════════════ */

/* ── 设计令牌（Design Tokens） ─────────────────────── */
:root {
  /* 字体 */
  --font-display: 'ZCOOL KuaiLe', 'PingFang SC', cursive;
  --font-body: 'Source Sans 3', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;

  /* 花色调色板 */
  --suit-xf:  #e84393;
  --suit-qs:  #4a90e2;
  --suit-sn:  #7b5ea7;
  --suit-mt:  #f5a623;
  --suit-wild:#2ecc71;

  /* 品牌色 */
  --primary:       #c44569;
  --primary-light:  #ff6b9d;
  --primary-glow:   rgba(196,69,105,.35);
  --accent:         #e84393;

  /* 背景 */
  --bg-from:  #fbc2eb;
  --bg-mid:   #e6a0d0;
  --bg-to:    #a18cd1;

  /* 表面 & 玻璃 */
  --surface:       rgba(255,255,255,.88);
  --surface-solid:  #fff;
  --glass:          rgba(255,255,255,.45);
  --glass-border:   rgba(255,255,255,.55);
  --glass-strong:   rgba(255,255,255,.7);

  /* 间距 */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 40px;

  /* 圆角 */
  --r-sm:   16px;
  --r-md:   24px;
  --r-lg:   32px;
  --r-full: 9999px;

  /* 阴影 */
  --shadow-xs:  0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  --shadow-lg:  0 20px 60px rgba(0,0,0,.14), 0 8px 20px rgba(0,0,0,.08);
  --shadow-xl:  0 28px 80px rgba(0,0,0,.18), 0 12px 28px rgba(0,0,0,.10);
  --shadow-card:      0 4px 14px rgba(0,0,0,.10), 0 1px 4px rgba(0,0,0,.06);
  --shadow-card-lift: 0 14px 36px rgba(0,0,0,.16), 0 4px 10px rgba(0,0,0,.08);
  --shadow-glow:      0 0 24px var(--primary-glow);

  /* 动画 */
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --ease-smooth: cubic-bezier(.4,0,.2,1);
  --dur-fast:   .15s;
  --dur-normal: .3s;
  --dur-slow:   .5s;
}

/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

/* ── SVG Noise 纹理 ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .028;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  pointer-events: none;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(255,182,217,.45) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(161,140,209,.40) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(251,194,235,.30) 0%, transparent 70%),
    linear-gradient(155deg, var(--bg-from) 0%, var(--bg-mid) 40%, var(--bg-to) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── 浮动装饰粒子 ───────────────────────────────────── */
body::after {
  content: '';
  position: fixed;
  width: 100%; height: 100%;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(2px 2px at 15% 25%, rgba(255,107,157,.35), transparent),
    radial-gradient(2px 2px at 85% 15%, rgba(161,140,209,.35), transparent),
    radial-gradient(3px 3px at 45% 75%, rgba(255,182,217,.3), transparent),
    radial-gradient(2px 2px at 70% 55%, rgba(196,69,105,.25), transparent),
    radial-gradient(3px 3px at 25% 90%, rgba(232,67,147,.2), transparent),
    radial-gradient(2px 2px at 55% 35%, rgba(161,140,209,.2), transparent);
  animation: floatDots 20s ease-in-out infinite alternate;
}
@keyframes floatDots {
  0%   { transform: translateY(0) translateX(0); }
  50%  { transform: translateY(-30px) translateX(15px); }
  100% { transform: translateY(10px) translateX(-10px); }
}

/* ── 主容器 ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 820px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.screen { padding: 32px 28px; min-height: 600px; }
.hidden { display: none !important; }

/* ── 顶部标题栏 ──────────────────────────────────── */
.game-header {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  padding: 24px 28px 20px;
  position: relative;
  overflow: hidden;
}
/* 标题栏装饰光晕 */
.game-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,.15) 0%, transparent 60%);
  pointer-events: none;
}
.game-header h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400; /* ZCOOL KuaiLe 只有一个字重 */
  letter-spacing: 3px;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.header-icon {
  width: 36px;
  height: 32px;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.12));
}
.subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  opacity: .85;
  margin-top: 6px;
  letter-spacing: 1px;
  position: relative;
}

/* ════════════════════════════════════════════════════
   大厅界面
   ════════════════════════════════════════════════════ */
#lobby-screen {
  display: flex;
  justify-content: center;
  align-items: center;
}
.lobby-content {
  text-align: center;
  padding: var(--sp-xl) var(--sp-lg);
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
.heart-animation {
  font-size: 80px;
  animation: heartFloat 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(196,69,105,.3));
}
.lobby-planet-icon {
  width: 90px;
  height: 90px;
  display: block;
  margin: 0 auto;
  animation: heartFloat 2.5s ease-in-out infinite;
  filter: drop-shadow(0 6px 18px rgba(196,69,105,.35));
}
.lobby-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 24px 0 10px;
  color: var(--primary);
  letter-spacing: 1px;
}
.lobby-tip {
  font-family: var(--font-body);
  color: #999;
  font-size: 14px;
  font-weight: 300;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* 模式选择 */
.mode-selector { margin-bottom: 28px; }
.mode-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #999;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mode-label-icon {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  opacity: .7;
}
  letter-spacing: .5px;
  text-transform: uppercase;
}
.mode-options {
  display: flex;
  gap: 14px;
  justify-content: center;
}
.mode-option { cursor: pointer; }
.mode-option input { display: none; }
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 24px;
  border-radius: var(--r-md);
  border: 2px solid rgba(240,208,224,.6);
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all var(--dur-normal) var(--ease-smooth);
  min-width: 130px;
  box-shadow: var(--shadow-xs);
}
.mode-option input:checked ~ .mode-card {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255,240,246,.9), rgba(253,232,255,.9));
  box-shadow: 0 4px 20px rgba(232,67,147,.2), 0 0 0 1px rgba(232,67,147,.1);
  transform: translateY(-2px);
}
.mode-icon { font-size: 32px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.1)); }
.mode-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: #555;
}
.mode-desc {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  color: #aaa;
}
.mode-option:hover .mode-card {
  border-color: #ffb0cc;
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* 癞子牌特殊样式 */
.card.suit-joker {
  background: linear-gradient(160deg, #1a1a2e, #16213e, #0f3460) !important;
  border: 2px solid rgba(255,215,0,.4) !important;
  color: #fff;
  box-shadow: var(--shadow-card), 0 0 20px rgba(255,215,0,.15);
}
.card.suit-joker .card-suit { color: #ffd700 !important; opacity: 1 !important; }
.card.suit-joker .card-type { color: #ffd700 !important; }

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.lobby-actions .btn-primary { width: 240px; }

.divider {
  color: #ccc;
  font-size: 13px;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 300px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e8d0e0, transparent);
}

.join-row { display: flex; gap: 10px; align-items: center; }
.room-input {
  font-family: var(--font-display);
  padding: 13px 20px;
  border: 2px solid rgba(240,192,208,.6);
  border-radius: var(--r-full);
  font-size: 20px;
  letter-spacing: 6px;
  text-align: center;
  width: 170px;
  outline: none;
  transition: all var(--dur-normal) var(--ease-smooth);
  color: var(--primary);
  text-transform: uppercase;
  background: var(--glass-strong);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-xs), inset 0 1px 2px rgba(255,255,255,.8);
}
.room-input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm), 0 0 0 4px rgba(232,67,147,.1);
}
.room-input::placeholder { letter-spacing: 0; font-size: 14px; font-family: var(--font-body); }

/* 等待面板 */
.waiting-panel {
  margin-top: 32px;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--r-md);
  padding: 28px 32px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.room-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}
.code-label { font-size: 13px; color: #999; font-weight: 300; }
.code-value {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 10px;
  color: var(--primary);
  text-shadow: 0 1px 4px rgba(196,69,105,.15);
}
.copy-btn {
  padding: 7px 16px;
  border-radius: var(--r-full);
  border: 1px solid rgba(240,192,208,.5);
  background: var(--glass);
  backdrop-filter: blur(8px);
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast);
}
.copy-btn:hover { background: rgba(255,240,245,.8); }

.waiting-dots { font-size: 14px; color: #aaa; font-weight: 300; }
.dots { display: inline-block; animation: dotBlink 1.4s infinite; }
@keyframes dotBlink {
  0%,20%  { opacity: 1; }
  50%     { opacity: 0; }
  80%,100%{ opacity: 1; }
}

.room-badge { margin-left: auto; }

@keyframes heartFloat {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-14px) scale(1.14); }
}

/* ── 按钮 ───────────────────────────────────────── */
.btn {
  font-family: var(--font-display);
  padding: 13px 36px;
  border: none;
  border-radius: var(--r-full);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-smooth);
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, transparent 60%);
  pointer-events: none;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(-1px) scale(.97);
  box-shadow: var(--shadow-xs);
  filter: brightness(.95);
  transition-duration: .08s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  box-shadow: 0 4px 18px var(--primary-glow);
  text-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.btn-primary:hover {
  box-shadow: 0 8px 28px var(--primary-glow), var(--shadow-glow);
}
.btn-secondary {
  background: var(--glass-strong);
  backdrop-filter: blur(8px);
  color: var(--primary);
  border: 2px solid rgba(240,192,208,.5);
  box-shadow: var(--shadow-xs), inset 0 1px 2px rgba(255,255,255,.6);
}
.btn-secondary:hover {
  background: rgba(255,240,245,.9);
  border-color: var(--accent);
}
.btn:disabled {
  opacity: .4;
  pointer-events: none;
  filter: grayscale(.3);
}

/* ════════════════════════════════════════════════════
   游戏信息栏 — 玻璃拟态
   ════════════════════════════════════════════════════ */
.game-info {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: var(--r-md);
  padding: 18px 22px;
  margin-bottom: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass-strong);
  backdrop-filter: blur(10px);
  border-radius: var(--r-full);
  padding: 10px 18px;
  border: 2px solid rgba(240,208,224,.4);
  transition: all var(--dur-normal) var(--ease-smooth);
  min-width: 135px;
  box-shadow: var(--shadow-xs);
}
.player.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255,240,246,.95), rgba(255,220,240,.9));
  box-shadow: 0 2px 16px rgba(232,67,147,.2), var(--shadow-glow);
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%,100% { box-shadow: 0 2px 16px rgba(232,67,147,.2), 0 0 0 0 rgba(232,67,147,.15); }
  50%     { box-shadow: 0 2px 20px rgba(232,67,147,.3), 0 0 0 6px rgba(232,67,147,.0); }
}
.player-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: #555;
}
.player.active .player-name { color: var(--primary); }

.card-count {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.heartbeat-indicator {
  font-size: 18px;
  opacity: .35;
  transition: opacity .3s, transform .3s;
}
.heartbeat-indicator.active { opacity: 1; }

.current-turn-indicator {
  font-size: 24px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.1));
}

/* 状态行 */
.game-status {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: #666;
}
.suit-badge {
  background: var(--glass-strong);
  border: 1.5px solid rgba(240,192,208,.5);
  border-radius: var(--r-full);
  padding: 3px 14px;
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.draw-count {
  background: linear-gradient(135deg, #ff4757, #c0392b);
  color: #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(255,71,87,.3);
}

/* ── 轮次横幅 ─────────────────────────────────────── */
.turn-banner {
  font-family: var(--font-display);
  text-align: center;
  padding: 10px 24px;
  border-radius: var(--r-full);
  font-size: 15px;
  margin-bottom: 14px;
  transition: all var(--dur-normal);
}
.turn-banner.my-turn {
  background: linear-gradient(135deg, rgba(255,107,157,.12), rgba(196,69,105,.12));
  color: var(--primary);
  border: 1.5px solid rgba(240,192,208,.5);
  animation: myTurnPulse 2s ease infinite;
  box-shadow: 0 0 16px rgba(196,69,105,.08);
}
.turn-banner.their-turn {
  background: var(--glass);
  color: #aaa;
  border: 1px solid rgba(0,0,0,.06);
}
@keyframes myTurnPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(196,69,105,.15); }
  50%     { box-shadow: 0 0 0 8px rgba(196,69,105,.0); }
}

/* ════════════════════════════════════════════════════
   中央牌区
   ════════════════════════════════════════════════════ */
.center-area {
  margin-bottom: 20px;
}
.discard-pile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.card-slot { perspective: 800px; }

/* ── 卡牌核心样式 — 物理质感 ──────────────────────── */
.card {
  width: 80px; height: 120px;
  border-radius: var(--r-sm);
  border: none;
  /* 多层阴影：漫射 + 近影 + 接触阴影 */
  box-shadow:
    0 8px 24px rgba(0,0,0,.08),
    0 3px 8px rgba(0,0,0,.06),
    0 1px 2px rgba(0,0,0,.04),
    /* 内描边高光 */
    inset 0 0 0 1px rgba(255,255,255,.5);
  cursor: pointer;
  user-select: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-normal) var(--ease-smooth),
              box-shadow var(--dur-normal) var(--ease-smooth);
  background: #fff;
  overflow: hidden;
}

/* 花色渐变背景 — 更柔和的渐变 */
.card.suit-xf {
  background: linear-gradient(160deg, #fff0f4 0%, #ffe0ec 40%, #ffd0e4 100%);
  border: 2px solid rgba(255,176,204,.6);
}
.card.suit-qs {
  background: linear-gradient(160deg, #f0f7ff 0%, #daeeff 40%, #c8e4ff 100%);
  border: 2px solid rgba(153,204,255,.6);
}
.card.suit-sn {
  background: linear-gradient(160deg, #f5eeff 0%, #ecdeff 40%, #dcc8ff 100%);
  border: 2px solid rgba(200,160,255,.6);
}
.card.suit-mt {
  background: linear-gradient(160deg, #fffbf0 0%, #fff3cc 40%, #ffe8a8 100%);
  border: 2px solid rgba(255,200,77,.6);
}
.card.suit-wild {
  background: linear-gradient(160deg, #edfff4 0%, #d4f5e0 40%, #b0ecc8 100%);
  border: 2px solid rgba(96,204,144,.5);
}

.card.card-large {
  width: 110px; height: 162px;
  border-radius: 20px;
  box-shadow:
    0 14px 40px rgba(0,0,0,.12),
    0 6px 16px rgba(0,0,0,.08),
    0 2px 4px rgba(0,0,0,.04),
    inset 0 0 0 1.5px rgba(255,255,255,.5);
}

/* 可打出的牌 — hover 微动效 */
.card.playable {
  transform: translateY(-8px);
  box-shadow:
    0 12px 28px rgba(0,0,0,.12),
    0 4px 10px rgba(0,0,0,.06),
    inset 0 0 0 1px rgba(255,255,255,.5);
  cursor: pointer;
}
.card.playable:hover {
  transform: translateY(-16px) scale(1.06);
  box-shadow:
    var(--shadow-card-lift),
    0 0 24px rgba(232,67,147,.15),
    inset 0 0 0 1px rgba(255,255,255,.6);
  z-index: 10;
}
.card.playable::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255,255,255,.7);
  pointer-events: none;
  /* 微光扫过效果 */
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,.2) 50%, transparent 70%);
  background-size: 200% 200%;
  animation: shineSwipe 3s ease-in-out infinite;
}
@keyframes shineSwipe {
  0%   { background-position: 200% 200%; }
  100% { background-position: -100% -100%; }
}

/* 卡牌内容 */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  width: 100%; height: 100%;
  text-align: center;
}
.card-suit {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  opacity: .75;
  letter-spacing: .5px;
}
.card-number {
  font-family: var(--font-display);
  font-size: 38px;
  line-height: 1;
  color: rgba(0,0,0,.72);
  text-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.card-large .card-number { font-size: 48px; }
.card-type {
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(0,0,0,.65);
  text-align: center;
  line-height: 1.3;
  padding: 0 4px;
}
.card-large .card-type { font-size: 14px; }

/* 牌背（牌堆） */
.deck-pile {
  cursor: pointer;
  transition: transform var(--dur-normal) var(--ease-smooth);
}
.deck-pile:hover { transform: translateY(-6px) rotate(-2deg); }
.deck-pile:active { transform: translateY(-2px) scale(.96); transition-duration: .08s; }
.card-back {
  width: 80px; height: 120px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #667eea 0%, #7b5ea7 50%, #764ba2 100%);
  box-shadow:
    0 8px 24px rgba(118,75,162,.2),
    0 3px 8px rgba(0,0,0,.08),
    inset 0 0 0 1px rgba(255,255,255,.2);
  position: relative;
  overflow: hidden;
}
.card-back::before {
  content: '💕';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  opacity: .4;
  animation: backHeartPulse 3s ease-in-out infinite;
}
@keyframes backHeartPulse {
  0%,100% { opacity: .3; transform: scale(1); }
  50%     { opacity: .55; transform: scale(1.1); }
}
.card-back::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 12px;
  border: 2px dashed rgba(255,255,255,.25);
}

/* ════════════════════════════════════════════════════
   消息提示
   ════════════════════════════════════════════════════ */
.message {
  text-align: center;
  padding: 12px 24px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  animation: msgIn var(--dur-normal) var(--ease-bounce);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}
.message.info    { background: rgba(232,244,255,.85); color: #2980b9; border: 1px solid rgba(190,227,253,.6); }
.message.success { background: rgba(232,254,240,.85); color: #27ae60; border: 1px solid rgba(176,239,204,.6); }
.message.error   { background: rgba(255,234,234,.85); color: #c0392b; border: 1px solid rgba(255,187,187,.6); }
.message.warning { background: rgba(255,248,224,.85); color: #d68910; border: 1px solid rgba(255,224,138,.6); }
.message.heartbeat{ background: rgba(255,240,246,.85); color: var(--primary); border: 1px solid rgba(255,187,216,.6); }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(-10px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ════════════════════════════════════════════════════
   手牌区
   ════════════════════════════════════════════════════ */
.hand-area {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-radius: var(--r-md);
  padding: 20px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.4);
  min-height: 160px;
}
.hand-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ════════════════════════════════════════════════════
   操作按钮区
   ════════════════════════════════════════════════════ */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
/* 摸牌按钮呼吸脉冲（轮到你时由 JS 添加 .pulse class） */
.action-buttons .btn.pulse {
  animation: drawBtnPulse 2s ease-in-out infinite;
}
@keyframes drawBtnPulse {
  0%,100% { box-shadow: 0 4px 14px rgba(196,69,105,.25); }
  50%     { box-shadow: 0 4px 24px rgba(196,69,105,.45), 0 0 0 8px rgba(196,69,105,.0); }
}

/* ════════════════════════════════════════════════════
   弹窗通用
   ════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: var(--surface-solid);
  border-radius: var(--r-lg);
  padding: 40px 48px;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: slideUp var(--dur-normal) var(--ease-bounce);
  position: relative;
  border: 1px solid rgba(255,255,255,.6);
}
@keyframes slideUp {
  from { transform: translateY(50px) scale(.9); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 18px;
  text-align: center;
}
.modal-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: #555;
  margin-bottom: 16px;
  text-align: center;
}
.modal-content p {
  font-family: var(--font-body);
  color: #777;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  margin-bottom: 18px;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 20px;
}

/* ── 花色选择 ─────────────────────────────────────── */
.suit-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 14px 0;
}
.suit-btn {
  font-family: var(--font-display);
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--r-full);
  font-size: 15px;
  cursor: pointer;
  transition: all var(--dur-fast);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.suit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.2) 0%, transparent 60%);
  pointer-events: none;
}
.suit-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-md);
}
.suit-btn:active {
  transform: scale(.95);
  transition-duration: .08s;
}
.suit-btn[data-suit="XIANG_FENG"],
.suit-btn[data-suit="相逢"] { background: linear-gradient(135deg, #ffe0ec, #ffd0e4); color: #c44569; border-color: rgba(255,176,204,.5); }
.suit-btn[data-suit="QIAN_SHOU"],
.suit-btn[data-suit="牵手"] { background: linear-gradient(135deg, #daeeff, #c8e4ff); color: #1a72bb; border-color: rgba(153,204,255,.5); }
.suit-btn[data-suit="SI_NIAN"],
.suit-btn[data-suit="思念"] { background: linear-gradient(135deg, #ecdeff, #dcc8ff); color: #6a35b0; border-color: rgba(200,160,255,.5); }
.suit-btn[data-suit="MI_TANG"],
.suit-btn[data-suit="蜜糖"] { background: linear-gradient(135deg, #fff3cc, #ffe8a8); color: #b07800; border-color: rgba(255,200,77,.5); }

/* ── 惩罚区 ─────────────────────────────────────── */
.punishments { margin: 16px 0; }
.punishment-item {
  background: linear-gradient(135deg, rgba(255,245,248,.9), rgba(255,238,245,.9));
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: #555;
  animation: fadeIn .4s ease;
  box-shadow: var(--shadow-xs);
}
.punishment-item strong { color: var(--primary); }

/* ── 游戏结束弹窗 ─────────────────────────────────── */
#game-over-modal .modal-content {
  max-width: 460px;
  text-align: center;
}
#winner-text {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--primary);
  margin-bottom: 22px;
}
#winner-text::before { content: '🎉 '; }

/* ════════════════════════════════════════════════════
   心动弹窗
   ════════════════════════════════════════════════════ */
.heartbeat-modal .modal-content.heartbeat-content {
  text-align: center;
  padding: 48px 56px;
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

.heartbeat-modal.heartbeat-mode .heartbeat-content {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 0 60px rgba(255,107,157,.5), var(--shadow-xl);
  animation: heartbeatPop .55s var(--ease-bounce);
}
.heartbeat-modal.almost-mode .heartbeat-content {
  background: linear-gradient(135deg, #ffd89b 0%, #ff9a9e 100%);
  color: #5a2d3c;
  box-shadow: 0 0 40px rgba(255,154,158,.4), var(--shadow-xl);
  animation: almostPop .4s ease;
}

.heartbeat-emoji {
  font-size: 72px;
  display: block;
  margin-bottom: 20px;
  animation: emojiBeat .5s ease infinite alternate;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.15));
}
.heartbeat-svg-icon {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto;
  animation: emojiBeat .5s ease infinite alternate;
}
#heartbeat-title {
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}
#heartbeat-desc {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 300;
  opacity: .92;
  margin-bottom: 28px;
}
.btn-heartbeat {
  font-family: var(--font-display);
  background: rgba(255,255,255,.22);
  color: inherit;
  border: 2px solid rgba(255,255,255,.5);
  padding: 12px 34px;
  border-radius: var(--r-full);
  font-size: 16px;
  cursor: pointer;
  transition: all var(--dur-fast);
  backdrop-filter: blur(6px);
}
.btn-heartbeat:hover {
  background: rgba(255,255,255,.38);
  transform: translateY(-2px);
}

.heartbeat-indicator.active { animation: iconBeat .5s ease infinite alternate; }

@keyframes heartbeatPop {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes almostPop {
  0%   { transform: scale(.75); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes emojiBeat {
  from { transform: scale(1); }
  to   { transform: scale(1.2); }
}
@keyframes iconBeat {
  from { transform: scale(1); }
  to   { transform: scale(1.3); }
}

/* ════════════════════════════════════════════════════
   卡牌入场 + 出牌动画
   ════════════════════════════════════════════════════ */
@keyframes cardDeal {
  from { transform: translateY(-80px) scale(.7) rotate(-8deg); opacity: 0; }
  to   { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}
.card.new-card { animation: cardDeal .45s var(--ease-bounce); }

/* 出牌飞入动画 */
@keyframes cardFlyIn {
  0%   { transform: scale(1.8) rotate(-15deg); opacity: 0; filter: brightness(1.8) blur(2px); }
  50%  { transform: scale(1.06) rotate(2deg); opacity: 1; filter: brightness(1.1) blur(0); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; filter: brightness(1); }
}
.card-played-anim { animation: cardFlyIn .5s var(--ease-bounce) forwards; }

/* 粒子容器 */
.particle-container {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: particleFly var(--dur) 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; }
}

.p-xf   { background: var(--suit-xf); }
.p-qs   { background: var(--suit-qs); }
.p-sn   { background: var(--suit-sn); }
.p-mt   { background: var(--suit-mt); }
.p-wild { background: var(--suit-wild); }
.p-star { background: #ffd700; }

/* 震荡特效 */
@keyframes shakeHand {
  0%,100% { transform: translateX(0); }
  15%  { transform: translateX(-10px) rotate(-1.5deg); }
  30%  { transform: translateX(10px) rotate(1.5deg); }
  45%  { transform: translateX(-6px); }
  60%  { transform: translateX(6px); }
  75%  { transform: translateX(-3px); }
}
.hand-shake { animation: shakeHand .5s ease; }

/* 跳过特效 */
@keyframes skipSpin {
  from { transform: rotate(0deg) scale(1.1); }
  to   { transform: rotate(360deg) scale(1); }
}
.card-skip-anim { animation: skipSpin .5s ease-in-out; }

/* 反转特效 */
@keyframes reverseFlip {
  0%   { transform: scaleX(1); }
  50%  { transform: scaleX(-1) scale(1.1); filter: hue-rotate(180deg); }
  100% { transform: scaleX(1); }
}
.card-reverse-anim { animation: reverseFlip .6s ease; }

/* 万能牌光晕 */
@keyframes wildGlow {
  0%,100% { box-shadow: 0 0 12px 3px rgba(46,204,113,.4), var(--shadow-card); }
  50%     { box-shadow: 0 0 36px 12px rgba(46,204,113,.7), var(--shadow-card); }
}
.card-wild-glow { animation: wildGlow .6s ease 2; }

/* ════════════════════════════════════════════════════
   悬浮音乐播放器
   ════════════════════════════════════════════════════ */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.music-toggle-icon {
  width: 28px;
  height: 28px;
  display: block;
  pointer-events: none;
  filter: brightness(0) invert(1);
}
.music-panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(196,69,105,.15);
}
.music-panel-icon {
  width: 24px;
  height: 24px;
}
.modal-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  margin-right: 4px;
}
.music-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: all var(--dur-normal) var(--ease-smooth);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.music-btn::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255,107,157,.3);
  animation: musicRing 3s ease-in-out infinite;
}
@keyframes musicRing {
  0%,100% { transform: scale(1); opacity: .5; }
  50%     { transform: scale(1.15); opacity: 0; }
}
.music-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px var(--primary-glow); }

.music-panel {
  background: var(--glass-strong);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-radius: var(--r-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--glass-border);
  min-width: 240px;
  animation: slideUp .3s var(--ease-bounce);
}

.music-track {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 14px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-controls {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}
.music-ctrl-btn {
  background: var(--glass);
  border: 1px solid rgba(240,192,208,.5);
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.music-ctrl-btn:hover {
  background: rgba(255,208,229,.6);
  transform: scale(1.1);
  box-shadow: var(--shadow-sm);
}
.music-ctrl-btn:active {
  transform: scale(.9);
  transition-duration: .08s;
}

.volume-row { display: flex; align-items: center; gap: 10px; }
.vol-icon { font-size: 15px; }
.volume-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--primary-light) 0%, rgba(240,208,224,.4) 0%);
  outline: none;
  cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  cursor: pointer;
  box-shadow: 0 2px 8px var(--primary-glow);
  transition: transform .15s;
}
.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* ════════════════════════════════════════════════════
   响应式 · 手机端
   ════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  body {
    padding: 0;
    align-items: flex-start;
    background-attachment: fixed;
  }
  body::after { display: none; }
  .container {
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    border: none;
  }
  .game-header { padding: 16px 18px 12px; }
  .game-header h1 { font-size: 22px; letter-spacing: 2px; }
  .subtitle { font-size: 11px; }

  .screen { padding: 16px 14px; min-height: unset; }

  .game-info {
    padding: 12px 14px;
    gap: 10px;
    border-radius: var(--r-sm);
  }
  .player { min-width: unset; padding: 8px 12px; gap: 6px; }
  .player-name { font-size: 13px; }
  .card-count { width: 26px; height: 26px; font-size: 11px; }
  .heartbeat-indicator { font-size: 16px; }
  .current-turn-indicator { font-size: 20px; }
  .status-item { font-size: 12px; }

  .center-area { margin-bottom: 12px; }
  .discard-pile { gap: 18px; }
  .card { width: 58px; height: 88px; border-radius: 12px; }
  .card-number { font-size: 24px; }
  .card-type { font-size: 10px; }
  .card-suit { font-size: 10px; }
  .card.card-large { width: 88px; height: 128px; border-radius: 16px; }
  .card-large .card-number { font-size: 34px; }
  .card-large .card-type { font-size: 12px; }
  .card-back { width: 58px; height: 88px; border-radius: 12px; }
  .card-back::before { font-size: 22px; }

  .hand-area {
    padding: 14px 12px;
    margin-bottom: 12px;
    border-radius: var(--r-sm);
  }
  .hand {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 8px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .hand::-webkit-scrollbar { height: 4px; }
  .hand::-webkit-scrollbar-thumb { background: rgba(240,192,208,.6); border-radius: 4px; }

  .card.playable { transform: translateY(-6px); }
  .card.playable:hover { transform: translateY(-10px) scale(1.04); }

  .turn-banner { font-size: 13px; padding: 8px 16px; }

  .action-buttons { gap: 10px; }
  .btn { padding: 11px 24px; font-size: 14px; }

  .modal-content {
    padding: 28px 24px;
    border-radius: var(--r-md);
  }
  .modal-content h2 { font-size: 20px; }
  .modal-content h3 { font-size: 16px; }
  .heartbeat-modal .modal-content.heartbeat-content { padding: 32px 28px; }
  .heartbeat-emoji { font-size: 56px; }
  .heartbeat-svg-icon { width: 56px; height: 56px; }
  #heartbeat-title { font-size: 24px; }

  .suit-options { gap: 8px; }
  .suit-btn { padding: 10px 16px; font-size: 13px; }

  .lobby-content { padding: 28px 16px; }
  .lobby-content h2 { font-size: 24px; }
  .heart-animation { font-size: 64px; }
  .lobby-planet-icon { width: 70px; height: 70px; }
  .header-icon { width: 28px; height: 24px; }
  .mode-card {
    padding: 14px 16px;
    min-width: 110px;
    border-radius: var(--r-sm);
  }
  .mode-icon { font-size: 26px; }
  .mode-name { font-size: 13px; }
  .mode-desc { font-size: 10px; }
  .room-input { width: 140px; font-size: 18px; }
  .code-value { font-size: 28px; letter-spacing: 8px; }

  .music-player { bottom: 14px; right: 14px; }
  .music-btn { width: 46px; height: 46px; font-size: 19px; }
  .music-panel { min-width: 200px; padding: 16px 20px; border-radius: var(--r-sm); }

  .punishment-item { font-size: 13px; padding: 10px 14px; }
  #winner-text { font-size: 24px; }
}

/* ── 平板 ──────────────────────────────────────── */
@media (min-width: 641px) and (max-width: 900px) {
  .container { max-width: 700px; }
  .card { width: 70px; height: 106px; }
  .card-large { width: 100px; height: 148px; }
  .card-back { width: 70px; height: 106px; }
  .card-number { font-size: 30px; }
}

/* ── 触摸设备 ────────────────────────────────────── */
@media (hover: none) {
  .card.playable:hover { transform: translateY(-6px) scale(1); }
  .btn:hover { transform: none; box-shadow: inherit; }
  .deck-pile:hover { transform: none; }
}

/* ════════════════════════════════════════════════════
   退出按钮条
   ════════════════════════════════════════════════════ */
.game-exit-bar {
  display: flex;
  padding: 10px 14px 8px;
  margin-bottom: 4px;
}
.btn-exit {
  font-family: var(--font-body);
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(224,160,176,.4);
  color: var(--primary);
  border-radius: var(--r-full);
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast);
  box-shadow: var(--shadow-xs);
}
.btn-exit:hover, .btn-exit:active {
  background: rgba(255,238,243,.8);
  box-shadow: var(--shadow-sm);
}

/* ════════════════════════════════════════════════════
   房间码弹窗
   ════════════════════════════════════════════════════ */
.room-code-big {
  font-family: var(--font-display);
  font-size: 46px;
  letter-spacing: 10px;
  color: var(--primary);
  text-align: center;
  margin: 18px 0;
  background: linear-gradient(135deg, rgba(255,240,245,.8), rgba(253,232,255,.8));
  border-radius: var(--r-sm);
  padding: 14px 24px;
  border: 2px dashed rgba(240,160,192,.4);
  box-shadow: var(--shadow-sm);
  text-shadow: 0 2px 6px rgba(196,69,105,.15);
}

/* ════════════════════════════════════════════════════
   手牌卡片 — 完整牌名 + 效果标注
   ════════════════════════════════════════════════════ */
.hand .hand-card {
  width: 66px !important;
  height: 100px !important;
  border-radius: 14px !important;
  flex-shrink: 0;
}
.hand .hand-card .card-content {
  gap: 2px !important;
  padding: 6px 4px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hand .hand-card .card-suit {
  font-size: 9px !important;
  opacity: .7;
  letter-spacing: 0 !important;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hand .hand-card .card-number {
  font-size: 28px !important;
  line-height: 1 !important;
}
.card-suit-dot {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  opacity: .7;
  background: rgba(0,0,0,.05);
  border-radius: 8px;
  padding: 1px 6px;
  white-space: nowrap;
}
.hand-card-icon {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.1));
}
.hand-card-name {
  font-family: var(--font-display);
  font-size: 10px;
  color: rgba(0,0,0,.78);
  line-height: 1.2;
  text-align: center;
  word-break: break-all;
  max-width: 58px;
}
.hand-card-effect {
  font-family: var(--font-display);
  font-size: 13px;
  color: rgba(0,0,0,.7);
  line-height: 1;
  text-align: center;
}

/* 癞子手牌 */
.hand .hand-card.suit-joker .hand-card-name,
.hand .hand-card.suit-joker .hand-card-effect,
.hand .hand-card.suit-joker .hand-card-icon {
  color: #ffd700 !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.hand .hand-card.playable {
  transform: translateY(-12px) !important;
}
.hand .hand-card.playable:active {
  transform: translateY(-6px) scale(.96) !important;
  transition-duration: .08s;
}

/* ════════════════════════════════════════════════════
   弹窗取消按钮
   ════════════════════════════════════════════════════ */
.modal-cancel-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(220,220,220,.6);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast);
  z-index: 1;
  box-shadow: var(--shadow-xs);
}
.modal-cancel-btn:hover, .modal-cancel-btn:active {
  background: rgba(254,226,226,.8);
  color: var(--primary);
  border-color: var(--primary);
}
.modal-cancel-hint {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 300;
  color: #aaa;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 0;
}

/* ════════════════════════════════════════════════════
   抽牌弹窗倒计时进度条
   ════════════════════════════════════════════════════ */
.countdown-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.countdown-bar-bg {
  flex: 1;
  height: 8px;
  background: rgba(240,208,224,.3);
  border-radius: var(--r-full);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.06);
}
.countdown-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: var(--r-full);
  transform-origin: left;
  box-shadow: 0 0 8px var(--primary-glow);
}
.countdown-num {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--primary);
  min-width: 24px;
  text-align: right;
}

/* ════════════════════════════════════════════════════
   音效按钮反馈
   ════════════════════════════════════════════════════ */
.btn-click-effect {
  animation: btnClickPop .15s ease;
}
@keyframes btnClickPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
