/* ============== 卡片标题与标签（应用于所有游戏面板） ============== */
.sggame-card-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid #f1f5f9;background:#fff;border-radius:12px 12px 0 0}
.sggame-card-head h3{margin:0;font-size:18px;font-weight:700;color:#1e293b;display:flex;align-items:center;gap:8px}
.sggame-card-meta{display:flex;gap:6px;flex-wrap:wrap}
.sggame-badge{display:inline-block;padding:3px 10px;background:#eff6ff;color:#3b82f6;font-size:11px;font-weight:600;border-radius:12px;letter-spacing:0.3px}
.sggame-badge.tag-multi{background:#fef3c7;color:#d97706}
.sggame-badge.tag-reason{background:#dbeafe;color:#1e40af}
.sggame-badge.tag-casual{background:#dcfce7;color:#16a34a}
.sggame-badge.tag-hard{background:#fee2e2;color:#dc2626}
.sggame-badge.tag-luck{background:#f3e8ff;color:#7e22ce}

/* ============== 骰子按钮重构 ============== */
#sggame-dice-roll-btn,#sggame-dice-room-roll-btn{
    background:#fff !important;
    background-image:linear-gradient(135deg,#fb923c 0%,#ef4444 100%) !important;
    border:none !important;
    color:#fff !important;
    padding:14px 36px !important;
    font-size:15px !important;
    font-weight:700 !important;
    border-radius:10px !important;
    box-shadow:0 4px 14px rgba(239,68,68,0.25) !important;
    letter-spacing:1px;
    transition:all 0.2s !important;
    cursor:pointer;
}
#sggame-dice-roll-btn:hover:not(:disabled),#sggame-dice-room-roll-btn:hover:not(:disabled){
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(239,68,68,0.35) !important;
}
#sggame-dice-roll-btn:active:not(:disabled),#sggame-dice-room-roll-btn:active:not(:disabled){
    transform:translateY(0);
}
#sggame-dice-roll-btn:disabled,#sggame-dice-room-roll-btn:disabled{
    background-image:linear-gradient(135deg,#cbd5e1 0%,#94a3b8 100%) !important;
    box-shadow:none !important;
    cursor:not-allowed;
    opacity:0.7;
}
#sggame-dice-roll-btn .fa,#sggame-dice-room-roll-btn .fa{margin-right:6px}

#sggame-dice-reset-btn,#sggame-dice-exit-btn,#sggame-dice-room-exit-btn{
    background:#fff !important;
    border:1.5px solid #e2e8f0 !important;
    color:#475569 !important;
    padding:10px 18px !important;
    font-size:13px !important;
    font-weight:600 !important;
    border-radius:8px !important;
    transition:all 0.15s !important;
}
#sggame-dice-reset-btn:hover{
    border-color:#3b82f6 !important;
    color:#3b82f6 !important;
}
#sggame-dice-exit-btn:hover,#sggame-dice-room-exit-btn:hover{
    border-color:#ef4444 !important;
    color:#ef4444 !important;
}

/* ============== 游戏卡片整体优化（玩法说明、按钮、布局） ============== */
.sggame-rules-box{
    background:linear-gradient(135deg,#f0f9ff 0%,#eff6ff 100%);
    border-left:4px solid #3b82f6;
    padding:14px 18px;
    border-radius:8px;
    color:#1e40af;
    font-size:13px;
    line-height:1.7;
    margin-bottom:18px;
    position:relative;
}
.sggame-rules-box::before{
    content:'\f129';
    font-family:'FontAwesome';
    position:absolute;
    top:14px;
    right:18px;
    font-size:18px;
    color:#3b82f6;
    opacity:0.2;
}
.sggame-rules-box strong{color:#1e3a8a;display:inline-block;margin-right:4px}

.sggame-card.sggame-hanoi-panel,
.sggame-card.sggame-2048-panel,
.sggame-card.sggame-sliding-panel,
.sggame-card.sggame-sudoku-panel,
.sggame-card.sggame-ww-panel{
    background:#fff;
    border-radius:12px;
    box-shadow:0 1px 3px rgba(0,0,0,0.05);
    overflow:hidden;
    margin-bottom:20px;
}
.sggame-card-body{padding:20px}

/* 工具栏按钮（如开始游戏） */
.sggame-card-body .sggame-btn.primary,
.sggame-btn-primary {
    background:linear-gradient(135deg,#3b82f6 0%,#1d4ed8 100%);
    border:none;
    color:#fff;
    padding:9px 22px;
    border-radius:8px;
    font-weight:600;
    font-size:13px;
    cursor:pointer;
    transition:all 0.15s;
    box-shadow:0 2px 6px rgba(59,130,246,0.2);
}
.sggame-card-body .sggame-btn.primary:hover,
.sggame-btn-primary:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(59,130,246,0.3)}
.sggame-card-body .sggame-btn.primary:disabled{background:#cbd5e1;cursor:not-allowed;box-shadow:none;transform:none}

.sggame-card-body select,.sggame-card-body input[type="number"],.sggame-card-body input[type="text"]{
    padding:8px 12px;border:1.5px solid #e2e8f0;border-radius:8px;font-size:13px;outline:none;transition:border 0.15s;background:#fff;color:#1e293b
}
.sggame-card-body select:focus,.sggame-card-body input:focus{border-color:#3b82f6}

/* 数字猜猜随机选号高亮 */
.sggame-btn-accent{background:linear-gradient(135deg,#10b981 0%,#059669 100%) !important;color:#fff !important;border:none !important}
.sggame-btn-accent:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(16,185,129,0.3) !important}

/* ============== 进度续玩弹框 ============== */
.sggame-resume-modal-mask{
    position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(15,23,42,0.65);z-index:99999;
    display:flex;align-items:center;justify-content:center;animation:sggame-fade-in .2s
}
@keyframes sggame-fade-in{from{opacity:0}to{opacity:1}}
.sggame-resume-modal{
    background:#fff;border-radius:14px;padding:24px;width:420px;max-width:90vw;
    box-shadow:0 20px 60px rgba(0,0,0,0.3);animation:sggame-scale-in .25s
}
@keyframes sggame-scale-in{from{transform:scale(0.9);opacity:0}to{transform:scale(1);opacity:1}}
.sggame-resume-modal h4{margin:0 0 12px;font-size:18px;color:#1e293b}
.sggame-resume-modal p{margin:0 0 8px;color:#475569;line-height:1.6;font-size:14px}
.sggame-resume-modal .progress-info{background:#f8fafc;padding:12px 14px;border-radius:8px;margin:14px 0;font-size:13px;color:#334155}
.sggame-resume-modal .progress-info b{color:#3b82f6}
.sggame-resume-modal-actions{display:flex;gap:10px;margin-top:18px}
.sggame-resume-modal-actions button{flex:1;padding:11px;border:none;border-radius:8px;font-weight:600;font-size:14px;cursor:pointer;transition:all 0.15s}
.sggame-resume-modal-actions .resume-yes{background:linear-gradient(135deg,#3b82f6 0%,#1d4ed8 100%);color:#fff}
.sggame-resume-modal-actions .resume-yes:hover{transform:translateY(-1px)}
.sggame-resume-modal-actions .resume-no{background:#f1f5f9;color:#475569}
.sggame-resume-modal-actions .resume-no:hover{background:#e2e8f0}
.sggame-resume-tip{font-size:12px;color:#94a3b8;margin-top:10px;line-height:1.6}

/* 弃权按钮 */
.sggame-give-up-btn{
    margin-left:8px;padding:7px 14px;background:transparent;border:1.5px dashed #e2e8f0;color:#94a3b8;
    border-radius:6px;font-size:12px;cursor:pointer;transition:all 0.15s
}
.sggame-give-up-btn:hover{border-color:#ef4444;color:#ef4444}

/* ============== 房间列表「我的房间」标签 + 删除按钮 ============== */
.sggame-room-mine-tag{
    display:inline-block;
    background:linear-gradient(135deg,#3b82f6 0%,#1d4ed8 100%);
    color:#fff;font-size:10px;font-weight:600;
    padding:2px 7px;border-radius:6px;
    margin-left:6px;letter-spacing:0.3px;
    vertical-align:1px;line-height:1.4;
    box-shadow:0 1px 2px rgba(59,130,246,0.3);
}
.sggame-list-item-action .actions{
    display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex-shrink:0;
}
.sggame-btn.sggame-btn-danger{
    background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);
    color:#fff;border:none;
}
.sggame-btn.sggame-btn-danger:hover{
    background:linear-gradient(135deg,#dc2626 0%,#b91c1c 100%);
    transform:translateY(-1px);
}
/* 走格子专用 */
.sggame-dice-room-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}
.sggame-dice-delete-btn{
    background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);
    color:#fff;border:none;padding:6px 14px;border-radius:6px;
    font-size:12px;font-weight:500;cursor:pointer;transition:all 0.15s;
}
.sggame-dice-delete-btn:hover{
    background:linear-gradient(135deg,#dc2626 0%,#b91c1c 100%);
    transform:translateY(-1px);
}
/* 狼人杀专用 */
.sggame-ww-room-item .actions{display:flex;gap:6px;align-items:center;flex-shrink:0}
.sggame-btn.danger{
    background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%) !important;
    color:#fff !important;border:none !important;
}
.sggame-btn.danger:hover{
    background:linear-gradient(135deg,#dc2626 0%,#b91c1c 100%) !important;
    transform:translateY(-1px);
}
.sggame-pager{display:flex;justify-content:center;align-items:center;gap:14px;padding:14px 0;border-top:1px solid #f1f5f9;margin-top:8px}
.sggame-pager-btn{padding:6px 14px;background:#fff;border:1.5px solid #e2e8f0;color:#475569;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:all 0.15s}
.sggame-pager-btn:hover:not(:disabled){border-color:#3b82f6;color:#3b82f6}
.sggame-pager-btn:disabled{opacity:0.4;cursor:not-allowed}
.sggame-pager-info{font-size:12px;color:#64748b}

/* ============== 通用插件弹窗 ============== */
.sggame-dialog-root{position:relative;z-index:99998}
.sggame-dialog-mask{
    position:fixed !important;
    top:0 !important;left:0 !important;right:0 !important;bottom:0 !important;
    width:100vw !important;height:100vh !important;
    background:rgba(15,23,42,0.55);
    backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    z-index:999999;
    opacity:0;
    transition:opacity 0.2s ease;
    padding:20px;
    box-sizing:border-box;
    margin:0 !important;
}
.sggame-dialog-mask.show,.show > .sggame-dialog-mask{opacity:1}
.sggame-dialog-card{
    background:#fff;
    border-radius:16px;
    width:100%;
    max-width:420px;
    padding:32px 28px 24px;
    box-shadow:0 25px 80px rgba(15,23,42,0.35);
    transform:scale(0.92) translateY(8px);
    opacity:0;
    transition:transform 0.25s cubic-bezier(0.34,1.56,0.64,1),opacity 0.2s;
    text-align:center;
    position:relative;
    margin:auto;
    box-sizing:border-box;
}
.show .sggame-dialog-card{transform:scale(1) translateY(0);opacity:1}

.sggame-dlg-icon-badge{
    width:56px;height:56px;
    border-radius:50%;
    display:flex;
    align-items:center;justify-content:center;
    margin:0 auto 16px;
    box-shadow:0 6px 18px rgba(0,0,0,0.1);
    position:relative;
}
.sggame-dlg-icon-badge span{
    font-size:30px;
    font-weight:700;
    color:#fff;
    line-height:1;
    font-family:-apple-system,sans-serif;
}
.sggame-dlg-icon-success{background:linear-gradient(135deg,#34d399,#10b981)}
.sggame-dlg-icon-error{background:linear-gradient(135deg,#f87171,#dc2626)}
.sggame-dlg-icon-warning{background:linear-gradient(135deg,#fbbf24,#f59e0b)}
.sggame-dlg-icon-info{background:linear-gradient(135deg,#60a5fa,#2563eb)}
.sggame-dlg-icon-question{background:linear-gradient(135deg,#818cf8,#4f46e5)}

.sggame-dlg-title{font-size:18px;font-weight:700;color:#0f172a;margin-bottom:10px;letter-spacing:-0.2px}
.sggame-dlg-content{font-size:14px;color:#475569;line-height:1.7;margin-bottom:22px}
.sggame-dlg-content p{margin:6px 0}
.sggame-dlg-actions{display:flex;gap:10px}
.sggame-dlg-actions .sggame-dlg-btn{flex:1;padding:11px 16px;font-size:14px;font-weight:600;border:none;border-radius:10px;cursor:pointer;transition:all 0.15s}
.sggame-dlg-btn.btn-primary{background:linear-gradient(135deg,#6366f1 0%,#4f46e5 100%);color:#fff;box-shadow:0 4px 12px rgba(99,102,241,0.35)}
.sggame-dlg-btn.btn-primary:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(99,102,241,0.45)}
.sggame-dlg-btn.btn-default{background:#f1f5f9;color:#475569}
.sggame-dlg-btn.btn-default:hover{background:#e2e8f0;color:#1e293b}
.sggame-dlg-btn.btn-danger{background:linear-gradient(135deg,#ef4444 0%,#dc2626 100%);color:#fff;box-shadow:0 4px 12px rgba(239,68,68,0.35)}
.sggame-dlg-btn.btn-danger:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(239,68,68,0.45)}

.sggame-progress-meta{display:flex;align-items:center;justify-content:center;gap:8px;background:#f8fafc;padding:10px 16px;border-radius:10px;margin:12px 0}
.sggame-progress-meta .meta-label{font-size:12px;color:#64748b}
.sggame-progress-meta b{color:#6366f1;font-size:16px}
.sggame-progress-tip{font-size:12px;color:#94a3b8;line-height:1.6;margin-top:10px !important}

/* ============== 玩法说明横幅（极简专业风） ============== */
.sggame-rules-box{
    position:relative;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:10px;
    padding:14px 18px;
    color:#475569;
    font-size:13px;
    line-height:1.7;
    margin-bottom:18px;
    box-shadow:none;
    overflow:visible;
}
.sggame-rules-box::before{
    content:none;
}
.sggame-rules-box::after{
    content:none;
}
.sggame-rules-box strong{
    display:inline-block;
    background:#1e293b;
    color:#fff;
    font-weight:600;
    font-size:11px;
    padding:2px 9px;
    border-radius:4px;
    margin-right:8px;
    letter-spacing:0.5px;
    vertical-align:1px;
    line-height:1.5;
}

/* ============== 数字华容道 UI 美化 ============== */
.sggame-sliding-board{
    background:linear-gradient(135deg,#0f172a 0%,#1e293b 100%);
    padding:12px;
    border-radius:18px;
    max-width:420px;
    margin:0 auto;
    aspect-ratio:1;
    box-shadow:0 10px 30px rgba(15,23,42,0.25),inset 0 0 0 1px rgba(255,255,255,0.05);
    gap:10px;
}
.sggame-sliding-cell{
    background:linear-gradient(160deg,#fbbf24 0%,#f59e0b 50%,#d97706 100%);
    border-radius:12px;
    color:#7c2d12;
    font-weight:800;
    font-size:32px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    aspect-ratio:1;
    box-shadow:
        inset 0 -4px 0 rgba(0,0,0,0.15),
        inset 0 2px 0 rgba(255,255,255,0.4),
        0 4px 10px rgba(217,119,6,0.4);
    transition:transform 0.15s cubic-bezier(0.34,1.56,0.64,1),box-shadow 0.15s;
    text-shadow:0 1px 0 rgba(255,255,255,0.3);
    user-select:none;
    -webkit-user-select:none;
}
.sggame-sliding-cell:hover:not(.empty){
    transform:translateY(-2px);
    box-shadow:
        inset 0 -4px 0 rgba(0,0,0,0.15),
        inset 0 2px 0 rgba(255,255,255,0.4),
        0 6px 14px rgba(217,119,6,0.5);
}
.sggame-sliding-cell:active:not(.empty){
    transform:translateY(0);
    box-shadow:
        inset 0 -2px 0 rgba(0,0,0,0.15),
        0 2px 6px rgba(217,119,6,0.3);
}
.sggame-sliding-cell.empty{
    background:rgba(255,255,255,0.04);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,0.08);
    cursor:default;
}

/* ============== 卡片标题 + 元信息布局优化 ============== */
.sggame-card.sggame-hanoi-panel,
.sggame-card.sggame-2048-panel,
.sggame-card.sggame-sliding-panel,
.sggame-card.sggame-sudoku-panel,
.sggame-card.sggame-ww-panel{
    background:#fff;
    border-radius:14px;
    box-shadow:0 1px 3px rgba(15,23,42,0.05),0 0 0 1px rgba(15,23,42,0.04);
}
.sggame-card-head{
    background:linear-gradient(180deg,#fafbfc 0%,#fff 100%);
    border-radius:14px 14px 0 0;
    border-bottom:1px solid #f1f5f9;
}
.sggame-card-head h3{font-size:18px;font-weight:700;color:#0f172a}

/* ============== 入场费提示美化（汉化点） ============== */
.sggame-info{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;background:#fff7ed;color:#c2410c;border:1px solid #fed7aa;border-radius:20px;font-size:12px;font-weight:600}
