
/* ===== 斗地主样式：复古赌场绿 + 中式纸牌 ===== */
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{user-select:none;-webkit-user-select:none}
body{
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",system-ui,sans-serif;
  background:radial-gradient(ellipse at 50% 30%,#0e5c38 0%,#093d26 55%,#052a1a 100%);
  color:#f3e9d2;min-height:100vh;overflow-x:hidden;
}
body.light{background:radial-gradient(ellipse at 50% 30%,#f7f3e8 0%,#efe7d3 60%,#e2d6b8 100%);color:#4a3f28}
#app{max-width:760px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;padding:8px 10px 14px}

/* 顶栏 */
header{display:flex;align-items:center;gap:8px;padding:6px 2px}
header h1{font-size:20px;letter-spacing:2px}
header h1 .en{display:block;font-size:10px;letter-spacing:3px;color:#d4af37;font-weight:400}
body.light header h1 .en{color:#a8842c}
.hspace{flex:1}
.pill{border:1px solid rgba(212,175,55,.55);border-radius:999px;padding:3px 10px;font-size:12px;color:#f3e9d2;background:rgba(0,0,0,.25)}
body.light .pill{color:#4a3f28;background:rgba(255,255,255,.5)}
.icobtn{width:34px;height:34px;border-radius:50%;border:1px solid rgba(212,175,55,.55);background:rgba(0,0,0,.25);color:#f3e9d2;font-size:15px;cursor:pointer}
body.light .icobtn{color:#4a3f28;background:rgba(255,255,255,.5)}
#langlink{color:#d4af37;text-decoration:none;font-size:13px;border:1px solid rgba(212,175,55,.55);border-radius:999px;padding:6px 10px}

/* AI 座位 */
.airow{display:flex;justify-content:space-between;gap:8px;margin:4px 0}
.seat{flex:1;max-width:48%;border:1px solid rgba(212,175,55,.35);border-radius:12px;padding:6px 8px;background:rgba(0,0,0,.22);position:relative;transition:box-shadow .25s,border-color .25s}
body.light .seat{background:rgba(255,255,255,.55)}
.seat.turn{border-color:#ffd700;box-shadow:0 0 12px rgba(255,215,0,.55)}
.seat .nm{font-size:13px;font-weight:700;display:flex;align-items:center;gap:6px}
.role{font-size:11px;padding:1px 8px;border-radius:999px;background:#5a5348;color:#fff}
.role.landlord{background:linear-gradient(180deg,#d4af37,#9c7c1e);color:#241c05;font-weight:800}
.role.peasant{background:linear-gradient(180deg,#4d8f5f,#2f6b3e);color:#fff}
.seat .cnt{font-size:12px;color:#ffd98a;margin-top:2px}
.seat .bid{font-size:12px;color:#9fe6b0;min-height:16px;margin-top:2px}
.seat .plays{min-height:44px;margin-top:4px;display:flex;flex-wrap:wrap;gap:2px;align-items:flex-start}

/* 中央区：底牌 + 倍数 */
#center{text-align:center;margin:6px 0;min-height:86px}
#bottomCards{display:flex;justify-content:center;gap:6px;margin-bottom:4px;min-height:56px}
#multInfo{font-size:13px;color:#ffd98a}
body.light #multInfo{color:#8a6d1f}

/* 玩家出牌区 */
#myPlays{display:flex;justify-content:center;flex-wrap:wrap;gap:2px;min-height:44px;margin:2px 0}

/* 手牌 */
#hand{display:flex;justify-content:center;align-items:flex-end;margin:6px 0 2px;min-height:96px;padding:0 4px}
#hand .pcard{margin-left:-32px;cursor:pointer;transition:transform .15s}
#hand .pcard:first-child{margin-left:0}
#hand .pcard.sel{transform:translateY(-14px);box-shadow:0 0 10px rgba(255,215,0,.8)}

/* 纸牌 */
.pcard{width:56px;height:78px;border-radius:8px;background:linear-gradient(160deg,#fffdf6,#f0e8d2);
  border:1px solid #b9a86f;position:relative;color:#222;flex:0 0 auto;
  box-shadow:0 2px 5px rgba(0,0,0,.35);font-family:Georgia,"Times New Roman",serif}
.pcard.red{color:#c0272d}
.pcard .corner{position:absolute;display:flex;flex-direction:column;align-items:center;line-height:1.05;font-weight:700}
.pcard .corner .r{font-size:15px}
.pcard .corner .s{font-size:12px}
.pcard .corner.tl{top:3px;left:4px}
.pcard .corner.br{bottom:3px;right:4px;transform:rotate(180deg)}
.pcard .pip{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:26px}
.pcard.back{background:repeating-linear-gradient(45deg,#1c3f8f 0 6px,#274fa8 6px 12px);border:1px solid #d4af37}
.pcard.joker .pip{font-size:30px;font-family:"PingFang SC","Microsoft YaHei",sans-serif;font-weight:800}
.pcard.joker.small{color:#222}
.pcard.joker.big{color:#c0272d}
.mini .pcard{width:34px;height:48px;border-radius:6px}
.mini .pcard .corner .r{font-size:10px}
.mini .pcard .corner .s{font-size:8px}
.mini .pcard .corner.tl{top:2px;left:3px}
.mini .pcard .corner.br{bottom:2px;right:3px}
.mini .pcard .pip{font-size:16px}
.mini .pcard.joker .pip{font-size:17px}
#bottomCards .pcard{width:44px;height:62px;border-radius:7px}
#bottomCards .pcard .corner .r{font-size:12px}
#bottomCards .pcard .corner .s{font-size:10px}
#bottomCards .pcard .pip{font-size:20px}

/* 按钮 */
#actions{display:flex;justify-content:center;gap:10px;margin:8px 0;min-height:46px;flex-wrap:wrap}
.abtn{border:1px solid rgba(212,175,55,.6);border-radius:12px;padding:10px 22px;font-size:16px;font-weight:700;
  background:linear-gradient(180deg,#3a4a3f,#243128);color:#f3e9d2;cursor:pointer;min-width:86px}
.abtn.primary{background:linear-gradient(180deg,#d4af37,#9c7c1e);color:#241c05;border-color:#ffe9a8}
.abtn.play{background:linear-gradient(180deg,#2f9e5f,#1d7a44);color:#fff;border-color:rgba(124,252,154,.55)}
.abtn.hintb{background:linear-gradient(180deg,#3f6fb5,#2a4f86);color:#fff;border-color:rgba(150,190,255,.55)}
.abtn:disabled{opacity:.35;cursor:default}
body.light .abtn{background:linear-gradient(180deg,#fff,#e8dfc8);color:#4a3f28}
body.light .abtn.primary{background:linear-gradient(180deg,#e8c84a,#c39a1f);color:#241c05}
body.light .abtn.play{background:linear-gradient(180deg,#3aad6a,#248a4e);color:#fff}
body.light .abtn.hintb{background:linear-gradient(180deg,#4d7fc4,#33598f);color:#fff}

/* toast */
#toast{position:fixed;left:50%;bottom:32%;transform:translateX(-50%);background:rgba(0,0,0,.82);color:#ffe9a8;
  padding:10px 20px;border-radius:10px;font-size:15px;display:none;z-index:60;border:1px solid rgba(212,175,55,.5);
  max-width:86vw;text-align:center}

/* 结算弹窗 */
#modal,#helpModal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:50}
#modal.show,#helpModal.show{display:flex}
#modal .box,#helpModal .box{background:linear-gradient(180deg,#123f28,#0a2a1a);border:2px solid #d4af37;border-radius:16px;
  padding:26px 30px;text-align:center;color:#f3e9d2;max-width:88vw}
body.light #modal .box,#helpModal .box{background:linear-gradient(180deg,#fffdf4,#f3ecd8);color:#4a3f28}
#modal h2,#helpModal h2{font-size:24px;margin-bottom:10px}
#modal h2.win{color:#7cfc9a}
#modal h2.lose{color:#ff9d8a}
#modal .detail{font-size:14px;line-height:1.9;margin-bottom:14px}
#helpModal .box.wide{width:520px;max-width:92vw;text-align:left;max-height:84vh;overflow-y:auto}
#helpModal .helpbody{font-size:14px;line-height:1.9}

/* 发牌动画 */
.fly{position:fixed;width:44px;height:62px;border-radius:7px;z-index:70;pointer-events:none;
  background:repeating-linear-gradient(45deg,#1c3f8f 0 6px,#274fa8 6px 12px);
  border:1px solid #d4af37;box-shadow:0 3px 10px rgba(0,0,0,.55),inset 0 0 0 3px rgba(212,175,55,.25);
  transition:transform .34s cubic-bezier(.25,.8,.35,1),opacity .22s ease}
/* 玩家手牌逐张翻出 */
.deal-in{animation:dealIn .3s ease-out}
@keyframes dealIn{from{transform:translateY(28px) rotate(5deg) scale(.85);opacity:0}}
/* 电脑手牌：牌背 */
.backs{display:flex;justify-content:center;min-height:44px;margin-top:4px}
.backs .bk{width:30px;height:42px;margin-left:-21px;border-radius:4px;flex:0 0 auto;
  background:repeating-linear-gradient(45deg,#1c3f8f 0 5px,#274fa8 5px 10px);
  border:1px solid rgba(212,175,55,.8);box-shadow:0 1px 4px rgba(0,0,0,.45),inset 0 0 0 2px rgba(212,175,55,.2)}
.backs .bk:first-child{margin-left:0}
/* 发牌中的牌墩 */
.deckpile{position:relative;width:54px;height:72px;margin:2px auto}
.deckpile .pcard.back{position:absolute;top:0;left:0}
/* 大小王 Scout 形象 */
.pcard.joker .joker-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:7px}

/* 页脚 */
footer{margin-top:auto;text-align:center;font-size:12px;color:#b8a06a;padding:10px 0 4px}
footer a{color:#b8a06a;text-decoration:none;margin:0 6px}
.shake{animation:shake .3s}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

@media (max-width:480px){
  .pcard{width:44px;height:62px}
  .pcard .corner .r{font-size:12px}
  .pcard .corner .s{font-size:10px}
  .pcard .pip{font-size:20px}
  .pcard.joker .pip{font-size:22px}
  #hand .pcard{margin-left:-27px}
  #hand .pcard.sel{transform:translateY(-11px)}
  .abtn{padding:9px 16px;font-size:15px;min-width:76px}
}

