/* ==========================================================================
   大话骰（摇骰子）· 专用样式
   （公用的背景 / 面板 / 按钮 / 座位样式在 shuiyu.css 里）
   ========================================================================== */

.dd-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;}

/* ---------------- 骰面 ---------------- */
.dice{
  display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);
  gap:2px;padding:5px;border-radius:12px;background:#f8fafc;flex:none;
  box-shadow:0 4px 12px rgba(0,0,0,.45), inset 0 -2px 4px rgba(0,0,0,.12);
  user-select:none;
}
.dice i{display:block;border-radius:50%;background:#1f2937;}
.dice i.off{background:transparent;}
.dice.big{width:42px;height:42px;padding:4px;}
.dice.sm{width:28px;height:28px;padding:3px;gap:1px;border-radius:7px;}
.dice.one{background:linear-gradient(150deg,#fde68a,#f59e0b);}
.dice.one i{background:#dc2626;transform:scale(1.3);box-shadow:0 0 7px rgba(220,38,38,.5);}
/* 重要：金色骰子的「空点位」也必须是透明的，
   否则 3×3 里的 9 个圆点会全部显出来（看着像 9 点） */
.dice.one i.off{background:transparent;transform:none;box-shadow:none;}
.dd-dicerow{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;
  align-items:center;min-height:44px;width:100%;}
.dd-dicerow.shake{animation:ddShake .55s ease-in-out;}
@keyframes ddShake{
  0%{transform:rotate(0);} 20%{transform:rotate(-9deg) scale(.96);}
  50%{transform:rotate(8deg) scale(1.04);} 80%{transform:rotate(-4deg);}
  100%{transform:rotate(0);}
}
.dd-mini{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end;}

/* ---------------- 小状态条（倒计时 + 轮到谁 + 开/劈） ---------------- */
.dd-barpanel{padding:10px 14px;}
.dd-bar{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;}
.dd-bar .dd-left{margin-top:0;font-size:14px;}
.dd-turn{font-size:13.5px;font-weight:800;color:#fde68a;}
.dd-barpanel .dd-open{margin-top:9px;}

/* 叫骰面板顶部：上面「谁叫什么」+ 下面「将叫什么」贴在一起（字都要大） */
.dd-callpair{
  border-radius:13px;padding:10px 10px 11px;
  background:rgba(0,0,0,.28);border:1px solid rgba(168,85,247,.32);
}
.dd-lastcall{
  text-align:center;font-size:15.5px;font-weight:700;color:#e9d5ff;line-height:1.4;
  padding:0;
}
.dd-lastcall b{color:#fde68a;font-size:19px;letter-spacing:.5px;}
.dd-willcall{
  text-align:center;font-size:15.5px;font-weight:800;color:#bbf7d0;line-height:1.4;
  margin-top:4px;padding-top:8px;border-top:1px dashed rgba(255,255,255,.16);
}
.dd-willcall b{color:#4ade80;font-size:22px;letter-spacing:1px;
  text-shadow:0 0 14px rgba(74,222,128,.45);}
.dd-nowline{display:flex;align-items:center;justify-content:center;gap:12px;
  flex-wrap:wrap;margin-top:7px;}
.dd-nowline .dd-left{margin-top:0;font-size:14px;}
.dd-nowmine{
  font-size:15px;font-weight:900;letter-spacing:1px;color:#4ade80;
  text-shadow:0 0 10px rgba(74,222,128,.5);
}
#panelOpen .dd-open{margin-top:10px;}
#barOpen .dd-open{margin-top:9px;}

/* ---------------- 中间的叫骰板 ---------------- */
.dd-board{text-align:center;}
.dd-call{
  font-size:26px;font-weight:900;letter-spacing:1px;line-height:1.25;margin:2px 0 4px;
  background:linear-gradient(135deg,#f9a8d4,#c084fc,#93c5fd);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.45));
}
.dd-call.none{font-size:15px;font-weight:700;color:#c4b5fd;-webkit-text-fill-color:#c4b5fd;
  background:none;filter:none;}
.dd-who{font-size:12px;color:#d8b4fe;line-height:1.6;}
.dd-left{font-size:15px;font-weight:900;color:#fbbf24;letter-spacing:1px;margin-top:4px;}
.dd-left.warn{color:#f87171;}
.dd-left.over{color:#9ca3af;}

/* 开 / 劈：小一点，不要那么占地方 */
.dd-open{display:grid;grid-template-columns:1fr 1fr;gap:8px;
  max-width:236px;margin:10px auto 0;}
.dd-open .sy-btn{padding:9px 4px;font-size:15px;font-weight:900;letter-spacing:1px;
  border:none;border-radius:11px;min-height:36px;}
.dd-btn-kai{background:linear-gradient(135deg,#22c55e,#0ea5e9);
  box-shadow:0 6px 18px rgba(34,197,94,.45);}
.dd-btn-pi{background:linear-gradient(135deg,#f59e0b,#dc2626);
  animation:syBtn 4s ease-in-out infinite, forcePulse 1.9s ease-in-out infinite;
  box-shadow:0 6px 18px rgba(220,38,38,.5);}

/* 「将叫：X 个 Y」—— 放在点数按钮上面 */
.dd-callpre{text-align:center;margin:12px 0 8px;min-height:20px;}

/* ---------------- 叫骰选择区 ---------------- */
.dd-mini2{display:flex;align-items:center;gap:12px;justify-content:center;}
.dd-step{
  width:44px;height:44px;border-radius:12px;font-size:22px;font-weight:900;line-height:1;
  color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.24);
  cursor:pointer;font-family:inherit;padding:0;
}
.dd-step:active{transform:scale(.94);}
.dd-step[disabled]{opacity:.35;cursor:not-allowed;}
.dd-countrow{display:flex;align-items:center;gap:10px;justify-content:center;margin-top:2px;}
.dd-countrow .lb{font-size:13px;font-weight:800;color:#e9d5ff;}
.dd-countbox{
  display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:14px;
  background:rgba(0,0,0,.32);border:1px solid rgba(255,255,255,.24);
}
.dd-num{font-size:26px;font-weight:900;min-width:44px;text-align:center;
  color:#fff;letter-spacing:1px;text-shadow:0 0 12px rgba(196,181,253,.55);}
.dd-unit{font-size:14px;font-weight:800;color:#c4b5fd;margin-left:-2px;}
.dd-pts{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;margin-top:8px;}
.dd-modes{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px;}
.dd-opt{
  font-family:inherit;font-size:13px;font-weight:800;color:#e9d5ff;cursor:pointer;
  padding:11px 2px;border-radius:11px;background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.18);transition:background .18s,border .18s,color .18s;
}
.dd-opt:hover{background:rgba(255,255,255,.16);}
.dd-opt.on{background:linear-gradient(135deg,#a855f7,#ec4899);color:#fff;border:none;
  box-shadow:0 4px 14px rgba(219,39,119,.45);}
.dd-opt[disabled]{opacity:.3;cursor:not-allowed;}
.dd-opt .s{display:block;font-size:10px;font-weight:600;color:#c4b5fd;margin-top:2px;}
.dd-opt.on .s{color:rgba(255,255,255,.85);}
.dd-go{margin-top:12px;}
.dd-go .sy-btn{width:100%;padding:15px;font-size:17px;font-weight:900;letter-spacing:2px;}
.dd-why{font-size:12px;color:#f87171;text-align:center;margin-top:8px;line-height:1.6;}
.dd-ok{font-size:12.5px;color:#4ade80;text-align:center;margin-top:8px;line-height:1.6;}

/* ---------------- 叫骰历史 ---------------- */
.dd-hist{display:flex;flex-direction:column;gap:5px;max-height:190px;overflow:auto;}
.dd-hist .h{
  display:flex;align-items:center;gap:8px;font-size:12.5px;line-height:1.5;
  padding:7px 10px;border-radius:10px;background:rgba(255,255,255,.06);
}
.dd-hist .h .t{font-size:10.5px;color:#a78bfa;flex:none;}
.dd-hist .h.call{color:#f3e8ff;}
.dd-hist .h.open{background:rgba(239,68,68,.18);color:#fecaca;font-weight:800;}
.dd-hist .h.pass,.dd-hist .h.leave,.dd-hist .h.reroll{color:#c4b5fd;}
.dd-hist .h b{color:#fbbf24;}
.dd-hist:empty::after{content:'还没人叫';font-size:12px;color:#a78bfa;}

/* ---------------- 我的骰子 ---------------- */
.dd-mybox{display:flex;flex-direction:column;gap:10px;align-items:center;}
.dd-mytip{font-size:12px;color:#c4b5fd;text-align:center;line-height:1.7;}
.dd-debug{display:flex;gap:6px;align-items:center;margin-top:8px;}
.dd-debug input{
  flex:1;min-width:0;padding:8px 10px;border-radius:9px;color:#fff;font-family:inherit;
  background:rgba(0,0,0,.35);border:1px solid rgba(74,222,128,.5);outline:none;font-size:13px;
}

/* ---------------- 开盅结果 ---------------- */
.dd-openres{font-size:13.5px;font-weight:800;line-height:1.8;text-align:center;}
.dd-openres .big{font-size:19px;letter-spacing:1px;}
.dd-openres .win{color:#4ade80;}
.dd-openres .lose{color:#f87171;}
.dd-all{display:flex;flex-direction:column;gap:7px;margin-top:12px;}
.dd-allrow{
  display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:11px;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.10);
}
.dd-allrow .nm2{flex:1;min-width:0;font-size:12.5px;font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dd-allrow.loser{background:rgba(239,68,68,.18);border-color:rgba(239,68,68,.45);}

/* ==========================================================================
   骰桌（圆桌）
   ========================================================================== */
.dd-tbl{max-width:430px;height:min(calc(100vw + 18px), 430px);min-height:340px;}
.dd-tbl .tbl-table{width:58%;height:54%;}
.dd-tbl .tbl-center{font-size:9.5px;line-height:1.5;color:#d8b4fe;}
.dd-tbl .tbl-center b{font-size:13px;letter-spacing:0;}
.dd-tbl #tblCall{
  display:block;font-size:13px;font-weight:900;color:#f0abfc;line-height:1.25;
  margin:3px 0 1px;text-shadow:0 0 10px rgba(240,171,252,.5);
}
.dd-tbl .pav{width:38px;height:38px;font-size:15px;}
.dd-tbl .pnm{font-size:9.5px;}
.dd-tbl .ptags .tag{font-size:8px;padding:0 4px;line-height:12px;}
.dd-tbl .pst{font-size:10.5px;}
.dd-tbl .pst.turn{font-size:11px;font-weight:900;color:#34d399;letter-spacing:.5px;}
.dd-tbl .pst.away{font-size:15px;letter-spacing:1px;}
.dd-tbl .pst.lose{color:#fca5a5;}
.dd-tbl .pst.win{color:#86efac;}
.dd-tbl .pdrink{font-size:9px;font-weight:800;color:#fbbf24;margin-top:1px;}
/* 人多的局：位置小一点，字也小一点，但不叠在一起 */
.dd-tbl.tight .pav{width:32px;height:32px;font-size:13px;}
.dd-tbl.tight .pnm{font-size:8.5px;}
.dd-tbl.tight .pst{font-size:9.5px;line-height:1.2;}
.dd-tbl.tight .pst.away{font-size:13px;letter-spacing:0;}
.dd-tbl.tight .pdrink{font-size:8.5px;}
.dd-tbl.tight .ptags .tag{font-size:7px;padding:0 3px;line-height:11px;}
.dd-tbl .tbl-act{min-width:96px;padding:8px 10px;font-size:13px;min-height:34px;margin-top:5px;}
.dd-tbl .pmini{display:flex;gap:2px;justify-content:center;flex-wrap:wrap;margin-top:1px;}
/* 座位上那种很小的骰子 */
.dice.xs{width:15px;height:15px;padding:1px;gap:1px;border-radius:4px;}

/* ==========================================================================
   开骰记录（开完强制弹 5 秒）
   ========================================================================== */
.dd-pop{max-width:400px;}
.dd-pop .row{margin-top:14px;}
#openBody .dd-openres{margin-bottom:10px;}
#openBody .dd-allrow{padding:6px 8px;}
#openBody .dd-mini .dice.sm{width:24px;height:24px;padding:2px;}
#openBody .sy-detail{margin-top:10px;}
#openBody .drow{padding:5px 8px;}
.dd-pop #openClose{font-size:14px;padding:12px;}

/* 屏幕窄的时候把骰子缩小一点，让 5 颗挤一行 */
@media(max-width:400px){
  .dice.big{width:40px;height:40px;}
  .dd-dicerow{gap:7px;}
}
@media(max-width:340px){
  .dice.big{width:36px;height:36px;padding:3px;}
  .dd-dicerow{gap:6px;}
}

/* ==========================================================================
   劈 / 反劈：提示 + 按钮 + 全屏特效
   ========================================================================== */
/* 被劈时的弹窗 */
.pi-modal{max-width:330px;text-align:center;
  border-color:rgba(239,68,68,.6);box-shadow:0 20px 50px rgba(0,0,0,.7), 0 0 40px rgba(239,68,68,.35);}
.pi-modal h3{font-size:22px;font-weight:900;color:#fca5a5;letter-spacing:1px;margin-bottom:10px;
  text-shadow:0 0 14px rgba(239,68,68,.6);}
.pi-callline{font-size:15px;font-weight:800;color:#fecaca;letter-spacing:1px;margin:2px 0 0;}
.pi-stake{font-size:18px;font-weight:900;color:#fde68a;letter-spacing:1px;margin:6px 0 0;
  text-shadow:0 0 14px rgba(253,230,138,.5);}
.pi-modal .row{margin-top:16px;}
.pi-back{background:linear-gradient(135deg,#f59e0b,#dc2626,#a855f7);background-size:200% 200%;
  animation:syBtn 4s ease-in-out infinite, forcePulse 1.8s ease-in-out infinite;
  box-shadow:0 6px 18px rgba(220,38,38,.5);border:none;font-size:16px;font-weight:900;
  padding:13px 4px;letter-spacing:2px;}
.pi-modal .sy-btn{font-size:16px;font-weight:900;padding:13px 4px;letter-spacing:2px;}

/* 全屏特效：劈 → 一刀砍过中间 */
.pi-fx{
  position:fixed;inset:0;z-index:90;display:none;align-items:center;justify-content:center;
  overflow:hidden;pointer-events:none;
  background:radial-gradient(circle at 50% 45%, rgba(120,0,0,.30), rgba(0,0,0,.78) 70%);
}
.pi-fx.on{display:flex;animation:fxIn .16s ease-out both;}
/* 特效上方：这手是谁喊的什么 */
.pi-call{
  position:absolute;top:25%;left:0;right:0;text-align:center;padding:0 16px;
  font-size:min(6.6vw,28px);font-weight:900;color:#fff;letter-spacing:1px;
  text-shadow:0 0 16px rgba(239,68,68,.95), 0 4px 14px rgba(0,0,0,.9);z-index:6;
}
.pi-fx.on .pi-call{animation:fxSub .45s ease-out .12s both;}
.pi-word{
  position:relative;z-index:3;font-size:min(30vw,168px);font-weight:900;letter-spacing:.08em;
  background:linear-gradient(135deg,#fde68a,#ef4444 45%,#a855f7);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  filter:drop-shadow(0 8px 26px rgba(239,68,68,.8));
}
.pi-fx.on .pi-word{animation:fxWord .5s cubic-bezier(.18,1.6,.4,1) both, fxPulse 1s ease-in-out .5s both;}
.pi-slash{
  position:absolute;left:-30%;top:50%;width:160%;height:12px;border-radius:99px;
  background:linear-gradient(90deg,transparent,#fff,#fecaca,#fff,transparent);
  box-shadow:0 0 34px 10px rgba(255,255,255,.85), 0 0 90px 24px rgba(239,68,68,.55);
  transform:rotate(-16deg) scaleX(0);z-index:4;
}
.pi-fx.on .pi-slash{animation:fxSlash .5s ease-out .1s both;}
/* 特效上的「×N · 多少杯」 */
.pi-mult{
  position:absolute;bottom:31%;left:0;right:0;text-align:center;
  font-size:min(9vw,40px);font-weight:900;color:#fde68a;letter-spacing:2px;
  text-shadow:0 0 18px rgba(239,68,68,.95), 0 4px 16px rgba(0,0,0,.9);z-index:6;
}
.pi-fx.on .pi-mult{animation:fxSub .5s ease-out .3s both;}
.pi-sub{
  position:absolute;bottom:22%;left:0;right:0;text-align:center;
  font-size:19px;font-weight:900;color:#fff;letter-spacing:2px;
  text-shadow:0 2px 12px rgba(0,0,0,.85);z-index:5;
}
.pi-fx.on .pi-sub{animation:fxSub .5s ease-out .35s both;}
@keyframes fxIn{from{opacity:0;}to{opacity:1;}}
@keyframes fxWord{
  0%{transform:scale(.25) rotate(-14deg);opacity:0;}
  55%{transform:scale(1.18) rotate(4deg);opacity:1;}
  100%{transform:scale(1) rotate(0);opacity:1;}
}
@keyframes fxPulse{0%,100%{transform:scale(1);}50%{transform:scale(1.07);}}
@keyframes fxSlash{
  0%{transform:rotate(-16deg) scaleX(0);opacity:0;}
  55%{transform:rotate(-16deg) scaleX(1.08);opacity:1;}
  100%{transform:rotate(-16deg) scaleX(1);opacity:0;}
}
@keyframes fxSub{from{opacity:0;transform:translateY(14px);}to{opacity:1;transform:translateY(0);}}
body.fx-shake main,body.fx-shake .sy-wrap{animation:fxShake .45s ease-out;}
@keyframes fxShake{
  0%,100%{transform:translate(0,0);}
  20%{transform:translate(-6px,3px);}
  40%{transform:translate(5px,-4px);}
  60%{transform:translate(-4px,-2px);}
  80%{transform:translate(3px,3px);}
}

/* 大厅里的骰子入口卡片 */
.hub-tile.dice-tile .ic{filter:drop-shadow(0 3px 8px rgba(251,191,36,.6));}
