:root {
    --bg-color: #1a1a1a;
    --dragon-color: #e74c3c;
    --tiger-color: #3498db;
    --tie-color: #2ecc71;
    --gold-color: #f1c40f;
}

body {
    background-color: var(--bg-color);
    color: #fff;
    font-family: 'Helvetica Neue', Helvetica, sans-serif;
    margin: 0;
    /* 🔴 修改这里： */
    height: 100vh;       /* 兼容旧浏览器 */
    height: 100dvh;      /* 关键！使用动态视口高度，自动减去浏览器工具栏 */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* === 顶部战场 === */
/* style.css */

/* === 顶部战场 === */
#arena {
    flex: 2;
    display: flex;
    
    /* 🔴 [删除] justify-content: space-around; */
    /* 🟢 [新增] 改为居中，并用 gap 控制间距 */
    justify-content: center; 
    gap: 30px; /* 龙和虎之间的固定距离，你可以调整这个数字 */
    
    align-items: center;
    background: radial-gradient(circle at center, #2c3e50 0%, #000 120%);
    position: relative;
    border-bottom: 1px solid #333;
    
    /* 🟢 [新增] 左右留出安全距离，防止贴边 */
    padding: 0 10px; 
}


.card-placeholder {
    width: 90px;
    height: 126px;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 6px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zone-label {
    position: absolute;
    bottom: -30px;
    font-size: 18px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
.label-dragon { color: var(--dragon-color); }
.label-tiger { color: var(--tiger-color); }

.vs-logic {
    font-size: 30px;
    font-style: italic;
    font-weight: 900;
    color: #fff;
    opacity: 0.2;
}

#result-overlay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(0,0,0,0.9);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 100;
}

/* === 中部下注盘 === */
#betting-board {
    flex: 3;
    display: grid;
    grid-template-columns: 1fr 0.6fr 1fr;
    gap: 8px;
    padding: 10px;
    background-color: #222;
}

.bet-zone {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.1s;
}
.bet-zone:active { transform: scale(0.98); }

.zone-dragon { background: linear-gradient(135deg, #4a1c1c, #2c0b0b); color: var(--dragon-color); }
.zone-tiger  { background: linear-gradient(135deg, #152c3c, #0b1a2c); color: var(--tiger-color); }
.zone-tie    { background: linear-gradient(135deg, #163321, #0a1f12); color: var(--tie-color); }

.zone-title { font-weight: 900; font-size: 16px; margin-bottom: 4px; }
.odds { font-size: 12px; opacity: 0.6; }
.bet-amount { 
    margin-top: 10px; font-size: 18px; color: #fff; 
    text-shadow: 0 1px 2px #000;
}

/* === 底部控制台 === */
#controls {
    /* 🔴 新增这行：禁止被挤压，保证按钮区域的高度 */
    flex-shrink: 0; 
    
    background-color: #111;
    padding: 10px;
    
    /* 🔴 新增这几行：适配 iPhone X 等全面屏底部的横条 */
    flex: 1.8;
    background-color: #111;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

#hud {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #888;
    margin-bottom: 8px;
}
.balance { color: var(--gold-color); font-family: monospace; font-size: 16px; }

#roadmap {
    height: 24px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin-bottom: 10px;
    align-items: center;
}
.bead {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    font-size: 10px; line-height: 16px; text-align: center; color: #fff;
}
.bead.d { background: var(--dragon-color); }
.bead.t { background: var(--tiger-color); }
.bead.tie { background: var(--tie-color); }

#chips-rack {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}
/* style.css - 筹码样式更新 */

/* =========================================
   🎰 真实质感筹码 (Universal Realistic Chips)
   适用范围: Dragon Tiger & BTC Entropy
========================================= */

/* 筹码架布局 */
.chip-rack {
    display: flex; 
    justify-content: center; 
    gap: 12px;
    margin-bottom: 25px;
    padding: 10px; /* 给阴影留出空间 */
}

/* 筹码物理模型 */
.chip {
    position: relative;
    width: 48px; height: 48px; /* 稍微大一点点，手感更好 */
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    
    font-family: 'Roboto', sans-serif;
    font-weight: 900; 
    font-size: 13px;
    color: #222; /* 内圈文字颜色 */
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 弹性动画 */
    
    border: none;
    background: none; 
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
}

/* 选中状态：悬浮 + 强投影 */
.chip.selected {
    transform: translateY(-10px) scale(1.1);
    z-index: 10;
}

/* 🎨 纹理层1: 边缘花纹 (Edge Spots) */
.chip::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    z-index: -2;
    
    /* 默认花纹逻辑: 主色 vs 条纹色 */
    background: repeating-conic-gradient(
        var(--chip-main) 0deg 36deg,
        var(--chip-spot) 36deg 45deg
    );
    
    /* 3D光影: 顶部高光 + 底部阴影 + 桌面投影 */
    box-shadow: 
        inset 0 2px 3px rgba(255,255,255,0.3),
        inset 0 -2px 3px rgba(0,0,0,0.4),
        0 4px 6px rgba(0,0,0,0.4);
}

/* 选中时的投影变化 */
.chip.selected::before {
    box-shadow: 
        inset 0 2px 3px rgba(255,255,255,0.4),
        inset 0 -2px 3px rgba(0,0,0,0.5),
        0 15px 25px rgba(0,0,0,0.5);
}

/* 🎨 纹理层2: 陶瓷嵌体 (Inlay) */
.chip::after {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px; /* 控制内圈大小 */
    border-radius: 50%;
    z-index: -1;
    
    background: #f4f4f4; /* 米白底 */
    border: 1px solid rgba(0,0,0,0.1);
    
    /* 内凹阴影 + 极细的主色描边 */
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.2),
        0 0 0 2px var(--chip-main) inset;
}

/* =========================================
   🎨 标准配色 (Standard Color Scheme)
   10:蓝 | 50:绿 | 100:黑 | 500:紫
========================================= */

/* 🔵 10 - 蓝色 (Blue) */
.chip-10 {
    --chip-main: #2980b9; 
    --chip-spot: #ecf0f1; 
}

/* 🟢 50 - 绿色 (Green) */
.chip-50 {
    --chip-main: #27ae60; 
    --chip-spot: #f1c40f; /* 绿配金 */
}

/* ⚫ 100 - 黑色 (Black) */
.chip-100 {
    --chip-main: #2c3e50; 
    --chip-spot: #95a5a6; 
}
/* 100的花纹更细密 */
.chip-100::before {
    background: repeating-conic-gradient(
        var(--chip-main) 0deg 22.5deg,
        var(--chip-spot) 22.5deg 30deg
    );
}

/* 🟣 500 - 紫色 (Purple) */
.chip-500 {
    --chip-main: #8e44ad; 
    --chip-spot: #f1c40f; 
}
.chip-500::after { background: #fcf3cf; } /* 淡金内圈 */

/* 🟡 ALL - 黑金 (梭哈) */
.chip-all {
    --chip-main: #111;
    --chip-spot: #f39c12;
    color: #c0392b; /* 红色文字示警 */
}
/* 更加狂野的花纹 */
.chip-all::before {
    background: repeating-conic-gradient(
        var(--chip-main) 0deg 60deg,
        var(--chip-spot) 60deg 90deg
    );
}
.chip-all::after {
    background: #f9e79f; /* 金色内圈 */
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}


#btn-deal {
    width: 100%;
    height: 50px;
    background: linear-gradient(to right, #e67e22, #d35400);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    box-shadow: 0 4px 10px rgba(211, 84, 0, 0.4);
}
#btn-deal:active { transform: scale(0.98); background: #d35400; }
#btn-deal:disabled { background: #444; color: #888; box-shadow: none; }

/* === 动态生成的扑克牌 === */
.card {
    width: 90px; height: 126px;
    background: #fff; border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: absolute;
    display: flex; justify-content: center; align-items: center;
    font-family: 'Courier New', monospace;
    z-index: 10;
    /* 初始状态：居中且不可见 */
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
    transition: all 0.83s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card.revealed { opacity: 1; transform: translate(0, 0) scale(1); } /* 动画终点 */

.card.red { color: #c0392b; }
.card.black { color: #2c3e50; }
.corner { position: absolute; font-size: 14px; line-height: 1; display: flex; flex-direction: column; align-items: center; }
.top-left { top: 6px; left: 6px; }
.bottom-right { bottom: 6px; right: 6px; transform: rotate(180deg); }
.center-suit { font-size: 42px; }


/* style.css */

/* 小数部分样式：灰色、稍微小一点 */
.decimal-part {
    color: rgba(255, 255, 255, 0.4); /* 半透明白，或者 #666 */
    font-size: 0.85em; /* 稍微缩小 */
    font-weight: normal;
}

/* 赢钱提示里的硬币符号 */
.coin-symbol {
    color: #f1c40f;
    margin-right: 2px;
}


