/* ==========================================================================
   P2P 网页斗地主 - 极清扑克与全端响应式 CSS 样式表 (v2 高清优化版)
   ========================================================================== */

:root {
    --bg-dark: #071a14;
    --felt-green: #0b3d30;
    --felt-green-light: #125442;
    --felt-border: #1d7c62;
    --accent-gold: #ffd700;
    --accent-orange: #ff9800;
    --accent-red: #ef4444;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-card: 0 6px 16px rgba(0, 0, 0, 0.5);
    
    /* 桌面端扑克牌尺寸 (精细微小圆角 4px) */
    --card-w: 86px;
    --card-h: 124px;
    --card-radius: 4px;
    --card-overlap: -50px;

    --font-main: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    --font-num: 'Outfit', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

input, textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
    cursor: text !important;
    touch-action: auto !important;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-light);
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

html, body, .game-container {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* 尊贵深海夜空绀蓝提花外屏底 (Deep Midnight Sapphire) */
    background-color: #0b1329 !important;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(30, 58, 138, 0.88) 0%, rgba(15, 23, 42, 0.95) 60%, #030712 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 0 L36 18 L18 36 L0 18 Z' fill='none' stroke='%2360a5fa' stroke-width='0.75' stroke-opacity='0.15'/%3E%3Cpath d='M18 6 L30 18 L18 30 L6 18 Z' fill='none' stroke='%23ffd700' stroke-width='0.4' stroke-opacity='0.12'/%3E%3Ccircle cx='18' cy='18' r='2' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='2' cy='2' r='0.8' fill='%23ffffff' fill-opacity='0.07'/%3E%3Ccircle cx='8' cy='8' r='0.7' fill='%23ffffff' fill-opacity='0.06'/%3E%3C/svg%3E") !important;
    background-size: cover, 36px 36px, 12px 12px !important;
    position: relative;
}

/* 顶部导航栏 — 深色木黎牌室档档风格 */
.top-nav, .app-header {
    height: 48px;
    background: linear-gradient(180deg, #180a04 0%, #0e0602 100%);
    border-bottom: 1px solid rgba(180,140,50,0.3);
}

/* 墨绿主题：游鲸五子棋专属全局背景与 Header */
body.theme-gomoku,
body.theme-gomoku .game-container {
    background-color: #03140e !important;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(14, 61, 45, 0.95) 0%, rgba(6, 34, 24, 0.98) 60%, #020d09 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 0 L36 18 L18 36 L0 18 Z' fill='none' stroke='%2334d399' stroke-width='0.75' stroke-opacity='0.12'/%3E%3C/svg%3E") !important;
    transition: background 0.4s ease;
}

body.theme-gomoku .top-nav,
body.theme-gomoku .app-header {
    background: linear-gradient(180deg, #062218 0%, #03140e 100%) !important;
    border-bottom: 1px solid rgba(52, 211, 153, 0.3) !important;
}

/* 🀄 国粹翡翠金纹主题：游鲸麻将专属全局大背景（带菱形网格外壳）与 Header */
body.theme-mahjong,
body.theme-mahjong .game-container,
body.theme-mahjong #lobbyScreen {
    background-color: #031c15 !important;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(6, 78, 59, 0.95) 0%, rgba(2, 44, 34, 0.98) 60%, #01140e 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 0 L36 18 L18 36 L0 18 Z' fill='none' stroke='%2334d399' stroke-width='0.75' stroke-opacity='0.2'/%3E%3Cpath d='M18 6 L30 18 L18 30 L6 18 Z' fill='none' stroke='%23ffd700' stroke-width='0.4' stroke-opacity='0.16'/%3E%3Ccircle cx='18' cy='18' r='2' fill='%2334d399' fill-opacity='0.15'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='2' cy='2' r='0.8' fill='%2334d399' fill-opacity='0.08'/%3E%3Ccircle cx='8' cy='8' r='0.7' fill='%2334d399' fill-opacity='0.07'/%3E%3C/svg%3E") !important;
    background-size: cover, 36px 36px, 12px 12px !important;
    transition: background 0.4s ease;
}

body.theme-mahjong .top-nav,
body.theme-mahjong .app-header {
    background: linear-gradient(180deg, #062218 0%, #03140e 100%) !important;
    border-bottom: 1px solid rgba(52, 211, 153, 0.3) !important;
}

/* 当主页大厅 (#lobbyScreen) 处于激活状态时，隐藏顶部 app-header 导航条 */
body:has(#lobbyScreen.active) .app-header,
.game-container:has(#lobbyScreen.active) .app-header,
.app-header.in-lobby {
    display: none !important;
}

.app-header {
    height: 48px;
    background: linear-gradient(180deg, #180a04 0%, #0e0602 100%);
    border-bottom: 1px solid rgba(180,140,50,0.3);
    /* 顶部细金线 */
    box-shadow: 0 1px 0 0 rgba(201,146,42,0.15), 0 2px 12px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 9999 !important;
    position: relative;
}

/* header 内的横纹绒布微纹 */
.app-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.06) 3px,
        rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
}

/* 左上角返回主页按钮 */
.btn-top-home {
    background: rgba(80,40,5,0.5);
    border: 1px solid rgba(180,130,40,0.35);
    color: #c9a255;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.btn-top-home:hover {
    background: rgba(120,60,5,0.65);
    border-color: rgba(255,215,0,0.5);
    color: #ffd700;
    box-shadow: 0 0 8px rgba(255,215,0,0.1);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent-gold);
}

/* 顶栏品牌文字 — 与主页大厅标题统一：哑金衬线发光 */
.brand-badge {
    font-family: 'Noto Serif SC', 'Noto Sans SC', serif;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: #f5d98a;
    text-shadow: 0 1px 3px rgba(0,0,0,0.7), 0 0 16px rgba(255,215,0,0.18);
    user-select: none;
    position: relative;
    z-index: 1;
}

.badge-free {
    font-size: 0.7rem;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.room-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.45);
    padding: 3px 12px;
    border-radius: 2px;
    border: 1px solid rgba(120,80,20,0.35);
}

.room-code {
    font-family: var(--font-num);
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #e8b84b;
    font-size: 0.9rem;
}

.header-cont.brand-hero {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #ffd700 0%, #f59e0b 100%);
    color: #000000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 14px rgba(255, 215, 0, 0.35);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #94a3b8;
}

.card-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.card-icon-wrap.gold {
    background: rgba(255, 215, 0, 0.12);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
}

.card-icon-wrap.cyan {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.pill-badge.gold {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
}

.pill-badge.cyan {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.quick-join-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: #f1f5f9;
}

.join-banner-icon {
    font-size: 1.2rem;
    color: #ffd700;
}

.input-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 6px;
    text-align: left;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: rgba(60,30,5,0.5);
    border: 1px solid rgba(120,80,20,0.35);
    color: #a07840;
    padding: 4px 10px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.btn-icon:hover {
    background: rgba(100,50,5,0.65);
    border-color: rgba(201,146,42,0.55);
    color: #c9a255;
    box-shadow: 0 0 8px rgba(201,146,42,0.1);
}

/* 顶部下拉菜单 */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 175px;
    background: rgba(14, 22, 18, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201, 146, 42, 0.4);
    border-radius: 4px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 215, 0, 0.15);
    z-index: 10005 !important;
    display: flex;
    flex-direction: column;
    gap: 3px;
    animation: fadeInDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.menu-item i {
    color: #ffffff;
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

.menu-item:hover {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
}

.menu-item.danger {
    color: #f87171;
}

.menu-item.danger i {
    color: #ef4444 !important;
}

.menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.16);
    color: #ff9999;
}

/* ============================================================
   ❓ 牌型说明按钮 & 弹窗
   ============================================================ */

/* 底牌旁牌型说明按钮 — 简洁暗色 */
.btn-card-help {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(40,20,5,0.7);
    border: 1px solid rgba(120,80,20,0.4);
    color: #8a6030;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.btn-card-help:hover {
    background: rgba(80,40,5,0.8);
    border-color: rgba(201,146,42,0.5);
    color: #c9a255;
}

/* 弹窗遮罩 */
.card-type-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    backdrop-filter: blur(3px);
}

/* 弹窗主体 */
.card-type-inner {
    background: linear-gradient(180deg, #1a0e06 0%, #100806 100%);
    border: 1px solid rgba(180,140,50,0.45);
    border-radius: 4px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 40px rgba(120,20,20,0.15);
    overflow: hidden;
}

/* 弹窗顶部标题栏 */
.ct-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0,0,0,0.4);
    border-bottom: 1px solid rgba(120,80,20,0.35);
    flex-shrink: 0;
}
.ct-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    font-weight: 800;
    color: #c9a255;
    letter-spacing: 1px;
}
.ct-close {
    background: rgba(50,15,5,0.6);
    border: 1px solid rgba(120,60,20,0.4);
    color: #8a6030;
    border-radius: 2px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.ct-close:hover { color: #f87171; border-color: rgba(200,50,30,0.5); }

/* 弹窗内容区 — 可滚动 */
.ct-body {
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}

/* 牌型分区 */
.ct-section {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(80,50,10,0.3);
    border-radius: 3px;
    padding: 8px 10px;
}
.ct-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #a07840;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.ct-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ct-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
}
.ct-cards {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

/* 迷你牌面 */
.ct-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 32px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 0.68rem;
    font-weight: 900;
    color: #1a1a1a;
    font-family: var(--font-num);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.ct-card.red { color: #dc2626; }
.ct-card.joker-big {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 0.55rem;
    font-weight: 900;
    border-color: #f59e0b;
}
.ct-card.joker-small {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #3730a3;
    font-size: 0.55rem;
    font-weight: 900;
    border-color: #818cf8;
}

.ct-name {
    font-size: 0.72rem;
    font-weight: 800;
    color: #d4b87a;
    letter-spacing: 0.3px;
}
.ct-desc {
    font-size: 0.62rem;
    color: #6b4820;
    line-height: 1.3;
}

/* 底部提示栏 */
.ct-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(40,20,5,0.4);
    border: 1px solid rgba(180,140,50,0.2);
    border-radius: 3px;
    padding: 8px 10px;
    font-size: 0.65rem;
    color: #8a6030;
    line-height: 1.6;
}
.ct-tip i { color: #c9922a; margin-top: 2px; flex-shrink: 0; }
.btn-icon.danger {
    background: rgba(50,10,5,0.55);
    border-color: rgba(160,40,30,0.4);
    color: #c06050;
}

.btn-icon.danger:hover {
    background: rgba(80,15,5,0.7);
    border-color: rgba(220,60,40,0.6);
    color: #f87171;
    box-shadow: 0 0 8px rgba(200,40,20,0.15);
}

/* 模态框 / 遮罩屏 — 主屏背景 */
.overlay-screen {
    position: absolute;
    inset: 0;
    /* 斗地主模式：经典深红酒红底色 + 高清明显 36px 提花菱形网格 */
    background-color: #1a0608;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(75, 20, 24, 0.92) 0%, rgba(26, 6, 8, 0.98) 60%, #0c0203 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect width='36' height='36' fill='none'/%3E%3Cpath d='M18 0 L36 18 L18 36 L0 18 Z' fill='none' stroke='%23ffffff' stroke-width='1.2' stroke-opacity='0.42'/%3E%3Cpath d='M18 6 L30 18 L18 30 L6 18 Z' fill='none' stroke='%23ffd700' stroke-width='0.8' stroke-opacity='0.30'/%3E%3C/svg%3E");
    background-size: cover, 36px 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background 0.4s ease;
}

/* 五子棋墨绿主题激活时，外围大屏背景同步为墨绿 36px 明显菱形网格 */
body.theme-gomoku .overlay-screen {
    background-color: #03140e !important;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(14, 61, 45, 0.95) 0%, rgba(6, 34, 24, 0.98) 60%, #020d09 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Crect width='36' height='36' fill='none'/%3E%3Cpath d='M18 0 L36 18 L18 36 L0 18 Z' fill='none' stroke='%2334d399' stroke-width='1.2' stroke-opacity='0.45'/%3E%3Cpath d='M18 6 L30 18 L18 30 L6 18 Z' fill='none' stroke='%236ee7b7' stroke-width='0.8' stroke-opacity='0.32'/%3E%3C/svg%3E") !important;
    background-size: cover, 36px 36px !important;
}

.overlay-screen.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   牌室风格大厅主卡片 (Card Room Lobby — Felt + Gold Foil)
   ========================================================================== */

.hero-lobby-card {
    /* 深色皮革底面 */
    background: #130508;
    /* 极简精致单描边 */
    border: 1px solid rgba(201, 146, 42, 0.35);
    border-radius: 6px;
    width: 90%;
    max-width: 430px;
    padding: 0;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
    z-index: 10;
    overflow: hidden;
    text-align: center;
}

/* 顶部橙红渐变装饰横幅 (左右对齐与双王卡牌装饰) */
.lobby-header.doudizhu-header {
    background: linear-gradient(180deg, #7a1a1a 0%, #5c1212 55%, #3d0a0a 100%);
    padding: 16px 20px 16px 26px !important;
    border-bottom: 1px solid #7a5a1e;
    position: relative;
    overflow: hidden;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
}

/* 斗地主 Header 顶部右侧悬浮双王 2.5D 艺术装饰 (大王 & 小王 — 伪3D视角压感倾斜重叠版) */
.doudizhu-cards-decoration {
    position: relative;
    width: 84px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    margin-right: 14px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 5;
    perspective: 600px; /* 开启 2.5D 真实透视视距 */
    transform-style: preserve-3d;
}

.mini-poker-card {
    width: 44px;
    height: 60px;
    border-radius: 2.5px !important; /* 微小精细纸牌圆角 */
    position: absolute;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3px 4px;
    box-sizing: border-box;
    font-family: var(--font-num);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    backface-visibility: hidden;
    overflow: hidden; /* 裁剪右下角艺术放大的印章图案 */
}

.joker-vertical-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.84;
    font-size: 0.52rem; /* 电脑端放大 JOKER 竖排字标 */
    font-weight: 900;
    align-self: flex-start;
    font-family: 'Outfit', -apple-system, sans-serif;
    margin-left: 2px;
    margin-top: 2px;
    position: relative;
    z-index: 2;
}

.joker-vertical-label span {
    display: block;
}

.joker-vertical-label.red {
    color: #dc2626;
}

.joker-vertical-label.black {
    color: #0f172a;
}

.joker-bottom-graphic {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 38px; /* 电脑端放大右下角矢量图案 */
    height: 38px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 1;
}

.joker-bottom-graphic .joker-svg {
    width: 38px; /* 电脑端放大右下角矢量图案 */
    height: 38px;
    filter: drop-shadow(-1px -1px 2px rgba(0, 0, 0, 0.15));
}

/* 电脑对局内大牌面大小王专属放大调优 */
.card .joker-vertical-label {
    font-size: 0.54rem;
    line-height: 0.85;
    margin-left: 3px;
    margin-top: 3px;
}

.card .joker-bottom-graphic {
    width: 42px;
    height: 42px;
    right: -4px;
    bottom: -4px;
}

.card .joker-bottom-graphic .joker-svg {
    width: 42px;
    height: 42px;
}

/* 大王 (Red Joker - 2.5D X/Y/Z 轴立体向左侧倾斜) */
.mini-poker-card.big-joker {
    left: 2px;
    top: -2px;
    transform: perspective(500px) rotateX(14deg) rotateY(-18deg) rotateZ(-8deg) translateZ(12px);
    background: linear-gradient(145deg, #ffffff 0%, #fff7ed 100%);
    border: 1.2px solid #dc2626;
    box-shadow: 6px 12px 20px rgba(0, 0, 0, 0.65), inset -1px -1px 2px rgba(255, 255, 255, 0.9), 0 0 10px rgba(220, 38, 38, 0.25);
    z-index: 2;
}

/* 小王 (Black Joker - 2.5D X/Y/Z 轴立体向右侧压感倾斜) */
.mini-poker-card.small-joker {
    right: 4px;
    bottom: -2px;
    transform: perspective(500px) rotateX(16deg) rotateY(16deg) rotateZ(10deg) translateZ(0px);
    background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
    border: 1.2px solid #1e293b;
    box-shadow: 5px 10px 18px rgba(0, 0, 0, 0.55), inset -1px -1px 2px rgba(255, 255, 255, 0.9);
    z-index: 1;
}

/* 点击促发 2.5D 视角动态弹跳 */
.doudizhu-cards-decoration.animate .big-joker {
    animation: jokerBounceBig 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.doudizhu-cards-decoration.animate .small-joker {
    animation: jokerBounceSmall 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes jokerBounceBig {
    0% { transform: perspective(500px) rotateX(14deg) rotateY(-18deg) rotateZ(-8deg) translateZ(12px); }
    45% { transform: perspective(500px) rotateX(24deg) rotateY(-32deg) rotateZ(-16deg) translateZ(28px) translateY(-6px); box-shadow: 12px 20px 28px rgba(220, 38, 38, 0.55); }
    100% { transform: perspective(500px) rotateX(14deg) rotateY(-18deg) rotateZ(-8deg) translateZ(12px); }
}

@keyframes jokerBounceSmall {
    0% { transform: perspective(500px) rotateX(16deg) rotateY(16deg) rotateZ(10deg) translateZ(0px); }
    45% { transform: perspective(500px) rotateX(26deg) rotateY(30deg) rotateZ(18deg) translateZ(18px) translateY(6px); box-shadow: 10px 18px 26px rgba(0, 0, 0, 0.65); }
    100% { transform: perspective(500px) rotateX(16deg) rotateY(16deg) rotateZ(10deg) translateZ(0px); }
}

/* 横幅内隐约的横纹绒布纹 */
.lobby-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.08) 3px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
}

/* 顶部金线装饰 */
.lobby-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #c9922a 20%, #ffd700 50%, #c9922a 80%, transparent 100%);
}

.brand-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
    position: relative;
}

.brand-logo-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(145deg, #ffd700 0%, #c9922a 100%);
    color: #3d0a0a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.6),
        0 0 0 1px rgba(255,215,0,0.4) inset;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: #f5d98a;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 0 20px rgba(255,215,0,0.2);
    font-family: 'Noto Serif SC', 'Noto Sans SC', serif;
}

.brand-subtitle {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: #a07840;
    margin-top: 2px;
    text-transform: uppercase;
}

.hero-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    position: relative;
}

.badge-tag {
    background: rgba(0,0,0,0.35);
    color: #c9a255;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    border: 1px solid rgba(180, 140, 50, 0.25);
    letter-spacing: 0.5px;
}

/* 表单主体区 - 绒布底纹 */
.lobby-form {
    padding: 22px 24px;
    background-image:
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.012) 2px,
            rgba(255,255,255,0.012) 4px
        );
}

.nickname-section {
    margin-bottom: 18px;
}

.input-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #a07840;
    margin-bottom: 6px;
    text-align: left;
}

.nickname-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(180, 140, 50, 0.25);
    border-radius: 3px;
    padding: 5px 5px 5px 14px;
    transition: all 0.2s ease;
}

.nickname-input-wrapper:focus-within {
    border-color: rgba(201, 146, 42, 0.6);
    background: rgba(0,0,0,0.6);
    box-shadow: 0 0 0 2px rgba(201,146,42,0.1);
}

.nickname-input-wrapper .input-icon {
    color: #7a5a2a;
    font-size: 0.9rem;
    margin-right: 10px;
    flex-shrink: 0;
}

.nickname-input-wrapper input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #f5d98a !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    padding: 8px 0 !important;
    height: 36px !important;
    letter-spacing: 0.5px;
}

.nickname-input-wrapper input::placeholder {
    color: #4a3820;
    font-weight: 400;
}

.btn-random-nick {
    background: rgba(180,140,50,0.15) !important;
    color: #c9a255 !important;
    border: 1px solid rgba(180,140,50,0.3) !important;
    border-radius: 2px !important;
    padding: 0 12px !important;
    height: 34px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    letter-spacing: 0.5px;
    transition: all 0.15s ease !important;
}

.btn-random-nick:hover {
    background: rgba(201,146,42,0.28) !important;
    border-color: rgba(255,215,0,0.5) !important;
    color: #ffd700 !important;
}

.btn-random-nick:active {
    transform: scale(0.97);
}

.btn-boredom-toy:active {
    transform: translateY(-50%) scale(0.92);
}

/* ==========================================================================
   个性化外观与皮肤工坊 Modal Styles (Appearance & Skins Shop)
   ========================================================================== */
.skin-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 10px 0;
    max-height: 380px;
    overflow-y: auto;
}

.skin-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.skin-card:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.skin-card.active {
    border: 1px solid #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.18) !important;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.skin-preview {
    width: 100%;
    height: 54px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}

.skin-bg-default {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.skin-bg-emerald {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.9), rgba(4, 47, 36, 0.95));
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.skin-bg-cyber {
    background: linear-gradient(135deg, rgba(112, 26, 117, 0.9), rgba(76, 29, 149, 0.95));
    border: 1px solid rgba(244, 114, 182, 0.4);
}

.avatar-skin-item {
    font-size: 2.2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.skin-glow-preview {
    width: 100%;
    height: 48px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.glow-gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    border: 1px dashed rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.glow-fire {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px dashed rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.glow-lightning {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px dashed rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.skin-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.skin-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f1f5f9;
}

.skin-status {
    font-size: 0.62rem;
    color: #94a3b8;
}

.skin-card.active .skin-status {
    color: #c084fc;
    font-weight: 800;
}

.mode-selection {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 牌室风格功能卡片 */
.mode-card {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(120, 80, 20, 0.35);
    border-radius: 3px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.mode-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,215,0,0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.mode-card:hover {
    background: rgba(120,40,20,0.22);
    border-color: rgba(201,146,42,0.55);
}

.mode-card:hover::before {
    opacity: 1;
}

.primary-card {
    border-color: rgba(180,140,50,0.45);
}

.card-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.card-icon-wrap.gold {
    background: rgba(180,120,10,0.18);
    border: 1px solid rgba(180,140,50,0.4);
    color: #e8b84b;
}

.card-icon-wrap.cyan {
    background: rgba(30,120,160,0.18);
    border: 1px solid rgba(50,160,200,0.35);
    color: #60b8d8;
}

.card-icon-wrap.green {
    background: rgba(20,120,60,0.18);
    border: 1px solid rgba(40,180,100,0.35);
    color: #34d399;
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: rgba(80,40,10,0.3);
    border: 1px solid rgba(120,80,20,0.3);
    color: #c9a255;
}

.card-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #e8d5a0;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
    letter-spacing: 0.3px;
}

.card-desc {
    font-size: 0.72rem;
    color: #7a6040;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.pill-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 2px;
    background: rgba(80,40,10,0.4);
    color: #a07840;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid rgba(120,80,20,0.3);
}

.pill-badge.gold {
    background: rgba(180,120,10,0.2);
    border: 1px solid rgba(180,140,50,0.4);
    color: #e8b84b;
}

.pill-badge.cyan {
    background: rgba(30,100,140,0.2);
    border: 1px solid rgba(50,140,180,0.35);
    color: #60b8d8;
}

.pill-badge.green {
    background: rgba(15,80,45,0.25);
    border: 1px solid rgba(40,160,100,0.4);
    color: #34d399;
}

.card-arrow {
    font-size: 0.8rem;
    color: #5a4020;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mode-card:hover .card-arrow {
    transform: translateX(4px);
    color: #c9a255;
}

.join-card {
    background: transparent !important;
    border: 1px solid rgba(100,60,15,0.4) !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    cursor: default !important;
    gap: 10px !important;
}

.card-title-sm {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7a6040;
    display: flex;
    align-items: center;
    gap: 6px;
}

.join-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.join-input-row input {
    flex: 1;
    position: relative;
    z-index: 5;
    background: rgba(0,0,0,0.5) !important;
    border: 1px solid rgba(120,80,20,0.4) !important;
    border-radius: 3px !important;
    padding: 9px 12px !important;
    height: 40px !important;
    color: #f5d98a !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    letter-spacing: 1px;
    user-select: text !important;
    -webkit-user-select: text !important;
    pointer-events: auto !important;
    cursor: text !important;
}

.join-input-row input:focus {
    border-color: rgba(201,146,42,0.65) !important;
    box-shadow: 0 0 0 2px rgba(201,146,42,0.12) !important;
}

.btn-join-action {
    background: linear-gradient(180deg, #c9922a 0%, #9a6a10 100%) !important;
    color: #fff9e6 !important;
    border: 1px solid #7a5a1e !important;
    border-radius: 3px !important;
    padding: 0 14px !important;
    height: 40px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    letter-spacing: 0.5px;
    transition: all 0.15s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4) !important;
}

.btn-join-action:hover {
    background: linear-gradient(180deg, #e8b84b 0%, #c9922a 100%) !important;
}

.btn-join-action:active {
    transform: scale(0.97);
    box-shadow: 0 1px 2px rgba(0,0,0,0.4) !important;
}

.divider {
    display: flex;
    align-items: center;
    margin: 6px 0;
    color: #5a4020;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(120,80,20,0.4), transparent);
}

.divider span {
    padding: 0 12px;
    color: #7a5a2a;
}

.lobby-footer {
    margin-top: 0;
    padding: 10px 24px;
    font-size: 0.68rem;
    color: #5a4020;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(120,80,20,0.25);
    background: rgba(0,0,0,0.25);
}

/* 等待房间 */
.waiting-card {
    max-width: 500px;
}

.share-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 8px 0 14px 0;
}

.share-box {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.btn-primary {
    background: linear-gradient(180deg, #c9922a 0%, #8a5e10 100%);
    color: #fff9e6;
    border: 1px solid #7a5a1e;
    border-radius: 3px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #e8b84b 0%, #c9922a 100%);
}

.qr-container {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
}

.qr-container span {
    color: #333;
    font-size: 0.75rem;
    font-weight: 700;
}

.slots-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.player-slot {
    background: linear-gradient(180deg, #1a0e06 0%, #100806 100%);
    border: 1px solid rgba(120,80,20,0.35);
    border-radius: 3px;
    padding: 14px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease;
}

.player-slot.host {
    border-color: rgba(201,146,42,0.65);
    box-shadow: 0 0 12px rgba(201,146,42,0.1);
}

.player-slot .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a1a0a 0%, #1a0e06 100%);
    border: 2px solid rgba(120,80,20,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #a07840;
}

.player-slot.host .avatar {
    background: linear-gradient(145deg, #5a3a0a 0%, #3a2008 100%);
    border-color: rgba(255,215,0,0.45);
    color: #ffd700;
}

.slot-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #d4b87a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    letter-spacing: 0.2px;
}

.slot-status {
    font-size: 0.68rem;
    font-weight: 600;
    color: #5a4020;
    letter-spacing: 0.3px;
}

.slot-status.ready {
    color: #34d399;
}

.waiting-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-secondary {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(120,80,20,0.35);
    color: #8a6830;
    padding: 10px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    border-color: rgba(201,146,42,0.5);
    color: #c9a255;
}

/* 牌桌 (Game Table Layout) */
.game-table {
    flex: 1;
    display: grid;
    grid-template-rows: 90px 1fr 200px;
    grid-template-columns: 140px minmax(0, 1fr) 140px;
    grid-template-areas: 
        "top-left top-center top-right"
        "left-play center-play right-play"
        "self-area self-area self-area";
    padding: 8px 16px 16px 16px;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden !important;
    /* 高纯度清晰细腻绿色赌场绒布布纹质感 (细线版) */
    background-color: #0b3323;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(35, 135, 80, 0.65) 0%, rgba(12, 50, 30, 0.95) 70%, #051a11 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M0 8 L16 8 M8 0 L8 16' stroke='%23ffffff' stroke-width='0.35' stroke-opacity='0.13'/%3E%3Ccircle cx='4' cy='4' r='0.6' fill='%23ffffff' fill-opacity='0.08'/%3E%3Ccircle cx='12' cy='12' r='0.6' fill='%23ffffff' fill-opacity='0.08'/%3E%3C/svg%3E");
    background-size: cover, 16px 16px;
    box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.8);
}

/* 顶中底牌与倍数：整体下移 */
.table-top-center {
    grid-area: top-center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    position: relative;
    z-index: 50;
}

.bottom-cards-box {
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(201,146,42,0.4);
    box-shadow: 0 0 12px rgba(201,146,42,0.08);
    padding: 4px 10px;
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box-title {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #8a6830;
    margin-bottom: 2px;
}

.bottom-cards-cards {
    display: flex;
    gap: 4px;
}

.bottom-cards-cards .card {
    width: 48px !important;
    height: 66px !important;
    border-radius: 3px !important;
    padding: 3px 5px !important;
    margin-right: 0 !important;
    transform: none !important;
    border: 1px solid rgba(0, 0, 0, 0.22) !important;
}

.bottom-cards-cards .card .card-value {
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.bottom-cards-cards .card .card-suit {
    font-size: 0.8rem !important;
    margin-top: 0px !important;
}

.bottom-cards-cards .card .card-center-symbol {
    font-size: 1.25rem !important;
    top: 56% !important;
    left: 56% !important;
    opacity: 0.85 !important;
}

.game-stats-badge {
    display: flex;
    gap: 14px;
    background: #111113;
    padding: 6px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-item .label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.stat-item .value {
    font-family: var(--font-num);
    font-weight: 800;
    color: var(--accent-gold);
    font-size: 1.1rem;
}

/* 左右玩家区域 */
.player-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.left-player {
    grid-area: left-play;
    justify-content: flex-start;
    padding-top: 60px;
}

.right-player {
    grid-area: right-play;
    justify-content: flex-start;
    padding-top: 60px;
}

.player-profile {
    background: linear-gradient(180deg, #1a0e06 0%, #130908 100%);
    border: 1px solid rgba(180,140,50,0.35);
    box-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,215,0,0.05) inset;
    border-radius: 3px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 110px;
}

.avatar-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2a1a0a 0%, #1a0e06 100%);
    border: 2px solid rgba(180,140,50,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #c9a255;
    position: relative;
    transition: all 0.2s ease;
}

/* 轮到该玩家思考/出牌时的头像金光高亮 */
.avatar-box.turn-active {
    border-color: #ffd700 !important;
    background: linear-gradient(145deg, #5a3a0a 0%, #3a2008 100%) !important;
    color: #ffd700 !important;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.25), 0 0 16px rgba(255,215,0,0.3);
}

/* 外围 profile 的黄金呼吸边框 */
.player-profile:has(.avatar-box.turn-active),
.self-profile-mini:has(.avatar-box.turn-active) {
    border-color: rgba(255, 215, 0, 0.7) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.18), 0 2px 12px rgba(0,0,0,0.6);
    animation: profileBreathing 1.5s infinite alternate;
}

@keyframes profileBreathing {
    from { border-color: rgba(201,146,42,0.3); box-shadow: 0 0 6px rgba(201,146,42,0.1), 0 2px 12px rgba(0,0,0,0.6); }
    to   { border-color: rgba(255,215,0,0.8);  box-shadow: 0 0 22px rgba(255,215,0,0.28), 0 2px 12px rgba(0,0,0,0.6); }
}

.player-name-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    justify-content: center;
}

.role-identity-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.role-identity-badge.landlord {
    background: linear-gradient(135deg, #5a3a0a 0%, #3a2008 100%);
    color: #ffd700;
    border: 1px solid rgba(255,215,0,0.4);
    text-shadow: 0 0 8px rgba(255,215,0,0.4);
}

.role-identity-badge.farmer {
    background: linear-gradient(135deg, #072a40 0%, #031726 100%);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    text-shadow: 0 0 6px rgba(56, 189, 248, 0.3);
}

.player-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #d4b87a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.card-count-badge {
    background: rgba(80,40,5,0.6);
    border: 1px solid rgba(180,130,40,0.45);
    color: #e8b84b;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

/* 牌桌中央：出牌展示区与气泡 (自己打出的牌居于牌桌完美正中央) */
.table-center-area {
    grid-area: center-play;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timer-badge {
    position: absolute;
    top: 24px;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-family: var(--font-num);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 10;
}

/* 30s ~ 21s 正常 */
.timer-badge.timer-green {
    background: rgba(10,30,15,0.85);
    border: 1px solid rgba(180,140,50,0.3);
    color: #c9a255;
}

/* 20s ~ 11s 暖黄警示 */
.timer-badge.timer-yellow {
    background: rgba(40,25,5,0.85);
    border: 1px solid rgba(245,158,11,0.5);
    color: #f59e0b;
}

/* 10s ~ 6s 警告红 */
.timer-badge.timer-red {
    background: rgba(50,10,10,0.85);
    border: 1px solid rgba(239,68,68,0.5);
    color: #ef4444;
}

/* ≤ 5s 急促红光闪烁 */
.timer-badge.urgent {
    background: #7a1010;
    border: 1px solid #ef4444;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(239,68,68,0.5);
}

/* 谁在思考出牌/叫地主的中心文本提示条 */
.thinking-status-prompt {
    background: rgba(10,20,12,0.88);
    border: 1px solid rgba(180,140,50,0.3);
    color: #c9a255;
    padding: 6px 18px;
    border-radius: 3px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

/* 自家出牌：从底部手牌区飞出，带弹性回弹 */
@keyframes flyPlaySelf {
    0%   { transform: translateY(52px) scale(0.82) rotate(-2deg); opacity: 0; }
    55%  { transform: translateY(-6px) scale(1.06) rotate(0.5deg); opacity: 1; }
    80%  { transform: translateY(3px) scale(0.98) rotate(0deg); }
    100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

/* 左家出牌：从左上角飞入，带弹性回弹 */
@keyframes flyPlayLeft {
    0%   { transform: translate(-70px, -40px) scale(0.82) rotate(-4deg); opacity: 0; }
    55%  { transform: translate(5px, 3px) scale(1.05) rotate(1deg); opacity: 1; }
    80%  { transform: translate(-2px, -1px) scale(0.98) rotate(0deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
}

/* 右家出牌：从右上角飞入，带弹性回弹 */
@keyframes flyPlayRight {
    0%   { transform: translate(70px, -40px) scale(0.82) rotate(4deg); opacity: 0; }
    55%  { transform: translate(-5px, 3px) scale(1.05) rotate(-1deg); opacity: 1; }
    80%  { transform: translate(2px, -1px) scale(0.98) rotate(0deg); }
    100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
}

.anim-fly-self {
    animation: flyPlaySelf 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-fly-left {
    animation: flyPlayLeft 0.30s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-fly-right {
    animation: flyPlayRight 0.30s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ============================================================
   牌型标注标签 (card-type-label)
   ============================================================ */
@keyframes labelPopIn {
    0%   { transform: translateY(6px) scale(0.7); opacity: 0; }
    60%  { transform: translateY(-3px) scale(1.08); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes labelPopInBomb {
    0%   { transform: scale(0.4) rotate(-8deg); opacity: 0; filter: brightness(3); }
    50%  { transform: scale(1.25) rotate(2deg); opacity: 1; filter: brightness(1.5); }
    80%  { transform: scale(0.94) rotate(-1deg); filter: brightness(1); }
    100% { transform: scale(1) rotate(0); opacity: 1; filter: brightness(1); }
}

.card-type-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px 2px 8px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    pointer-events: none;
    animation: labelPopIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    white-space: nowrap;
    /* 位置：浮于出牌区上方 */
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
}

/* 普通牌型：白色标注 */
.card-type-label.label-normal {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: #e8e8e8;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* 炸弹：橙红色爆炸感 */
.card-type-label.label-bomb {
    background: linear-gradient(135deg, #ff4c1a, #ff8c00);
    border: 1px solid rgba(255,180,50,0.6);
    color: #fff;
    box-shadow: 0 0 16px rgba(255,100,0,0.55), 0 2px 8px rgba(0,0,0,0.4);
    animation: labelPopInBomb 0.40s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    font-size: 0.88rem;
}

/* 火箭：紫金色 */
.card-type-label.label-rocket {
    background: linear-gradient(135deg, #7c3aed, #c084fc);
    border: 1px solid rgba(200,160,255,0.6);
    color: #fff;
    box-shadow: 0 0 20px rgba(150,80,255,0.6), 0 2px 8px rgba(0,0,0,0.4);
    animation: labelPopInBomb 0.44s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    font-size: 0.88rem;
}

/* 顺子/飞机：绿色 */
.card-type-label.label-combo {
    background: linear-gradient(135deg, #059669, #34d399);
    border: 1px solid rgba(100,220,160,0.5);
    color: #fff;
    box-shadow: 0 0 12px rgba(50,200,120,0.4), 0 2px 8px rgba(0,0,0,0.35);
}

/* 对子/三条：蓝色 */
.card-type-label.label-pair {
    background: linear-gradient(135deg, #1d4ed8, #60a5fa);
    border: 1px solid rgba(120,180,255,0.5);
    color: #fff;
    box-shadow: 0 0 10px rgba(80,150,255,0.4), 0 2px 8px rgba(0,0,0,0.35);
}

/* 自家出牌标签：位置更低 */
#playedSelf .card-type-label {
    top: -32px;
}

.played-cards-area {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--card-h);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* 为 card-type-label 绝对定位提供锚点 */
}

/* 最新打出的整手牌外围包裹一圈金色高亮线 */
.played-cards-area.latest-play-container {
    background: rgba(180,140,30,0.05);
    border: 1px solid rgba(201,146,42,0.55) !important;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(201,146,42,0.12);
}

/* 左侧玩家出的牌：向右方移出头像区域，并适度下调 */
#playedLeft {
    position: absolute;
    left: 130px;
    top: 122px;
    justify-content: flex-start;
    z-index: 15;
}

/* 右侧玩家出的牌：向左方移出头像区域，并适度下调 */
#playedRight {
    position: absolute;
    right: 130px;
    top: 122px;
    justify-content: flex-end;
    z-index: 15;
}

/* 我自己打出的牌：保持标准清晰尺寸，下移贴近我方区域 */
#playedSelf {
    transform: translateY(18px);
    max-width: 90%;
}

#playedSelf .card {
    margin-right: -32px;
}

#playedSelf .card:last-child {
    margin-right: 0 !important;
}

/* 别家（左右玩家）打出的牌：微缩尺寸跟底牌一致 */
#playedLeft .card, #playedRight .card {
    width: 48px !important;
    height: 66px !important;
    border-radius: 3px !important;
    padding: 3px 5px !important;
    margin-right: -24px;
    border: 1px solid rgba(0, 0, 0, 0.22) !important;
}

#playedLeft .card:last-child, #playedRight .card:last-child {
    margin-right: 0 !important;
}

#playedLeft .card .card-value, #playedRight .card .card-value {
    font-size: 0.95rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

#playedLeft .card .card-suit, #playedRight .card .card-suit {
    font-size: 0.8rem !important;
    margin-top: 0px !important;
}

#playedLeft .card .card-center-symbol, #playedRight .card .card-center-symbol {
    font-size: 1.25rem !important;
    top: 56% !important;
    left: 56% !important;
    opacity: 0.85 !important;
}

/* 玩家编号徽章（地主=1，下家=2，下下家=3） */
.player-num-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(30,15,3,0.85);
    border: 1px solid rgba(140,100,30,0.5);
    color: #a07840;
    font-size: 0.6rem;
    font-weight: 900;
    font-family: var(--font-num);
    flex-shrink: 0;
    line-height: 1;
}

/* 对话气泡：位于每个人物名片正上方，边界精准锁死防截断 */
.speech-bubble {
    background: rgba(17, 17, 19, 0.96);
    color: #ffffff;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.74rem;
    line-height: 1.4;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
    position: absolute;
    z-index: 60;
    border: 1px solid var(--accent-gold);
    white-space: normal;       /* 允许换行 */
    word-break: break-all;
    max-width: 160px;          /* 足够宽显示长句 */
    animation: popIn 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.left-player .speech-bubble {
    bottom: calc(100% + 6px); /* 占完整高度后向上顶 */
    top: auto;
    left: 0;
    max-width: 160px;
}

.right-player .speech-bubble {
    bottom: calc(100% + 6px);
    top: auto;
    right: 0;
    max-width: 160px;
}

.self-bubble {
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 220px;
}

/* 底部自己手牌区 */
.self-player {
    grid-area: self-area;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    overflow: visible;
}

.controls-bar {
    margin-bottom: 58px; /* 按钮贴近手牌，保留适当的分组出头空间 */
    z-index: 20;
}

/* 同点数牌（对子、三张、炸弹）的分组堆叠感 */
.card.rank-grouped {
    border-top: 3px solid #38bdf8 !important;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-action {
    padding: 7px 18px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid rgba(120,80,20,0.4);
    font-weight: 700;
    font-size: 0.84rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* 出牌 / 叫地主 — 烫金主按钮 */
.btn-action.primary {
    background: linear-gradient(180deg, #c9922a 0%, #8a5e10 100%);
    color: #fff9e6;
    border-color: #7a5a1e;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* 提示 — 暗色次要按钮 */
.btn-action.secondary {
    background: rgba(15,25,15,0.8);
    color: #9aaa8a;
    border-color: rgba(80,100,60,0.4);
}

/* 不出 / 不叫 — 深红危险按钮 */
.btn-action.danger {
    background: rgba(50,10,10,0.75);
    color: #f87171;
    border-color: rgba(180,40,40,0.4);
}

.btn-action.highlight {
    background: linear-gradient(180deg, #e8b84b 0%, #c9922a 100%);
    color: #1a0a00;
    border-color: #c9922a;
}

.btn-action:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.btn-action.primary:hover {
    background: linear-gradient(180deg, #e8b84b 0%, #c9922a 100%);
}

.btn-action:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

.btn-action:disabled, .btn-action.disabled {
    background: rgba(40,40,40,0.6) !important;
    color: #5a5a5a !important;
    border-color: rgba(80,80,80,0.3) !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
}

.self-cards-wrapper {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: visible;
}

.self-profile-mini {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 35px;
    background: linear-gradient(180deg, #1a0e06 0%, #100806 100%);
    border: 1px solid rgba(180,140,50,0.35);
    box-shadow: 0 2px 10px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,215,0,0.04) inset;
    padding: 6px 14px;
    border-radius: 3px;
    z-index: 10;
}

.self-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: #d4b87a;
    letter-spacing: 0.3px;
}

.btn-sort {
    background: rgba(80,40,5,0.5);
    border: 1px solid rgba(180,130,40,0.35);
    color: #a07840;
    padding: 2px 8px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.15s ease;
}

.btn-sort:hover {
    background: rgba(120,70,10,0.6);
    border-color: rgba(201,146,42,0.55);
    color: #c9a255;
}

.hand-cards-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    min-height: calc(var(--card-h) + 110px);
    height: auto;
    padding-top: 90px;
    padding-bottom: 24px;
    overflow: visible !important;
}

/* ==========================================================================
   高清超清晰扑克牌 (High-Contrast High-Visibility Poker Card Component)
   ========================================================================== */

/* 同点数同列垂直出头堆叠 (Column Stacking) */
.card {
    width: var(--card-w);
    height: var(--card-h);
    background: #ffffff !important;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(0, 0, 0, 0.22);
    transform: translateY(var(--stack-y, 0px));
    transform-origin: bottom center;
    flex-shrink: 0;
    overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(calc(var(--stack-y, 0px) - 16px));
    }
}

.card.selected {
    transform: translateY(calc(var(--stack-y, 0px) - 20px)) !important;
    box-shadow: 0 8px 18px rgba(255, 215, 0, 0.45), 0 0 0 1.5px #ffd700 !important;
    border-color: #ffd700 !important;
}

/* 乱序手牌随意堆叠与物理卡牌微倾斜错位 (随意乱放视觉) */
.card.messy-card {
    transform: translateY(calc(var(--stack-y, 0px) + var(--jitter-y, 0px))) rotate(var(--jitter-rot, 0deg));
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.card.messy-card.selected {
    transform: translateY(calc(var(--stack-y, 0px) + var(--jitter-y, 0px) - 20px)) rotate(var(--jitter-rot, 0deg)) !important;
}

/* 牌背样式 */
.card.poker-back {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    border: 2px solid #ffffff !important;
    cursor: default;
}
.card.poker-back::after {
    content: '♠♦';
    position: absolute;
    inset: 3px;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
}

/* 花色与点数渲染 - 极其清晰加粗 */
.card .card-top-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
}

/* 王牌 JOKER 竖排花样 (严格紧贴极左上角，确保卡牌堆叠覆盖时 100% 露头清晰可见) */
.card-top-left.joker-vertical {
    position: absolute;
    top: 3px;
    left: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.82;
    font-family: var(--font-num);
    font-weight: 900;
    font-size: 0.76rem;
    letter-spacing: -0.5px;
    z-index: 10;
}

.card.is-joker.red {
    color: #dc2626 !important;
}

.card.is-joker.black {
    color: #0f172a !important;
}

.card .card-value {
    font-family: var(--font-num);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
}

.card .card-suit {
    font-size: 0.9rem;
    margin-top: 1px;
}

.card .card-center-symbol {
    position: absolute;
    top: 52%;
    left: 54%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    opacity: 0.9;
}

/* 高清晰颜色分类 */
.card.red {
    color: #dc2626 !important; /* 经典极清晰鲜红 */
}
.card.black {
    color: #0f172a !important; /* 经典深黑 */
}
.card.joker-red {
    color: #dc2626 !important;
}
.card.joker-black {
    color: #334155 !important;
}

/* 大小王特殊处理 */
.card.is-joker .card-value {
    font-size: 1.05rem;
    font-weight: 900;
}
.card.is-joker .card-center-symbol {
    font-size: 1.3rem;
    font-weight: 900;
    writing-mode: vertical-rl;
}

/* 结算屏 */
.gameover-card {
    max-width: 460px;
    margin-top: 40px; /* 下移至居中舒适视野 */
}

.gameover-header h2 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.winner-identity {
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 16px;
}

.score-table {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(120,80,20,0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}

.score-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 10px 14px;
    align-items: center;
    border-bottom: 1px solid rgba(100,60,15,0.2);
    font-size: 0.85rem;
}

.score-row.header {
    background: rgba(80,40,5,0.4);
    font-weight: 700;
    color: #8a6830;
    letter-spacing: 0.5px;
}

/* 3秒开局倒计时与炫彩动态进度条弹窗 */
.start-countdown-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #1a0e06 0%, #0e0705 100%);
    border: 1px solid rgba(180,140,50,0.45);
    outline: 3px solid rgba(180,140,50,0.1);
    outline-offset: 3px;
    border-radius: 4px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 40px rgba(120,20,20,0.2);
    z-index: 999;
}

.start-title {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #c9a255;
    margin-bottom: 8px;
    white-space: nowrap;
}

.traffic-light-container {
    display: flex;
    gap: 14px;
    background: rgba(10, 5, 2, 0.85);
    border: 2px solid rgba(180, 140, 50, 0.4);
    padding: 8px 18px;
    border-radius: 20px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.8), 0 4px 12px rgba(0,0,0,0.5);
    margin-top: 4px;
}

.traffic-light {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.6);
}

.traffic-light.red {
    background: #3a0d0d;
    border: 1px solid #5a1515;
}
.traffic-light.red.active {
    background: #ff3b30;
    border-color: #ff6961;
    box-shadow: 0 0 16px #ff3b30, inset 0 1px 3px rgba(255,255,255,0.4);
}

.traffic-light.yellow {
    background: #3a2e0d;
    border: 1px solid #5a4815;
}
.traffic-light.yellow.active {
    background: #ffcc00;
    border-color: #ffd633;
    box-shadow: 0 0 16px #ffcc00, inset 0 1px 3px rgba(255,255,255,0.4);
}

.traffic-light.green {
    background: #0d3a1a;
    border: 1px solid #155a2a;
}
.traffic-light.green.active {
    background: #34c759;
    border-color: #5ce685;
    box-shadow: 0 0 16px #34c759, inset 0 1px 3px rgba(255,255,255,0.4);
}

/* 动态红黄绿数字发光 */
.start-number {
    font-size: 3rem;
    font-weight: 900;
    font-family: var(--font-num);
    margin-bottom: 8px;
    transition: color 0.15s ease, text-shadow 0.15s ease, transform 0.15s ease;
}

.start-number.num-red {
    color: #ff3b30;
    text-shadow: 0 0 24px rgba(255, 59, 48, 0.6);
}
.start-number.num-yellow {
    color: #ffcc00;
    text-shadow: 0 0 24px rgba(255, 204, 0, 0.6);
}
.start-number.num-green {
    color: #34c759;
    text-shadow: 0 0 24px rgba(52, 199, 89, 0.6);
}
.start-number.num-go {
    color: #ffd700;
    text-shadow: 0 0 28px rgba(255, 215, 0, 0.85);
    transform: scale(1.15);
}

.role-badge.landlord {
    background: rgba(255, 215, 0, 0.2);
    color: var(--accent-gold);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.role-badge.farmer {
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.score-row .plus {
    color: #2ecc71;
    font-weight: 800;
    font-family: var(--font-num);
}

.score-row .minus {
    color: #ef4444;
    font-weight: 800;
    font-family: var(--font-num);
}

.gameover-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* 浮动 Toast 通知：居中显示，字号精简 */
.toast-message {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20,10,5,0.95);
    border: 1px solid rgba(201,146,42,0.6);
    color: #f5d98a;
    padding: 7px 16px;
    border-radius: 3px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 20px rgba(120,20,20,0.15);
    z-index: 999;
    font-weight: 700;
    font-size: 0.78rem;
    text-align: center;
    pointer-events: none;
    letter-spacing: 0.3px;
}

/* 胜负顶中结算横幅样式 (取代重型弹窗) */
.victory-banner-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 120;
    pointer-events: auto;
    margin-top: 65px; /* 从偏顶部下移到桌面正中舒适视野区 */
}

.victory-content-wrap {
    position: relative;
    background: linear-gradient(180deg, #241207 0%, #120804 100%);
    border: 1px solid rgba(255, 215, 0, 0.65);
    border-radius: 6px;
    padding: 10px 28px 12px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 10px 36px rgba(0,0,0,0.85), 0 0 25px rgba(255,215,0,0.18);
    animation: popIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 121;
    pointer-events: auto;
}

/* 叉号关闭按钮 (右上角) */
.victory-close-btn {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(40,15,5,0.6);
    border: 1px solid rgba(140,90,20,0.4);
    color: #8a6030;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.victory-close-btn:hover {
    background: rgba(80,20,5,0.8);
    color: #f87171;
    border-color: rgba(220,60,40,0.5);
}

.victory-main-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 2px;
    text-shadow: 0 0 14px rgba(255,215,0,0.5);
    font-family: 'Noto Serif SC', serif;
}

.victory-sub-desc {
    font-size: 0.78rem;
    color: #f5d98a;
    letter-spacing: 0.5px;
    text-align: center;
}

/* 准备投票计数 & 按钮容器 */
.restart-vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
}

.restart-vote-count {
    font-size: 0.7rem;
    color: #a07840;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.restart-vote-count .vote-num {
    font-family: var(--font-num);
    color: #8a6830;
    font-weight: 900;
}
.restart-vote-count .vote-num.active {
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255,215,0,0.4);
}

.btn-restart-round {
    padding: 6px 18px !important;
    font-size: 0.82rem !important;
    margin-top: 2px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 122 !important;
}

.btn-restart-round.voted {
    background: rgba(46, 204, 113, 0.2) !important;
    border-color: rgba(46, 204, 113, 0.5) !important;
    color: #2ecc71 !important;
    cursor: default !important;
}

/* 最小化胜负总结胶囊小条 */
.victory-mini-badge {
    background: linear-gradient(180deg, #241207 0%, #120804 100%);
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    padding: 4px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f5d98a;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.7);
    transition: all 0.2s ease;
    animation: popIn 0.2s ease;
}
.victory-mini-badge:hover {
    border-color: #ffd700;
    color: #ffd700;
    transform: scale(1.04);
}



/* 游戏结束明牌公开展示样式 (手牌多时自动折到第 2 排、第 3 排) */
.open-hand-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: fit-content !important;
    gap: 0 !important;
    justify-content: flex-start !important;
    align-items: center !important;
    background: rgba(10, 15, 25, 0.75) !important;
    border: 1px solid rgba(255, 215, 0, 0.35) !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
    z-index: 25 !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px) !important;
}

.open-hand-card {
    width: 24px !important;
    height: 35px !important;
    padding: 1px 2px !important;
    margin-right: -13px !important;
    margin-bottom: 0 !important;
    box-shadow: -1px 0 3px rgba(0, 0, 0, 0.4) !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

.open-hand-card:last-child {
    margin-right: 0 !important;
}

.open-hand-card .card-value {
    font-size: 0.6rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.open-hand-card .card-suit {
    font-size: 0.45rem !important;
    line-height: 1 !important;
}

.open-hand-card .card-center-symbol {
    font-size: 0.65rem !important;
}

.empty-hand-tag {
    font-size: 0.7rem;
    color: #f59e0b;
    font-weight: 700;
    padding: 2px 4px;
}

/* 快捷用语选择弹出层 */
.quick-phrase-popover {
    position: fixed;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #1a0e06 0%, #0e0705 100%);
    border: 1px solid rgba(180,140,50,0.5);
    border-radius: 3px;
    width: 260px;
    max-width: 88vw;
    box-shadow: 0 10px 30px rgba(0,0,0,0.9), 0 0 20px rgba(120,20,20,0.15);
    z-index: 1000;
    padding: 8px 10px;
    animation: popIn 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.phrase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #c9a255;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(120,80,20,0.35);
    margin-bottom: 6px;
}

.btn-close-phrase {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 6px;
}

.phrase-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.phrase-item {
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(100,60,15,0.3);
    border-radius: 2px;
    padding: 7px 10px;
    font-size: 0.72rem;
    color: #c9a255;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    letter-spacing: 0.2px;
}

.phrase-item:hover, .phrase-item:active {
    background: rgba(80,30,5,0.5);
    border-color: rgba(201,146,42,0.55);
    color: #ffd700;
}

.self-profile-mini {
    cursor: pointer;
}

/* ==========================================================================
   📱 移动端/手机界面重磅专项优化 (Mobile Viewport Optimization)
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        /* 手机端手牌尺寸适度放大 (52px x 74px, 3px 圆角) */
        --card-w: 52px;
        --card-h: 74px;
        --card-radius: 3px;
        --card-overlap: -32px;
    }

    /* ——— 手机端大厅：可滚动 + 全局压缩 ——— */

    /* 大厅遮罩：允许纵向滚动，水平严格居中 */
    .overlay-screen {
        align-items: center !important;
        justify-content: center;
        overflow-y: auto;
        padding: 8px 12px 20px;
        -webkit-overflow-scrolling: touch;
    }

    /* 主卡片与顶部排行榜：保持精质最大宽度，水平绝对居中 */
    .hero-lobby-card, .mini-leaderboard-bar {
        width: 94%;
        max-width: 430px;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* 手机端创建房间/房间等待界面极简优化 */
    .waiting-card-hero {
        padding: 14px 14px !important;
        gap: 10px !important;
        border-radius: 6px !important;
        width: 96% !important;
    }

    .invite-action-card {
        padding: 10px 12px !important;
        border-radius: 4px !important;
    }

    .invite-card-title {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important;
    }

    .share-box-redesign {
        margin-bottom: 0 !important;
        gap: 6px !important;
    }

    .share-box-redesign input {
        padding: 7px 10px !important;
        font-size: 0.76rem !important;
    }

    .btn-copy-gold {
        padding: 0 12px !important;
        font-size: 0.78rem !important;
    }

    /* 手机端隐藏占用屏幕大面积的二维码，保留纯净单行组局链接 */
    .qr-box-toggle {
        display: none !important;
    }

    .slots-grid-redesign {
        gap: 6px !important;
    }

    .player-slot-card {
        padding: 8px 4px !important;
        border-radius: 4px !important;
        gap: 4px !important;
    }

    .slot-badge-crown {
        font-size: 0.6rem !important;
        padding: 1px 5px !important;
    }

    .slot-avatar-emoji {
        font-size: 1.6rem !important;
    }

    .slot-name-text {
        font-size: 0.74rem !important;
    }

    .slot-status-pill {
        font-size: 0.64rem !important;
        padding: 2px 6px !important;
        border-radius: 3px !important;
    }

    .waiting-actions-bar {
        margin-top: 4px !important;
        gap: 8px !important;
    }

    .btn-start-game-gold, .btn-start-ai-sub, .btn-cancel-lobby {
        height: 38px !important;
        font-size: 0.82rem !important;
        border-radius: 4px !important;
    }

    /* 顶部品牌横幅：大幅压缩高度 */
    .lobby-header {
        padding: 12px 16px 10px;
    }

    /* Logo 图标缩小 */
    .brand-logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
        border-radius: 3px;
    }

    /* 品牌标题缩小 */
    .brand-title {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .brand-subtitle {
        font-size: 0.52rem;
        letter-spacing: 1.5px;
    }

    /* 标签行紧凑化 */
    .hero-tags {
        margin-top: 8px;
        gap: 6px;
    }

    .badge-tag {
        font-size: 0.62rem;
        padding: 2px 8px;
    }

    /* 表单区：缩减内边距 */
    .lobby-form {
        padding: 12px 14px;
    }

    .nickname-section {
        margin-bottom: 10px;
    }

    .input-label {
        font-size: 0.62rem;
        margin-bottom: 4px;
    }

    .nickname-input-wrapper input {
        font-size: 0.88rem !important;
        height: 32px !important;
        padding: 6px 0 !important;
    }

    /* 昵称输入行：防止溢出 */
    .nickname-input-wrapper {
        min-width: 0;
        overflow: hidden;
    }

    .nickname-input-wrapper input {
        font-size: 0.88rem !important;
        height: 32px !important;
        padding: 6px 0 !important;
        min-width: 0;
        width: 0;
        flex: 1 1 0;
    }

    .btn-random-nick {
        height: 30px !important;
        font-size: 0 !important;      /* 隐藏文字，只留图标 */
        padding: 0 9px !important;
        flex-shrink: 0;
    }

    /* 只显示图标，隐藏文字文本节点 */
    .btn-random-nick i {
        font-size: 0.78rem;
    }

    /* 加入行：同样防溢出 */
    .join-input-row {
        overflow: hidden;
    }

    .join-input-row input {
        height: 34px !important;
        font-size: 0.85rem !important;
        padding: 7px 8px !important;
        min-width: 0;
        flex: 1 1 0;
    }

    .btn-join-action {
        height: 34px !important;
        font-size: 0.75rem !important;
        padding: 0 10px !important;
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* 功能卡片：更紧凑 */
    .mode-selection {
        gap: 6px;
    }

    .mode-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .card-icon-wrap,
    .card-icon {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .card-title {
        font-size: 0.82rem;
        margin-bottom: 2px;
    }

    .card-desc {
        font-size: 0.65rem;
    }

    /* 加入房间子卡 */
    .join-card {
        padding: 9px 12px !important;
        gap: 7px !important;
    }

    .join-input-row input {
        height: 34px !important;
        font-size: 0.85rem !important;
        padding: 7px 10px !important;
    }

    .btn-join-action {
        height: 34px !important;
        font-size: 0.78rem !important;
        padding: 0 10px !important;
    }

    .divider {
        margin: 4px 0;
        font-size: 0.6rem;
    }

    /* 底部小脚注 */
    .lobby-footer {
        padding: 6px 14px;
        font-size: 0.6rem;
    }
    
    html, body {
        height: 100svh;
        overflow: hidden;
        width: 100%;
    }

    .game-container {
        height: 100svh;
        overflow: hidden;
    }

    .top-nav {
        height: 40px;
        padding: 0 8px;
    }

    .brand span {
        font-size: 0.88rem;
    }

    .badge-free {
        display: none;
    }

    .btn-icon {
        padding: 4px 6px;
        font-size: 0.75rem;
    }

    .room-info {
        gap: 4px;
        padding: 2px 8px;
        border-radius: 14px;
        font-size: 0.7rem;
    }

    .room-info .room-label {
        display: none;
    }

    .room-info .room-code {
        font-size: 0.72rem;
        letter-spacing: 1px;
    }

    .room-info .btn-icon {
        padding: 2px 6px;
        font-size: 0.65rem;
        gap: 3px;
    }

    .room-info .btn-icon span {
        display: none;
    }

    .game-table {
        grid-template-rows: 45px minmax(0, 1fr) minmax(200px, auto);
        grid-template-columns: 84px minmax(0, 1fr) 84px;
        padding: 2px 6px 0 6px;
        height: 100%;
        width: 100vw;
        max-width: 100vw;
        max-height: calc(100svh - 40px);
        box-sizing: border-box;
        overflow: hidden !important;
    }

    .table-center-area {
        justify-content: flex-end;
        padding-bottom: 20px;
    }

    #playedSelf {
        transform: translateY(4px);
    }

    .table-top-center {
        margin-top: 40px;
        justify-content: center;
        align-items: center;
        width: 100%;
        position: relative;
        z-index: 50;
    }

    .timer-badge {
        top: 48px;
        font-size: 0.78rem;
        padding: 3px 10px;
    }

    .bottom-cards-box {
        padding: 2px 6px;
        margin: 0 auto;
    }

    .bottom-cards-cards .card {
        width: 34px !important;
        height: 48px !important;
        padding: 2px 3px !important;
    }

    .bottom-cards-cards .card .card-value {
        font-size: 0.75rem !important;
    }

    .bottom-cards-cards .card .card-suit {
        font-size: 0.6rem !important;
    }

    .bottom-cards-cards .card .card-center-symbol {
        font-size: 0.9rem !important;
    }

    .game-stats-badge {
        padding: 2px 5px;
        gap: 5px;
    }

    .stat-item .label {
        font-size: 0.55rem;
    }

    .stat-item .value {
        font-size: 0.75rem;
    }

    /* 5. 左右玩家头像框：精简缩小并向上移，给中央对局留足视野 */
    .left-player {
        grid-area: left-play;
        justify-content: flex-start;
        padding-top: 35px;
    }

    .right-player {
        grid-area: right-play;
        justify-content: flex-start;
        padding-top: 35px;
    }

    .player-profile {
        width: 74px;
        padding: 4px 3px;
        gap: 3px;
        border-radius: 4px;
    }

    .avatar-box {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .role-identity-badge {
        font-size: 0.58rem;
        padding: 1px 4px;
    }

    .player-name {
        font-size: 0.6rem;
        width: 100%;
    }

    .card-count-badge {
        font-size: 0.54rem;
        padding: 1px 3px;
    }

    /* 手机端精细微型出牌牌型标注胶囊 (Compact Mobile Card Type Badge) */
    .card-type-label {
        font-size: 0.62rem !important;
        padding: 1px 6px !important;
        border-radius: 10px !important;
        gap: 2px !important;
        top: -18px !important;
        letter-spacing: 0px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
    }

    .card-type-label.label-bomb,
    .card-type-label.label-rocket {
        font-size: 0.68rem !important;
        padding: 1px 7px !important;
    }

    #playedSelf .card-type-label {
        top: -20px !important;
    }

    #playedLeft {
        left: 8px !important;
        top: 160px !important;
    }

    #playedRight {
        right: 8px !important;
        top: 160px !important;
    }

    .left-player .speech-bubble {
        top: -26px;
        left: 0;
        font-size: 0.68rem;
        padding: 2px 6px;
        max-width: 120px;
    }

    .right-player .speech-bubble {
        top: -26px;
        right: 0;
        font-size: 0.68rem;
        padding: 2px 6px;
        max-width: 120px;
    }

    #playedLeft .card, #playedRight .card {
        width: 34px !important;
        height: 48px !important;
        padding: 2px 3px !important;
        margin-right: -16px;
    }

    #playedLeft .card .card-value, #playedRight .card .card-value {
        font-size: 0.75rem !important;
    }

    #playedLeft .card .card-suit, #playedRight .card .card-suit {
        font-size: 0.6rem !important;
    }

    #playedLeft .card .card-center-symbol, #playedRight .card .card-center-symbol {
        font-size: 0.9rem !important;
    }

    /* 手机端扑克牌精细微小圆角与字体清晰化 */
    .card {
        padding: 2px 3px;
        border-radius: 2px !important;
        border-width: 1px;
    }

    /* 手机端手牌被选中上移距离适度微缩 (从20px缩小到8px，避免盖住上方出的牌) */
    .card.selected {
        transform: translateY(calc(var(--stack-y, 0px) - 8px)) !important;
        box-shadow: 0 4px 10px rgba(255, 215, 0, 0.45), 0 0 0 1px #ffd700 !important;
    }

    .card.messy-card.selected {
        transform: translateY(calc(var(--stack-y, 0px) + var(--jitter-y, 0px) - 8px)) rotate(var(--jitter-rot, 0deg)) !important;
    }

    /* 手机端手牌点数、花色与图案适度缩小，精细优雅 */
    .card .card-value {
        font-size: 0.8rem !important;
        font-weight: 900;
        line-height: 1;
    }

    .card .card-suit {
        font-size: 0.6rem !important;
        line-height: 1;
    }

    .card .card-center-symbol {
        font-size: 1.1rem !important;
    }

    .card .joker-vertical-label {
        font-size: 0.38rem !important;
        line-height: 0.78 !important;
        margin-left: 1px !important;
        margin-top: 1px !important;
    }

    .card .joker-bottom-graphic {
        width: 26px !important;
        height: 26px !important;
        right: -3px !important;
        bottom: -3px !important;
    }

    .card .joker-bottom-graphic .joker-svg {
        width: 26px !important;
        height: 26px !important;
    }

    /* 手机端自己打出的牌：更清晰优雅显示 (40px x 56px) */
    #playedSelf .card {
        width: 40px !important;
        height: 56px !important;
        padding: 2px 2px !important;
        margin-right: -18px;
    }

    #playedSelf .card:last-child {
        margin-right: 0 !important;
    }

    #playedSelf .card .card-value {
        font-size: 0.84rem !important;
    }

    #playedSelf .card .card-suit {
        font-size: 0.62rem !important;
    }

    #playedSelf .card .card-center-symbol {
        font-size: 1.05rem !important;
    }

    /* 手机端控制按钮组悬浮向上提升，便于操作 */
    .controls-bar {
        margin-bottom: 44px;
        z-index: 20;
    }

    .btn-group {
        gap: 8px;
    }

    .btn-action {
        padding: 6px 14px;
        font-size: 0.78rem;
        border-radius: 4px;
    }

    .self-bubble {
        top: -28px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        padding: 2px 8px;
        max-width: 180px;
    }

    .self-cards-wrapper {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 4px;
        overflow: visible;
        z-index: 15;
    }

    .self-profile-mini {
        position: relative;
        gap: 4px;
        margin-bottom: 16px;
        padding: 3px 8px;
        border-radius: 4px;
    }

    .self-profile-mini .avatar-box {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }

    .self-name {
        font-size: 0.68rem;
    }

    .btn-sort {
        padding: 1px 5px;
        font-size: 0.65rem;
    }

    .hand-cards-container {
        min-height: calc(var(--card-h) + 40px);
        height: auto;
        padding-top: 55px;
        padding-bottom: 4px;
        width: 100%;
        max-width: 100vw;
        overflow: visible !important;
        justify-content: center;
    }
}

/* ============================================================
   大厅公共房间列表 (Public Rooms List Item Styles)
   ============================================================ */
.public-room-item {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(201, 146, 42, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}
.public-room-item:hover {
    border-color: rgba(201, 146, 42, 0.7);
    background: rgba(201, 146, 42, 0.08);
}
.pr-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pr-room-header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pr-room-id {
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffd700;
    font-family: var(--font-num);
    letter-spacing: 1.5px;
}
.pr-phase-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
}
.pr-phase-tag.waiting { background: rgba(52,211,153,0.15); border: 1px solid rgba(52,211,153,0.4); color: #34d399; }
.pr-phase-tag.bidding { background: rgba(251,191,36,0.15); border: 1px solid rgba(251,191,36,0.4); color: #fbbf24; }
.pr-phase-tag.playing { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.4); color: #f87171; }

.pr-players {
    font-size: 0.8rem;
    color: #cbd5e1;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.pr-player-pill {
    background: rgba(255,255,255,0.08);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pr-player-pill.ai { color: #94a3b8; border: 1px stroke rgba(255,255,255,0.1); }
.pr-player-pill.human { color: #fef08a; font-weight: 600; background: rgba(201,146,42,0.18); }

.btn-join-public-room {
    background: linear-gradient(135deg, #c9921a, #e2a820);
    color: #000;
    font-weight: 800;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, background 0.2s ease;
}
.btn-join-public-room:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #ffd700, #f59e0b);
}

/* ============================================================
   顶部用户状态组件 & Auth / 战绩 Modal 样式
   ============================================================ */
.user-header-badge {
    display: none !important;
}
.user-header-badge:hover {
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.5);
}
.user-avatar-text {
    font-size: 1.1rem;
}
.user-header-info {
    display: flex;
    align-items: center;
    gap: 6px;
}
.user-header-nick {
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-header-score {
    font-size: 0.72rem;
    color: #ffd700;
    font-weight: 700;
    white-space: nowrap;
}

/* Auth 选项卡 */
.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    padding: 3px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 215, 0, 0.12);
}
.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 7px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.auth-tab.active {
    background: linear-gradient(135deg, #c9921a, #e2a820);
    color: #000;
}

/* 个人战绩名片 Hero */
.user-profile-hero {
    background: linear-gradient(135deg, rgba(201, 146, 42, 0.15), rgba(0, 0, 0, 0.4));
    border: 1px solid rgba(201, 146, 42, 0.22);
    border-radius: 4px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.profile-top {
    display: flex;
    align-items: center;
    gap: 14px;
}
.profile-avatar-big {
    font-size: 2.4rem;
    background: rgba(0, 0, 0, 0.4);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 215, 0, 0.6);
}
.profile-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-nick {
    font-size: 1.15rem;
    font-weight: 900;
    color: #fff;
}
.profile-email {
    font-size: 0.75rem;
    color: #94a3b8;
}
.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.profile-stat-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    padding: 8px;
    text-align: center;
}
.stat-val {
    font-size: 0.96rem;
    font-weight: 500;
    color: #ffd700;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: 0.3px;
}
.stat-lbl {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* 排行榜 Item */
.lb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 215, 0, 0.15);
}
.lb-rank {
    font-size: 1.1rem;
    font-weight: 900;
    font-family: var(--font-num);
    width: 28px;
}
.lb-rank.top1 { color: #ffd700; }
.lb-rank.top2 { color: #e2e8f0; }
.lb-rank.top3 { color: #b45309; }
.lb-nick {
    font-weight: 700;
    color: #fff;
    flex: 1;
    font-size: 0.88rem;
    padding: 0 10px;
}
.lb-score {
    font-weight: 900;
    color: #ffd700;
    font-family: var(--font-num);
    font-size: 0.95rem;
}

/* 顶部游鲸多游戏大厅切换 Navigation Bar */
.game-switch-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px auto 4px;
    width: 90%;
    max-width: 430px;
}

.game-nav-btn {
    flex: 1;
    background: rgba(15, 10, 8, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
}

.game-nav-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.06);
}

.game-nav-btn.active#btnNavDoudizhu {
    background: linear-gradient(135deg, rgba(201, 146, 42, 0.22) 0%, rgba(20, 10, 5, 0.9) 100%);
    border-color: rgba(201, 146, 42, 0.45);
    color: #ffd700;
    box-shadow: 0 4px 14px rgba(201, 146, 42, 0.15);
}

.game-nav-btn.active#btnNavGomoku {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 29, 21, 0.95) 100%);
    border-color: rgba(52, 211, 153, 0.45);
    color: #34d399;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.nav-new-pill {
    font-size: 0.6rem;
    font-weight: 900;
    background: #10b981;
    color: #000;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

/* 墨绿主调：游鲸五子棋专属 Lobby Card */
.hero-lobby-card.theme-emerald {
    background: linear-gradient(180deg, #07241a 0%, #03140e 100%) !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 30px rgba(16, 185, 129, 0.12) !important;
}

/* 游鲸五子棋专属：经典温润榧木/棋盘木质大厅 Header (左右对齐版) */
.hero-lobby-card.theme-emerald .lobby-header.gomoku-wood-header {
    background: linear-gradient(180deg, #d49c53 0%, #b87b32 60%, #9e6423 100%) !important;
    border-bottom: 2px solid #5a320c !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 10px rgba(0, 0, 0, 0.4) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px 16px 26px !important;
    text-align: left !important;
}

.brand-hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    text-align: left;
    padding-left: 6px; /* 文本稍向右移 */
}

.hero-lobby-card.theme-emerald .brand-title {
    color: #2b1103 !important;
    background: none !important;
    -webkit-text-fill-color: #2b1103 !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35) !important;
    font-size: 1.35rem !important;
    letter-spacing: 1.5px !important;
}

.hero-lobby-card.theme-emerald .brand-subtitle {
    color: #5c300c !important;
    font-weight: 900 !important;
    font-size: 0.64rem !important;
    letter-spacing: 1px !important;
}

.hero-lobby-card.theme-emerald .badge-tag.green {
    background: rgba(43, 17, 3, 0.14) !important;
    border-color: rgba(74, 36, 8, 0.45) !important;
    color: #2b1103 !important;
    font-weight: 800 !important;
    margin-top: 2px;
}

/* 顶部右侧悬浮双子 3D 艺术装饰 (无描边、进一步左移、点击动画) */
.gomoku-stones-decoration {
    position: relative;
    width: 72px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    margin-right: 18px; /* 适度向右微调 */
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.mini-stone {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    position: absolute;
    border: none !important; /* 完全无描边 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 黑子：对角左上方 (无描边，纯自然阴影) */
.mini-stone.black-stone {
    left: -4px;
    top: -2px;
    background: radial-gradient(circle at 35% 35%, #52525b 0%, #18181b 65%, #000000 100%);
    box-shadow: 3px 6px 14px rgba(0, 0, 0, 0.75), inset -2px -2px 5px rgba(0, 0, 0, 0.9);
    z-index: 2;
}

/* 白子：对角右下方 (无描边，纯自然阴影) */
.mini-stone.white-stone {
    right: -4px;
    bottom: -2px;
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f4f4f5 60%, #cbd5e1 100%);
    box-shadow: 3px 6px 14px rgba(0, 0, 0, 0.48), inset -2px -2px 5px rgba(0, 0, 0, 0.18);
    z-index: 1;
}

/* 点击促发一次性爽快弹跳动画 */
.gomoku-stones-decoration.animate .black-stone {
    animation: stoneBounceBlack 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gomoku-stones-decoration.animate .white-stone {
    animation: stoneBounceWhite 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stoneBounceBlack {
    0% { transform: scale(1); }
    40% { transform: translate(-6px, -4px) scale(1.22) rotate(-14deg); box-shadow: 6px 10px 20px rgba(0, 0, 0, 0.85); }
    100% { transform: scale(1); }
}

@keyframes stoneBounceWhite {
    0% { transform: scale(1); }
    40% { transform: translate(6px, 4px) scale(1.22) rotate(14deg); box-shadow: 6px 10px 20px rgba(0, 0, 0, 0.6); }
    100% { transform: scale(1); }
}

.auth-banner-card.emerald-auth {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(0, 0, 0, 0.5));
    border-color: rgba(52, 211, 153, 0.25);
}

.badge-tag.green {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(52, 211, 153, 0.35);
    color: #34d399;
}

.mode-card.primary-card.green-theme {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(6, 29, 21, 0.6) 100%);
    border-color: rgba(52, 211, 153, 0.35);
}

.mode-card.primary-card.green-theme:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 29, 21, 0.8) 100%);
    border-color: rgba(52, 211, 153, 0.55);
}

.btn-auth-action.green {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
}

.btn-join-action.green {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
}

/* 主页顶部简略排行榜横幅 (极简平淡微型流线 Bar，低调融入背景) */
.mini-leaderboard-bar {
    background: rgba(15, 10, 8, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    padding: 3px 10px;
    width: 90%;
    max-width: 430px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 15;
}
.mini-leaderboard-bar:hover {
    background: rgba(25, 18, 14, 0.7);
    border-color: rgba(201, 146, 42, 0.25);
}
.mini-lb-left {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.mini-lb-icon {
    color: #a07840;
    font-size: 0.75rem;
}
.mini-lb-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: #a07840;
    white-space: nowrap;
}
.mini-lb-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.mini-lb-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: marqueeScroll 28s linear infinite;
    will-change: transform;
}
.mini-lb-ticker:hover .mini-lb-track {
    animation-play-state: paused;
}
@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
.mini-lb-ticker .lb-top-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 12px;
    font-size: 0.68rem;
}
.mini-lb-ticker .lb-top-item.is-top3 {
    margin-right: 16px;
}
.mini-lb-ticker .lb-top-name {
    color: #94a3b8;
    font-weight: 500;
}
.mini-lb-ticker .lb-top-score {
    color: #c9921a;
    font-size: 0.68rem;
    font-weight: 600;
}
.mini-lb-more {
    font-size: 0.68rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    white-space: nowrap;
}
.mini-lb-more i {
    font-size: 0.6rem;
    transition: transform 0.15s ease;
}
.mini-leaderboard-bar:hover .mini-lb-more i {
    transform: translateX(2px);
    color: #a07840;
}

/* 大厅专属登录卡片 */
.auth-banner-card {
    background: linear-gradient(135deg, rgba(201, 146, 42, 0.15), rgba(0, 0, 0, 0.45));
    border: 1px solid rgba(201, 146, 42, 0.22);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.auth-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-avatar-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(201, 146, 42, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}
.auth-banner-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.auth-banner-nick {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1f5f9;
}
.auth-banner-sub {
    font-size: 0.72rem;
    font-weight: 700;
    color: #a07840;
    letter-spacing: 0.2px;
}
.auth-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: stretch;
    flex-shrink: 0;
}
.btn-auth-action {
    background: linear-gradient(135deg, #c9921a, #e2a820);
    color: #000;
    font-weight: 800;
    border: none;
    border-radius: 3px;
    padding: 3px 9px;
    font-size: 0.71rem;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    transition: transform 0.15s ease;
}
.btn-auth-action.btn-appearance {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: #ffffff !important;
}
.btn-auth-action:hover {
    transform: scale(1.03);
}

/* ============================================================
   弹窗全局遮罩组件 (Global Modal Overlay & Card Type Modal)
   ============================================================ */
.card-type-modal {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.78) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.card-type-inner {
    background: linear-gradient(180deg, #1f1008 0%, #120904 100%);
    border: 1px solid rgba(201, 146, 42, 0.25);
    border-radius: 4px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.9), 0 0 20px rgba(201, 146, 42, 0.12);
    overflow: hidden;
    color: #fff;
    animation: popIn 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.ct-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(201, 146, 42, 0.18);
}

/* 左上方延伸式 Bar 标签页 */
.ct-header-protruding {
    padding: 8px 14px 0 14px !important;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(201, 146, 42, 0.2);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.protruding-tabs-left {
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.protruding-tab {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    top: 1px;
    user-select: none;
}

.protruding-tab:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
}

.protruding-tab.active {
    background: linear-gradient(180deg, rgba(201, 146, 42, 0.22) 0%, rgba(20, 10, 5, 0.95) 100%);
    border: 1px solid rgba(201, 146, 42, 0.35);
    border-bottom: 1px solid #14070a;
    color: #ffd700;
    font-weight: 800;
    box-shadow: 0 -3px 10px rgba(201, 146, 42, 0.15);
}

.ct-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #ffd700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s ease;
}
.ct-close:hover {
    color: #f87171;
}

.auth-form-body .nickname-input-wrapper {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(201, 146, 42, 0.35);
    border-radius: 6px;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   克制奢华 — 组局等待与好友邀请大厅 (Restrained Luxury Waiting Room)
   ========================================================================== */

.waiting-card-hero {
    background: linear-gradient(180deg, #180c0e 0%, #0e0608 100%);
    border: 1px solid rgba(201, 146, 42, 0.22);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(201, 146, 42, 0.08);
    border-radius: 4px;
    width: 94%;
    max-width: 520px;
    padding: 20px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
    backdrop-filter: blur(12px);
}

.waiting-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(201, 146, 42, 0.18);
    border-radius: 4px;
    padding: 9px 14px;
    font-size: 0.86rem;
}

.room-id-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f1f5f9;
    font-weight: 700;
}

.connected-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-dot.green {
    width: 7px;
    height: 7px;
    background: #e2a820;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(226, 168, 32, 0.5);
}

.invite-action-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(201, 146, 42, 0.18);
    border-radius: 4px;
    padding: 14px 16px;
    text-align: left;
}

.invite-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #e2a820;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
}

.share-box-redesign {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.share-box-redesign input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(201, 146, 42, 0.22);
    border-radius: 3px;
    color: #e2a820;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* 闪耀金光主按钮 (COPY & START 带有光束斜切流光) */
.btn-copy-gold, .btn-start-game-gold {
    background: linear-gradient(135deg, #ffdb4d 0%, #f59e0b 50%, #d97706 100%);
    border: 1px solid #ffe57f;
    color: #2b1100;
    font-weight: 900;
    padding: 0 16px;
    border-radius: 3px;
    font-size: 0.84rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-copy-gold::after, .btn-start-game-gold::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -120%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    animation: goldLightSweep 3.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes goldLightSweep {
    0% {
        left: -120%;
    }
    28%, 100% {
        left: 180%;
    }
}

.btn-copy-gold:hover, .btn-start-game-gold:hover {
    background: linear-gradient(135deg, #ffe066 0%, #fbbf24 50%, #d97706 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    transform: translateY(-1px);
}

.btn-copy-gold:active, .btn-start-game-gold:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.qr-box-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 3px;
}

.qr-canvas-box {
    background: #fff;
    padding: 5px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-canvas-box img, .qr-canvas-box canvas {
    width: 48px !important;
    height: 48px !important;
}

.qr-text {
    font-size: 0.84rem;
    color: #f1f5f9;
    font-weight: 700;
}

/* 玩家席位卡片 克制极简名片风 */
.slots-grid-redesign {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 2px 0;
}

.player-slot-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.player-slot-card:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 146, 42, 0.28);
}

.player-slot-card.host {
    background: rgba(201, 146, 42, 0.08);
    border: 1px solid rgba(201, 146, 42, 0.25);
    box-shadow: 0 4px 16px rgba(201, 146, 42, 0.12);
}

.slot-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(201, 146, 42, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.player-slot-card.host .slot-avatar-circle {
    border-color: rgba(201, 146, 42, 0.5);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 8px rgba(201, 146, 42, 0.2);
}

.slot-name-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.slot-status-pill {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
}

.slot-status-pill.ready {
    color: #e2a820;
    background: rgba(201, 146, 42, 0.1);
    border-color: rgba(201, 146, 42, 0.22);
    font-weight: 700;
}

/* ============================================================
   🟢 游鲸五子棋 沉浸式墨绿棋盘 UI Style
   ============================================================ */
.gomoku-screen-wrap {
    background: linear-gradient(135deg, #061d15 0%, #03140e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    z-index: 1000;
}

.gomoku-screen-wrap.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.gomoku-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* 顶部对局玩家与回合 Header Area */
.gomoku-header-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* 1. 置顶对局状态指示胶囊 */
.gomoku-turn-status.top-status {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(52, 211, 153, 0.45);
    border-radius: 16px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    z-index: 2;
}

/* 2. 玩家 VS 对决 Bar (全屏宽度充分利用) */
.gomoku-header-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(8, 20, 15, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-radius: 12px;
    padding: 8px 12px;
    box-sizing: border-box;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    gap: 10px;
}

/* 中央 VS 标识 */
.gomoku-vs-badge {
    font-size: 0.85rem;
    font-weight: 900;
    font-style: italic;
    color: rgba(52, 211, 153, 0.6);
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3);
    user-select: none;
    flex-shrink: 0;
}

/* 玩家卡片 (宽屏扩展，ID 独立一行完全展示) */
.gomoku-player-pill {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s ease;
    max-width: 46%;
    min-width: 0;
}

.player-pill-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-pill-top.right {
    justify-content: flex-end;
}

/* 轮到落子方的卡片高亮高光 */
.gomoku-player-pill.turn-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(6, 29, 21, 0.7) 100%) !important;
    border-color: rgba(52, 211, 153, 0.6) !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.3) !important;
    transform: scale(1.02);
}

/* 3D 迷你棋子头像 (标准 1:1 相同规格) */
.mini-stone-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.mini-stone-avatar.black {
    background: radial-gradient(circle at 35% 35%, #52525b 0%, #18181b 65%, #000000 100%);
    border: none;
}

.mini-stone-avatar.white {
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f4f4f5 60%, #cbd5e1 100%);
    border: none;
}

/* 玩家 ID / 昵称 (精致字号 0.72rem，去冗余高精简) */
.player-pill-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #f1f5f9;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.player-pill-name.align-right {
    text-align: right;
}

.gomoku-player-pill .p-role {
    font-size: 0.64rem;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
}

/* 15x15 五子棋盘外框 — 经典榧木/红木温润木纹棋盘 */
.gomoku-board-wrapper {
    background-color: #d49c53;
    background-image:
        radial-gradient(ellipse 90% 70% at 50% 50%, #eac285 0%, #ca9046 70%, #995f21 100%),
        repeating-linear-gradient(0deg, rgba(74, 37, 0, 0.03), rgba(74, 37, 0, 0.03) 2px, transparent 2px, transparent 6px);
    border: 7px solid #4a2408;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), inset 0 0 15px rgba(60, 30, 5, 0.5), 0 0 0 2px rgba(255, 215, 0, 0.2);
    position: relative;
}

.gomoku-board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    width: min(calc(100vw - 36px), 340px);
    height: min(calc(100vw - 36px), 340px);
    position: relative;
    user-select: none;
    touch-action: manipulation;
    background: transparent;
}

@media (max-width: 768px) {
    .gomoku-board-wrapper {
        padding: 6px !important;
    }
}

/* PC 桌面大屏专属：棋盘尺寸适度微缩与清晰视野 */
@media (min-width: 768px) {
    .gomoku-container {
        max-width: 600px;
        gap: 16px;
    }

    .gomoku-board-wrapper {
        padding: 16px;
        border-width: 8px;
    }

    .gomoku-board {
        width: 480px;
        height: 480px;
    }

    .gomoku-header-bar {
        padding: 12px 18px;
    }

    .gomoku-player-pill .p-name {
        font-size: 0.95rem;
    }

    .gomoku-player-pill .p-role {
        font-size: 0.78rem;
    }

    .gomoku-turn-status {
        font-size: 0.88rem;
        padding: 6px 14px;
    }

    .btn-gomoku-action {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

/* 交叉格节点 */
.gomoku-cell {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 网格交叉线 (深浓木墨色) */
.gomoku-cell::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(50, 24, 4, 0.85);
    z-index: 1;
}

.gomoku-cell::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(50, 24, 4, 0.85);
    z-index: 1;
}

/* 边缘格线条精确裁剪，止于 15x15 外围交叉点封边 */
.gomoku-cell.col-left::before {
    left: 50% !important;
    width: 50% !important;
}

.gomoku-cell.col-right::before {
    left: 0 !important;
    width: 50% !important;
}

.gomoku-cell.row-top::after {
    top: 50% !important;
    height: 50% !important;
}

.gomoku-cell.row-bottom::after {
    top: 0 !important;
    height: 50% !important;
}

/* 星位点 (4,4), (4,12), (8,8天元), (12,4), (12,12) 交叉圆点 */
.star-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #321402;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
}

/* 棋子 Style (全自然光感，1:1 物理等大规格) */
.gomoku-stone {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84%;
    height: 84%;
    border-radius: 50%;
    z-index: 5;
    border: none !important; /* 彻底无描边 */
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.65);
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: stonePop 0.2s ease;
}

@keyframes stonePop {
    0% { transform: translate(-50%, -50%) scale(0.2); }
    80% { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.gomoku-stone.black {
    background: radial-gradient(circle at 35% 35%, #52525b 0%, #18181b 65%, #000000 100%);
    border: none !important;
}

.gomoku-stone.white {
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f4f4f5 60%, #cbd5e1 100%);
    border: none !important;
}

/* 最近落子指示点 */
.gomoku-stone.last-move::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff2a2a;
    box-shadow: 0 0 6px #ff2a2a;
}

/* 获胜 5 连子闪耀墨绿细描边与光圈效果 (保持原尺寸不缩微) */
.gomoku-stone.win-stone {
    box-sizing: border-box !important;
    border: 1px solid #34d399 !important; /* 精致细墨绿描边 */
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.85), 0 0 6px rgba(16, 185, 129, 0.6) !important;
    animation: winPulse 1.2s infinite alternate ease-in-out;
}

@keyframes winPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.08);
        box-shadow: 0 0 22px rgba(52, 211, 153, 0.95), 0 0 10px rgba(16, 185, 129, 0.8);
    }
}

/* 手机端二次确认落子 静态虚影预选棋子 (100% 精确对齐交叉点) */
.gomoku-stone.preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 84%;
    height: 84%;
    opacity: 0.55;
    pointer-events: none;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* 控制按钮栏 (居中单悔棋按钮，向下挪动) */
.gomoku-actions-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 28px; /* 向下挪动 */
    margin-bottom: 12px;
}

.btn-gomoku-action {
    padding: 9px 24px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.btn-gomoku-action.undo {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 29, 21, 0.9) 100%);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #34d399;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    width: 100%;
    max-width: 220px;
}

.btn-gomoku-action.undo:hover:not(.disabled) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.38) 0%, rgba(6, 29, 21, 0.95) 100%);
    border-color: rgba(52, 211, 153, 0.7);
    color: #6ee7b7;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.btn-gomoku-action.rematch {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid #34d399;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    width: 100%;
    max-width: 220px;
}

.btn-gomoku-action.rematch:hover:not(.disabled) {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.btn-gomoku-action.disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

/* 底部操作栏 极简高级按钮 */
.waiting-actions-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* 【立即开始斗地主】—— 克制金色全宽主按钮 */
.btn-start-game-gold {
    width: 100%;
    height: 42px;
}

/* 【补齐机器人并立即开局】—— 极简暗金次级按钮 */
.btn-start-ai-sub {
    width: 100%;
    height: 42px;
    background: rgba(201, 146, 42, 0.12);
    border: 1px solid rgba(201, 146, 42, 0.28);
    color: #ffd700;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-start-ai-sub:hover {
    transform: translateY(-1px);
    background: rgba(201, 146, 42, 0.2);
    border-color: rgba(201, 146, 42, 0.4);
}

.btn-cancel-lobby {
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel-lobby:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
}

/* 我方 ID 右侧打发时间解闷气球小按钮 (默认10px微型深灰偏黑小点，第1次点击变大到标准24px纯白球，之后逐级变大变红，啪的爆裂重置) */
.btn-boredom-toy {
    position: absolute;
    right: -34px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 10px;
    height: 10px;
    padding: 0;
    font-size: 10px;
    line-height: 1;
    background: radial-gradient(circle at 35% 35%, #475569 0%, #1e293b 60%, #0f172a 100%);
    border: none;
    outline: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: inset -1px -1px 2px rgba(0, 0, 0, 0.5), inset 1px 1px 2px rgba(255, 255, 255, 0.25), 0 1px 4px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 10;
}

.btn-boredom-toy:hover {
    filter: brightness(1.15);
}

.btn-boredom-toy:active {
    filter: brightness(0.9);
}

/* ==========================================================================
   五子棋开局先后手 苹果级奢华微标语 (Apple-Style Luxury Glassmorphism Banner)
   ========================================================================== */
.gomoku-center-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 85;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 20px;
    background: linear-gradient(135deg, rgba(20, 26, 38, 0.85) 0%, rgba(10, 15, 26, 0.92) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    animation: luxuryBannerEnter 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gomoku-center-banner .stone-badge {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.gomoku-center-banner .stone-badge.black {
    background: radial-gradient(circle at 35% 35%, #71717a 0%, #18181b 70%, #000000 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.gomoku-center-banner .stone-badge.white {
    background: radial-gradient(circle at 35% 35%, #ffffff 0%, #e4e4e7 60%, #a1a1aa 100%);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.gomoku-center-banner span {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    white-space: nowrap;
}

.gomoku-center-banner span.black-first {
    background: linear-gradient(135deg, #ffe082 0%, #f59e0b 60%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gomoku-center-banner span.white-second {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 60%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes luxuryBannerEnter {
    0% {
        transform: translate(-50%, -40%) scale(0.92);
        opacity: 0;
        filter: blur(4px);
    }
    18% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    82% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
    100% {
        transform: translate(-50%, -60%) scale(0.96);
        opacity: 0;
        filter: blur(4px);
    }
}

/* ==========================================================================
   五子棋开局 3秒 倒计时后亮起抢先手按键 (居中悬浮于棋盘中央)
   ========================================================================== */
.gomoku-bidding-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 16px rgba(245, 158, 11, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 24px;
    border-radius: 20px;
    animation: zoomInBid 0.25s ease-out;
}

@keyframes zoomInBid {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.btn-gomoku-bid {
    padding: 10px 22px;
    height: 44px;
    border-radius: 12px;
    font-weight: 900;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    white-space: nowrap;
}

/* 3秒倒计时中：灰色未激活禁用态 */
.btn-gomoku-bid.grab-black.disabled-gray {
    background: rgba(71, 85, 105, 0.6) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    opacity: 0.75;
}

/* 3秒倒计时结束：高亮闪耀就绪态 */
.btn-gomoku-bid.grab-black.active-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #000 !important;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.85), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    opacity: 1 !important;
    animation: grabPulse 0.6s infinite alternate ease-in-out;
}

@keyframes grabPulse {
    0% { transform: scale(1); box-shadow: 0 0 16px rgba(245, 158, 11, 0.7); }
    100% { transform: scale(1.06); box-shadow: 0 0 28px rgba(245, 158, 11, 0.95); }
}

.btn-gomoku-bid.grab-black.claimed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6) !important;
}

/* ==========================================================================
   🀄 游鲸麻将 桃木沉香 + 翠绿国粹 专属主题 (Peachwood & Jade Emerald Mahjong Theme)
   ========================================================================== */

/* 🀄 全局深邃帝王墨绿暗金国粹背景 (Deep Imperial Jade Dark Emerald & Gold Diamond Texture) */
body.theme-mahjong,
body.theme-mahjong .game-container,
body.theme-mahjong #lobbyScreen {
    background-color: #031c15 !important;
    background-image:
        radial-gradient(ellipse 85% 65% at 50% 45%, rgba(6, 78, 59, 0.95) 0%, rgba(2, 44, 34, 0.98) 60%, #01140e 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36'%3E%3Cpath d='M18 0 L36 18 L18 36 L0 18 Z' fill='none' stroke='%2334d399' stroke-width='0.75' stroke-opacity='0.2'/%3E%3Cpath d='M18 6 L30 18 L18 30 L6 18 Z' fill='none' stroke='%23ffd700' stroke-width='0.4' stroke-opacity='0.16'/%3E%3Ccircle cx='18' cy='18' r='2' fill='%2334d399' fill-opacity='0.15'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Ccircle cx='2' cy='2' r='0.8' fill='%2334d399' fill-opacity='0.08'/%3E%3Ccircle cx='8' cy='8' r='0.7' fill='%2334d399' fill-opacity='0.07'/%3E%3C/svg%3E") !important;
    background-size: cover, 36px 36px, 12px 12px !important;
}

/* 顶部大厅导航按键 绝对定位右上角 NEW 小角标 (防止换行拉高按键) */
.game-switch-nav .game-nav-btn {
    white-space: nowrap !important;
    position: relative !important;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* 🎮 主大厅 3 大游戏导航按键 对应专属主题颜色高亮 */

/* 1. 游鲸斗地主：经典金灿流光高亮 */
#btnNavDoudizhu.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #0f172a !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.5) !important;
    font-weight: 900 !important;
}

/* 2. 游鲸五子棋：翡翠碧绿主题高亮 */
#btnNavGomoku.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #34d399 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5) !important;
    font-weight: 900 !important;
}

/* 3. 游鲸麻将：明亮通透桃木沉香主题高亮 */
#btnNavMahjong.active {
    background: linear-gradient(135deg, #923a2a 0%, #752a1c 50%, #571f16 100%) !important;
    color: #fffbeb !important;
    border-color: #f59e0b !important;
    box-shadow: 0 4px 18px rgba(146, 58, 42, 0.65), 0 0 14px rgba(245, 158, 11, 0.5) !important;
    font-weight: 900 !important;
}

/* 未激活 hover 效果 */
#btnNavDoudizhu:hover:not(.active) {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
    color: #fef08a !important;
}

#btnNavGomoku:hover:not(.active) {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
    color: #6ee7b7 !important;
}

#btnNavMahjong:hover:not(.active) {
    background: rgba(146, 58, 42, 0.35) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #fef08a !important;
}

.badge-corner-new {
    position: absolute;
    top: -5px;
    right: -2px;
    font-size: 0.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    padding: 1.5px 5px;
    border-radius: 6px 6px 6px 0;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
    line-height: 1;
    pointer-events: none;
    z-index: 10;
}

/* 国粹沉稳翡翠翠绿 (Rich Authentic Mahjong Emerald Green) */
.badge-tag.jade {
    background: rgba(4, 120, 87, 0.22) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.45) !important;
}

.pill-badge.jade {
    background: rgba(4, 120, 87, 0.3) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

.card-icon-wrap.jade {
    background: rgba(4, 120, 87, 0.25) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.btn-join-action.jade, .btn-auth-action.jade {
    background: linear-gradient(135deg, #059669 0%, #047857 60%, #064e3b 100%) !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45) !important;
}

.divider.mahjong-divider span {
    color: #10b981;
}

/* 游鲸麻将 主大厅卡片 醇厚深沉黑檀桃木底衬 */
.lobby-card.theme-mahjong {
    border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 32px rgba(146, 58, 42, 0.25) !important;
    background: linear-gradient(180deg, rgba(28, 10, 7, 0.97) 0%, rgba(18, 6, 4, 0.98) 100%) !important;
}

.mode-card.primary-card.mahjong-theme {
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.18) 0%, rgba(6, 78, 59, 0.3) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    box-shadow: 0 4px 16px rgba(4, 120, 87, 0.2) !important;
}

.mode-card.primary-card.mahjong-theme:hover {
    background: linear-gradient(135deg, rgba(4, 120, 87, 0.3) 0%, rgba(6, 78, 59, 0.45) 100%) !important;
    border-color: rgba(16, 185, 129, 0.7) !important;
    box-shadow: 0 6px 20px rgba(4, 120, 87, 0.35) !important;
    transform: translateY(-2px);
}

.mode-card.join-card.mahjong-join {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.mode-card.ai-card.mahjong-ai {
    background: rgba(4, 120, 87, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.mode-card.ai-card.mahjong-ai:hover {
    background: rgba(4, 120, 87, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    transform: translateY(-2px);
}

/* 明亮暖金桃木色主大厅 Header (富贵金边 + 沉香木纹) */
.lobby-header.peachwood-header {
    background: linear-gradient(135deg, #923a2a 0%, #752a1c 40%, #632419 75%, #42160e 100%) !important;
    border-bottom: 1.5px solid rgba(245, 158, 11, 0.45);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -4px 12px rgba(0, 0, 0, 0.4);
    padding: 16px 20px 16px 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
}

.lobby-header.peachwood-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(45deg, rgba(245, 158, 11, 0.04), rgba(245, 158, 11, 0.04) 2px, transparent 2px, transparent 10px);
    pointer-events: none;
}

/* 麻将主大厅 Header 右侧 3D 实物精细挂饰 (红中/发财/八万 - 靠右对齐) */
.mahjong-tiles-decoration {
    display: flex;
    gap: 8px;
    align-items: center;
    perspective: 800px;
    padding-right: 6px;
    margin-left: auto;
    margin-right: 6px;
    flex-shrink: 0;
}

.master-mahjong-tile {
    width: 34px;
    height: 48px;
    position: relative;
    border-radius: 5px;
    user-select: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    transform: rotateY(-10deg) rotateX(5deg);
}

.master-mahjong-tile.hero-tile {
    transform: rotateY(0deg) scale(1.1);
    z-index: 2;
}

.master-mahjong-tile:hover {
    transform: translateY(-6px) rotateY(0deg) scale(1.15);
    z-index: 5;
}

/* 象牙白正面雕刻牌面 */
.tile-face-ivory {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff 0%, #fdfbf7 70%, #f3eee3 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 5px 5px 3px 3px;
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08),
        0 4px 0 #059669,
        0 8px 18px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

/* 翡翠绿背面衬底厚度层 */
.tile-back-jade {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, #10b981, #047857);
    border-radius: 0 0 4px 4px;
}

/* 文字雕刻字体与雕琢感 */
.char-red-zhong {
    font-size: 1.45rem;
    font-weight: 900;
    color: #dc2626;
    text-shadow: 0 1px 0 #991b1b, 0 0 1px rgba(220, 38, 38, 0.5);
    font-family: 'Kaiti SC', 'STKaiti', 'SimKai', serif;
}

.char-green-fa {
    font-size: 1.45rem;
    font-weight: 900;
    color: #059669;
    text-shadow: 0 1px 0 #047857, 0 0 1px rgba(5, 150, 105, 0.5);
    font-family: 'Kaiti SC', 'STKaiti', 'SimKai', serif;
}

.char-double-wan {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.95;
    font-family: 'Kaiti SC', 'STKaiti', 'SimKai', serif;
}

.char-double-wan .num-red, .char-double-wan .type-red {
    font-size: 0.78rem;
    font-weight: 900;
    color: #dc2626;
    text-shadow: 0 1px 0 #991b1b;
}

/* ==========================================================================
   🀄 游鲸麻将 4人竖屏全景桌台 (Vertical Mobile 4-Player Mahjong Table)
   ========================================================================== */
.mahjong-screen-wrap {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at 50% 45%, #923a2a 0%, #632419 60%, #3d140c 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    padding-top: max(75px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1000;
}

.mahjong-table-vertical-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    box-sizing: border-box;
    overflow: visible;
    padding: 12px 14px;
}

/* 顶部对局状态 Bar (下移 40px，远离屏幕顶沿) */
.mahjong-top-bar {
    width: 100%;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 6px;
    margin-top: 40px;
    flex-shrink: 0;
    z-index: 50;
    box-sizing: border-box;
    overflow: hidden;
}

.mahjong-turn-status.top-status {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(52, 211, 153, 0.5);
    border-radius: 6px;
    padding: 5px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #34d399;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 85%;
}

.btn-mahjong-nav-rematch {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(52, 211, 153, 0.4);
    color: #34d399;
}

/* 自然开阔 3:4 黄金绒面麻将桌台 (微型硬朗圆角 10px) */
.vertical-mahjong-table {
    width: 100%;
    max-width: 460px;
    aspect-ratio: 3 / 4;
    max-height: 75vh;
    max-height: 75dvh;
    margin: auto;
    flex-shrink: 0;
    background: radial-gradient(ellipse 90% 80% at 50% 45%, #059669 0%, #047857 55%, #022c22 100%);
    border: 6px solid #4a150e;
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.75), 0 4px 14px rgba(0, 0, 0, 0.55), inset 0 0 25px rgba(0, 0, 0, 0.65), 0 0 0 1.5px rgba(245, 158, 11, 0.35);
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* 4 人座位及头像名片 (精细 3px 微型直角) */
.seat-user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 3px;
    padding: 3px 10px 3px 4px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    z-index: 10;
}

/* 我方 ID 信息框向上偏移拉开距离 */
.seat-user-pill.bottom-pill {
    margin-bottom: 8px;
    transform: translateY(-8px);
}

/* 左右两侧玩家 ID 90 度旋转纵向排版 (精细 3px 微型直角) */
.seat-user-pill.vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 8px 4px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.seat-user-pill.vertical .player-avatar-badge {
    writing-mode: horizontal-tb;
}

.table-player-seat.seat-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
    gap: 4px;
}

.table-player-seat.seat-left {
    position: absolute;
    left: 4px;
    top: 42%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-player-seat.seat-right {
    position: absolute;
    right: 4px;
    top: 42%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 4px;
}

.table-player-seat.seat-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 0;
    position: absolute;
    bottom: 18px; /* 提升底部离边距离，告别局促沉底 */
    left: 0; right: 0;
    z-index: 20;
}

/* 其他三方盖牌背牌 (3D 翡翠背：小巧精致 + 贴紧排列) */
.standing-tiles-row.top-row {
    display: flex;
    gap: 1px;
}

.standing-tile-top {
    width: 14px;
    height: 20px;
    background: linear-gradient(to bottom, #10b981, #047857);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 1.5px;
    box-shadow: 0 1.5px 0 #022c22;
}

.standing-tiles-col {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.standing-tile-left, .standing-tile-right {
    width: 20px;
    height: 13px;
    background: linear-gradient(to right, #10b981, #047857);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 1.5px;
    box-shadow: 1.5px 0 0 #022c22;
}

/* 4 方弃牌与中央罗盘 (精致规整 6 张一行/一列自动换行) */
.table-center-zone {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mahjong-discards-4p {
    position: absolute;
    width: 100%;
    height: 100%;
}

.discard-grid {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.discard-grid.grid-bottom {
    bottom: -22px; /* 我方出的牌向下方移近，贴近我方 */
    left: 50%;
    transform: translateX(-50%);
    max-width: 108px;
    justify-content: center;
}

.discard-grid.grid-top {
    top: -22px; /* 对家出的牌向上方移近 */
    left: 50%;
    transform: translateX(-50%);
    max-width: 108px;
    justify-content: center;
}

.discard-grid.grid-left {
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 98px;
    max-height: 80px;
    flex-direction: row;
    align-content: flex-start;
    justify-content: flex-start;
}

.discard-grid.grid-right {
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 98px;
    max-height: 80px;
    flex-direction: row-reverse;
    align-content: flex-start;
    justify-content: flex-start;
}

/* 缩减弃牌尺寸：从 20x28 缩小为 15x21，紧凑规整防拥挤 */
.discard-chip {
    width: 15px;
    height: 21px;
    background: #ffffff;
    border-radius: 1.5px;
    box-shadow: 0 1.5px 0 #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.discard-chip .m-face.wan .w-num { font-size: 0.48rem; line-height: 1; }
.discard-chip .m-face.wan .w-char { font-size: 0.42rem; line-height: 1; }
.discard-chip .m-face.honor { font-size: 0.65rem; }
.discard-chip .m-face.honor.baiban .baiban-inner { width: 8px; height: 12px; }
.discard-chip .m-face.bing-1 .rosette { width: 10px; height: 10px; }
.discard-chip .m-face.tiao-1 .sparrow { font-size: 0.65rem; }

.meld-tile {
    width: 22px;
    height: 30px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.meld-tile .m-face.wan .w-num { font-size: 0.68rem; }
.meld-tile .m-face.wan .w-char { font-size: 0.58rem; }
.meld-tile .m-face.honor { font-size: 0.9rem; }

/* 沉底我方 3D 手牌区 (基础通用结构) */
.mahjong-tiles-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding-top: 4px;
    box-sizing: border-box;
}

.mahjong-tile-card {
    flex: 0 0 auto;
    margin: 0;
    background: linear-gradient(145deg, #ffffff 0%, #fffdfa 70%, #f3eee3 100%);
    border-radius: 3.5px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 3.5px 0 #047857, 0 5px 10px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.18s ease;
    box-sizing: border-box;
    overflow: hidden;
}

.mahjong-tile-card:hover, .mahjong-tile-card:active {
    transform: translateY(-12px);
    box-shadow: 0 8px 0 #047857, 0 12px 20px rgba(0, 0, 0, 0.7);
}

/* 🀄 第 1 次点击高亮选中：轻微上移 8px + 保持绿色底座厚度与宽度完全一致 */
.mahjong-tile-card.selected {
    transform: translateY(-8px) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 3.5px 0 #047857, 0 0 10px rgba(245, 158, 11, 0.8), 0 8px 16px rgba(0, 0, 0, 0.6) !important;
    z-index: 20 !important;
}

/* 📱 手机移动端 (max-width: 768px) 独立隔离尺寸：桌台左右加宽 + 上下拉长 */
@media (max-width: 768px) {
    .mahjong-screen-wrap {
        padding: 4px !important;
        padding-top: max(60px, env(safe-area-inset-top)) !important;
    }
    .mahjong-table-vertical-container {
        max-width: 100% !important;
        padding: 4px !important;
    }
    .vertical-mahjong-table {
        max-width: 100% !important;
        width: 98% !important;
        aspect-ratio: 1 / 1.36 !important;
        max-height: 82vh !important;
        max-height: 82dvh !important;
        border-width: 4.5px !important;
        border-radius: 8px !important;
    }
    .mahjong-top-bar {
        margin-top: 24px !important;
        height: 34px !important;
        min-height: 34px !important;
        max-height: 34px !important;
    }
    .mahjong-tiles-bottom {
        gap: 1.5px !important;
    }
    .mahjong-tile-card {
        width: calc((100% - 16px) / 14.2) !important;
        max-width: 28px !important;
        min-width: 18px !important;
        aspect-ratio: 1 / 1.34 !important;
        height: auto !important;
    }
}

/* 🀄 正宗国粹麻将牌面 Style */
.m-face {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 1px;
    font-family: "STKaiti", "KaiTi", "SimKai", "PingFang SC", sans-serif;
    pointer-events: none;
}

/* 1. 万字牌 */
.m-face.wan {
    color: #c92a2a;
    font-weight: 900;
    line-height: 0.92;
}
.m-face.wan .w-num {
    font-size: 0.68rem;
    letter-spacing: -0.5px;
}
.m-face.wan .w-char {
    font-size: 0.58rem;
}

/* 2. 饼/筒牌 */
.m-face.bing {
    display: grid;
    align-items: center;
    justify-items: center;
    width: 82%;
    height: 84%;
}
.m-face.bing-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-face.bing-1 .rosette {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle, #dc2626 0%, #2563eb 45%, #16a34a 75%, #dc2626 100%);
    box-shadow: inset 0 0 2px rgba(0,0,0,0.5), 0 0 2px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-face.bing-1 .rosette-inner {
    width: 5px;
    height: 5px;
    background: #fef08a;
    border-radius: 50%;
}
.m-face.bing .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}
.m-face.bing-2 { grid-template-rows: 1fr 1fr; gap: 2px; }
.m-face.bing-2 .dot { background: #2563eb; }
.m-face.bing-3 { grid-template-columns: 1fr 1fr 1fr; gap: 1px; }
.m-face.bing-3 .dot { background: #2563eb; }
.m-face.bing-3 .d-2 { background: #dc2626; }
.m-face.bing-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; }
.m-face.bing-4 .d-1, .m-face.bing-4 .d-4 { background: #2563eb; }
.m-face.bing-4 .d-2, .m-face.bing-4 .d-3 { background: #16a34a; }
.m-face.bing-5 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; position: relative; }
.m-face.bing-5 .dot { background: #2563eb; }
.m-face.bing-5 .d-3 { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #dc2626; width: 5.5px; height: 5.5px; }
.m-face.bing-6 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 1px; }
.m-face.bing-6 .d-1, .m-face.bing-6 .d-2 { background: #16a34a; }
.m-face.bing-6 .d-3, .m-face.bing-6 .d-4, .m-face.bing-6 .d-5, .m-face.bing-6 .d-6 { background: #dc2626; }
.m-face.bing-7 { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); gap: 1px; }
.m-face.bing-7 .dot { background: #16a34a; }
.m-face.bing-7 .d-1, .m-face.bing-7 .d-2, .m-face.bing-7 .d-3 { background: #dc2626; }
.m-face.bing-8 { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); gap: 1px; }
.m-face.bing-8 .dot { background: #2563eb; }
.m-face.bing-9 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 1px; }
.m-face.bing-9 .d-1, .m-face.bing-9 .d-2, .m-face.bing-9 .d-3 { background: #2563eb; }
.m-face.bing-9 .d-4, .m-face.bing-9 .d-5, .m-face.bing-9 .d-6 { background: #dc2626; }
.m-face.bing-9 .d-7, .m-face.bing-9 .d-8, .m-face.bing-9 .d-9 { background: #16a34a; }

/* 3. 条/索牌 */
.m-face.tiao {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1px 2px;
    width: 84%;
    height: 84%;
}
.m-face.tiao-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-face.tiao-1 .sparrow {
    font-size: 1.05rem;
    line-height: 1;
    color: #15803d !important;
    font-weight: 900;
    filter: invert(30%) sepia(95%) saturate(700%) hue-rotate(95deg) brightness(85%) contrast(125%) drop-shadow(0 1px 1.5px rgba(0,0,0,0.6)) !important;
}
.m-face.tiao .bar {
    width: 2.8px;
    height: 9.5px;
    background: linear-gradient(180deg, #15803d 0%, #166534 100%);
    border-radius: 1px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.4);
}
.m-face.tiao-2 .bar { height: 12px; }
.m-face.tiao-2 .b-1 { background: #15803d; }
.m-face.tiao-2 .b-2 { background: #b91c1c; }
.m-face.tiao-3 .bar { height: 9.5px; }
.m-face.tiao-3 .b-1 { background: #2563eb; }
.m-face.tiao-3 .b-2 { background: #15803d; }
.m-face.tiao-3 .b-3 { background: #b91c1c; }
.m-face.tiao-4 .bar, .m-face.tiao-5 .bar, .m-face.tiao-6 .bar, .m-face.tiao-7 .bar, .m-face.tiao-8 .bar, .m-face.tiao-9 .bar {
    height: 8px;
    width: 2.5px;
}
.m-face.tiao-5 .b-3 { background: #b91c1c; }

/* 4. 字牌 (红中、发财、白板、风牌) */
.m-face.honor {
    font-size: 0.88rem;
    font-weight: 900;
}
.m-face.honor.red-zhong {
    color: #dc2626;
    text-shadow: 0 1px 2px rgba(185, 28, 28, 0.3);
}
.m-face.honor.green-fa {
    color: #15803d;
    text-shadow: 0 1px 2px rgba(21, 128, 61, 0.3);
}
.m-face.honor.baiban {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.m-face.honor.baiban .baiban-inner {
    width: 12px;
    height: 17px;
    border: 1.5px solid #1d4ed8;
    border-radius: 2px;
    background: transparent;
    box-shadow: inset 0 0 0 1px #60a5fa;
}
.m-face.honor.wind {
    color: #1e3a8a;
    font-size: 0.82rem;
}

/* 3D 出牌飞行动画 (Tile Throwing Animation) */
.throwing-mahjong-tile {
    position: absolute;
    width: 36px;
    height: 52px;
    background: linear-gradient(145deg, #ffffff, #f3eee3);
    border: 1.5px solid #34d399;
    border-radius: 5px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(52, 211, 153, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: #0f172a;
    z-index: 100;
    animation: tileThrowAnim 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.throwing-mahjong-tile.player-0 { top: 75%; left: 50%; }
.throwing-mahjong-tile.player-1 { top: 45%; left: 80%; }
.throwing-mahjong-tile.player-2 { top: 15%; left: 50%; }
.throwing-mahjong-tile.player-3 { top: 45%; left: 20%; }

@keyframes tileThrowAnim {
    0% {
        transform: translate(-50%, -50%) scale(1.4) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.7) rotate(360deg);
        opacity: 0;
    }
}

/* ==========================================================================
   💻 PC / 桌面端自适应大号正方形雀神桌台 (PC Desktop Large Square Table)
   ========================================================================== */
@media (min-width: 769px) {
    .mahjong-table-vertical-container {
        max-width: 680px !important;
    }

    .vertical-mahjong-table {
        max-width: 600px !important;
        aspect-ratio: 1 / 1 !important;
        max-height: 78vh !important;
        max-height: 78dvh !important;
        border: 10px solid #4a150e !important;
        border-radius: 22px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), inset 0 0 35px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(245, 158, 11, 0.35) !important;
    }

    /* PC 端左右两侧 ID 保持 90 度纵向旋转排版 */
    .table-player-seat.seat-left {
        left: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        flex-direction: row !important;
        gap: 6px !important;
    }

    .table-player-seat.seat-right {
        right: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        flex-direction: row-reverse !important;
        gap: 6px !important;
    }

    .mahjong-tile-card {
        width: 36px !important;
        height: 54px !important;
        font-size: 1.05rem !important;
    }
}

/* ==========================================================================
   🀄 游鲸麻将 拟真升级样式 (Wall Counter, Dealer Tag, Action Toast, Melds, Settlement)
   ========================================================================== */

/* 1. 顶部剩余牌墙计数器 */
.mahjong-wall-badge {
    background: rgba(4, 120, 87, 0.45);
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: #a7f3d0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* 2. 庄家金色标签 */
.dealer-tag {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-left: 2px;
}

/* 📱 手机移动端：两侧纵向 ID 栏中的庄标旋转 90 度，保持纵向规整防撑宽 */
@media (max-width: 768px) {
    .seat-user-pill.vertical .dealer-tag {
        writing-mode: horizontal-tb;
        transform: rotate(90deg);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 4px auto 2px auto;
        padding: 2px 4px;
    }
}

/* 3. 吃牌动作按钮 */
.btn-mahjong-act.act-chow {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border-color: #34d399 !important;
    color: #ecfdf5 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.5), 0 0 0 2px rgba(52, 211, 153, 0.3) !important;
}

.btn-mahjong-act.act-chow:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.7) !important;
}

/* 4. 国风金光动作大字报特效 (吃/碰/杠/胡 动画) */
.mahjong-action-toast-banner {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
}

.action-toast-inner {
    font-family: 'STKaiti', 'KaiTi', 'SimKai', serif, sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: #fef08a;
    text-shadow: 0 0 10px #f59e0b, 0 0 20px #d97706, 0 0 40px #b45309, 2px 2px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 2px;
    animation: actionToastAnim 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes actionToastAnim {
    0% {
        transform: scale(0.2) rotate(-15deg);
        opacity: 0;
    }
    40% {
        transform: scale(1.3) rotate(0deg);
        opacity: 1;
    }
    70% {
        transform: scale(1.0);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* 5. 最新弃牌红点高亮与光晕指示 */
.discard-chip.latest-discard {
    background: #fef08a !important;
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 10px #ef4444, 0 0 20px rgba(239, 68, 68, 0.6) !important;
    transform: scale(1.1);
    z-index: 5;
    animation: latestPulse 1.2s infinite alternate;
}

@keyframes latestPulse {
    0% { box-shadow: 0 0 6px #ef4444; }
    100% { box-shadow: 0 0 16px #ef4444, 0 0 24px rgba(239, 68, 68, 0.8); }
}

/* 6. 吃碰杠牌堆 (Melds display) */
.melds-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.melds-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.meld-group {
    display: flex;
    gap: 1px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 3px;
    padding: 2px;
}

.meld-tile {
    padding: 2px 4px;
    background: #ffffff;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: 900;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* 7. 吃牌搭子选择弹窗列表 */
.chow-options-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chow-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #064e3b 0%, #047857 100%);
    border: 1px solid #34d399;
    border-radius: 8px;
    padding: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chow-option-btn:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.4);
}

/* 8. 麻将胡牌奢华结算面板 (Settlement Modal) */
.settlement-inner {
    max-width: 440px !important;
    background: linear-gradient(180deg, #064e3b 0%, #022c22 100%) !important;
    border: 2px solid #34d399 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(52, 211, 153, 0.3) !important;
    border-radius: 16px !important;
    overflow: hidden;
    color: #fff;
}

.settlement-header {
    text-align: center;
    padding: 20px 16px 12px;
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
}

.settlement-icon {
    font-size: 2.8rem;
    margin-bottom: 4px;
    animation: bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.settlement-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fef08a;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.settlement-subtitle {
    font-size: 0.85rem;
    color: #a7f3d0;
    margin-top: 4px;
}

.settlement-body {
    padding: 12px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fan-details-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px dashed rgba(52, 211, 153, 0.4);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.fan-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 900;
    padding: 4px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    margin-bottom: 8px;
}

.fan-list {
    font-size: 0.82rem;
    color: #cbd5e1;
}

.scores-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 10px;
}

.score-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    padding: 4px 6px;
}

.score-row-item .p-diff.positive {
    color: #4ade80;
    font-weight: 900;
}

.score-row-item .p-diff.negative {
    color: #f87171;
    font-weight: 800;
}

.settlement-actions {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.btn-settle-primary {
    flex: 1;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    padding: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-settle-primary:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-settle-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 18px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-settle-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   💻 PC 大屏桌面端 (min-width: 769px) 4:3 宽屏高奢麻将桌台全景重构
   ========================================================================== */
@media (min-width: 769px) {
    .mahjong-table-vertical-container {
        max-width: 1060px !important;
        width: 95vw !important;
    }

    /* 4:3 阔气豪华绿绒桌台 (比例全面放大) */
    .vertical-mahjong-table {
        max-width: 940px !important;
        aspect-ratio: 4 / 3 !important;
        max-height: 82vh !important;
        max-height: 82dvh !important;
        border: 12px solid #4a150e !important;
        border-radius: 14px !important;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.95), inset 0 0 45px rgba(0, 0, 0, 0.75), 0 0 0 3px rgba(245, 158, 11, 0.35) !important;
    }

    /* PC 端 4 方名片尺寸适度放大 (精细 3px 微型直角) */
    .seat-user-pill {
        font-size: 0.85rem !important;
        padding: 5px 14px 5px 6px !important;
        border-radius: 3px !important;
    }

    /* PC 端 4 方立牌盖牌 (北家/东家/西家) 放大 */
    .standing-tile-top {
        width: 18px !important;
        height: 26px !important;
    }
    .standing-tile-left, .standing-tile-right {
        width: 26px !important;
        height: 18px !important;
    }

    /* PC 端中央 4 方弃牌桌中区 & 弃牌放大 */
    .table-center-zone {
        width: 320px !important;
        height: 320px !important;
    }

    .discard-grid.grid-bottom { max-width: 156px !important; bottom: -30px !important; }
    .discard-grid.grid-top { max-width: 156px !important; top: -30px !important; }
    .discard-grid.grid-left { max-width: 140px !important; max-height: 120px !important; }
    .discard-grid.grid-right { max-width: 140px !important; max-height: 120px !important; }

    .discard-chip {
        width: 22px !important;
        height: 30px !important;
        border-radius: 2.5px !important;
    }
    .discard-chip .m-face.wan .w-num { font-size: 0.65rem !important; }
    .discard-chip .m-face.wan .w-char { font-size: 0.55rem !important; }
    .discard-chip .m-face.honor { font-size: 0.9rem !important; }
    .discard-chip .m-face.bing-1 .rosette { width: 14px !important; height: 14px !important; }
    .discard-chip .m-face.tiao-1 .sparrow { font-size: 0.95rem !important; }

    /* PC 端中央 3D 局风罗盘放大 */
    .mahjong-compass-center {
        width: 86px !important;
        height: 86px !important;
    }
    .compass-wind {
        font-size: 0.95rem !important;
        width: 22px !important;
        height: 22px !important;
    }
    .compass-timer {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.9rem !important;
    }

    /* PC 端我方沉底手牌：44px 宽 x 60px 高 (清晰大号霸气牌面) */
    .mahjong-tiles-bottom {
        gap: 3.5px !important;
    }

    .mahjong-tile-card {
        width: 44px !important;
        height: 60px !important;
        max-width: none !important;
        min-width: 0 !important;
        aspect-ratio: auto !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        border-radius: 5px !important;
        box-shadow: 0 5.5px 0 #047857, 0 10px 18px rgba(0, 0, 0, 0.6) !important;
    }

    .mahjong-tile-card .m-face.wan .w-num { font-size: 1.15rem !important; }
    .mahjong-tile-card .m-face.wan .w-char { font-size: 0.95rem !important; }
    .mahjong-tile-card .m-face.honor { font-size: 1.5rem !important; }
    .mahjong-tile-card .m-face.honor.baiban .baiban-inner { width: 20px !important; height: 30px !important; }
    .mahjong-tile-card .m-face.bing-1 .rosette { width: 24px !important; height: 24px !important; }
    .mahjong-tile-card .m-face.bing .dot { width: 8px !important; height: 8px !important; }
    .mahjong-tile-card .m-face.tiao-1 .sparrow { font-size: 1.6rem !important; }
    .mahjong-tile-card .m-face.tiao .bar { width: 4.5px !important; height: 15px !important; }
}

/* ==========================================================================
   🀄 极奢国风 3D 沉香木黄铜八卦风盘 (High-Luxury Traditional Mahjong Center Compass)
   遵从国粹大众麻将物理风位规则：坐南朝北 (南在下、东在右、北在上、西在左)
   ========================================================================== */
.mahjong-compass-center {
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #2d1810 0%, #170b07 65%, #080402 100%);
    border: 2.5px solid #d97706;
    box-shadow: 0 0 0 1.5px #fef08a, 0 8px 24px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(245, 158, 11, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    pointer-events: none;
    box-sizing: border-box;
}

.mahjong-compass-center::before {
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border-radius: 50%;
    border: 1px dashed rgba(245, 158, 11, 0.45);
    pointer-events: none;
}

/* 4 方风位 (东、南、西、北) 极奢金字与精准文本中心缩放 */
.compass-wind {
    position: absolute;
    font-family: "STKaiti", "KaiTi", "SimKai", serif, sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    color: #94a3b8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    transition: color 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    transform-origin: center center;
}

.compass-wind.wind-n { top: 3px; left: 50%; transform: translateX(-50%); }
.compass-wind.wind-s { bottom: 3px; left: 50%; transform: translateX(-50%); }
.compass-wind.wind-w { left: 3px; top: 50%; transform: translateY(-50%); }
.compass-wind.wind-e { right: 3px; top: 50%; transform: translateY(-50%); }

/* 轮到该方出牌时：以字符中心极速等比放大 + 金光呼吸 (完美修正偏偏移位) */
.compass-wind.wind-n.active { color: #fef08a !important; text-shadow: 0 0 8px #f59e0b, 0 0 16px #d97706 !important; animation: windPulseN 1.2s infinite alternate ease-in-out; }
.compass-wind.wind-s.active { color: #fef08a !important; text-shadow: 0 0 8px #f59e0b, 0 0 16px #d97706 !important; animation: windPulseS 1.2s infinite alternate ease-in-out; }
.compass-wind.wind-w.active { color: #fef08a !important; text-shadow: 0 0 8px #f59e0b, 0 0 16px #d97706 !important; animation: windPulseW 1.2s infinite alternate ease-in-out; }
.compass-wind.wind-e.active { color: #fef08a !important; text-shadow: 0 0 8px #f59e0b, 0 0 16px #d97706 !important; animation: windPulseE 1.2s infinite alternate ease-in-out; }

@keyframes windPulseN {
    0% { transform: translateX(-50%) scale(1.0); }
    100% { transform: translateX(-50%) scale(1.25); filter: drop-shadow(0 0 5px #fbbf24); }
}

@keyframes windPulseS {
    0% { transform: translateX(-50%) scale(1.0); }
    100% { transform: translateX(-50%) scale(1.25); filter: drop-shadow(0 0 5px #fbbf24); }
}

@keyframes windPulseW {
    0% { transform: translateY(-50%) scale(1.0); }
    100% { transform: translateY(-50%) scale(1.25); filter: drop-shadow(0 0 5px #fbbf24); }
}

@keyframes windPulseE {
    0% { transform: translateY(-50%) scale(1.0); }
    100% { transform: translateY(-50%) scale(1.25); filter: drop-shadow(0 0 5px #fbbf24); }
}

/* 中央 15s 倒计时器 / 缩小绿圈并留出充裕空隙 */
.compass-timer {
    font-size: 0.74rem;
    font-weight: 900;
    font-family: 'Outfit', 'Inter', monospace, sans-serif;
    color: #fef08a;
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
    background: radial-gradient(circle, #059669 0%, #047857 70%, #022c22 100%);
    border: 1px solid rgba(52, 211, 153, 0.65);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4), 0 2px 5px rgba(0,0,0,0.6);
}





