/* game/bj21/style.css - BTC Royal Clone Edition */

:root {
    /* 🟣 核心：BTC Royal 同款紫 */
    --bg-core: #2b0e45;  /* 中心的亮紫 */
    --bg-deep: #0f0518;  /* 边缘的深紫 */
    
    --gold: #ffd700;
    --gold-glow: #ffaa00;
    --border-color: rgba(138, 43, 226, 0.3); /* 霓虹紫边框 */
    
    /* 📉 筹码瘦身 */
    --chip-size: 45px; 
    
    --font-main: 'Roboto', sans-serif;
}

body {
    margin: 0;
    /* 🔴 改动：调整径向渐变的位置和颜色，模拟顶光 */
    background: radial-gradient(circle at 50% 10%, var(--bg-core), var(--bg-deep) 80%);
    color: #fff;
    font-family: var(--font-main);
    height: 100dvh;
    display: flex; flex-direction: column; overflow: hidden;
    user-select: none; -webkit-tap-highlight-color: transparent;
}

/* --- 顶部 --- */
.top-bar {
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
    /* 移除背景色，让它悬浮 */
    background: transparent; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0; z-index: 10;
}
.brand {
    font-size: 1.2rem; color: #fff; font-weight: 900; letter-spacing: 1px;
    font-style: italic;
    /* 模拟 BTC 标题的渐变字 */
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.wallet-capsule {
    /* BTC同款胶囊：深色底 + 金边 */
    background: rgba(0,0,0,0.4); 
    border: 1px solid var(--gold);
    border-radius: 20px; padding: 4px 14px; 
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

/* --- 牌桌区域 --- */
.table-felt {
    flex: 1; position: relative; display: flex; flex-direction: column;
    justify-content: space-between; padding: 20px 0;
    /* 移除之前的纹理，保持纯净 */
    background: transparent;
}
.table-logo {
    position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; color: rgba(255,255,255,0.03);
    font-size: 3rem; font-weight: 900; pointer-events: none; line-height: 1; width: 100%;
}
.table-logo span { font-size: 0.8rem; letter-spacing: 4px; display: block; margin-top: 5px; font-weight: 400; opacity: 0.5; }

.hand-section {
    min-height: 130px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; position: relative; z-index: 5;
}

/* 卡牌布局容器 */
.cards-layout {
    display: flex; justify-content: center; height: 110px; 
    perspective: 1000px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- 卡牌 (保持不变) --- */
.card {
    width: 72px; height: 102px; background: #fff; border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4); position: relative;
    margin: 0 -20px;
    display: flex; justify-content: space-between; flex-direction: column;
    padding: 5px; font-weight: 900; color: #2c3e50; font-family: 'Roboto', sans-serif;
    animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: center bottom;
    transition: margin 0.5s ease, transform 0.5s ease;
}
.card.red { color: #c0392b; }
.card.back {
    background: #2a3a5a;
    background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.1) 0px, rgba(255,255,255,0.1) 2px, transparent 2px, transparent 10px);
    border: 2px solid #fff;
}
.card.back * { display: none; }
/* game/bj21/style.css - 修正牌面遮挡 */

/* ... 前面的 .card 样式保持不变 ... */

/* 🔴 核心修改 1: 隐藏巨大的中心花色水印 */
.card-suit-lg {
    display: none !important; /* 彻底隐藏，防止遮挡 */
}

/* 🔴 核心修改 2: 优化角落的数字和花色显示 */
.card-val {
    position: absolute; /* 确保它们固定在角落 */
    font-size: 1.4rem;  /* 字体稍微加大，更清晰 */
    font-weight: 900;
    line-height: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px; /* 数字和花色之间拉开一点点距离 */
}

/* 左上角定位 */
.card-val.corner.top-left {
    top: 6px;
    left: 6px;
}

/* 右下角定位 (旋转180度) */
.card-val.corner.bottom-right {
    bottom: 6px;
    right: 6px;
    transform: rotate(180deg);
}

/* ... 后面的 .card.red 等样式保持不变 ... */

.card-val.inv { transform: rotate(180deg); align-self: flex-end; }

/* 分数气泡 (更轻薄) */
.score-badge {
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.2);
    color: #ddd; padding: 2px 10px; border-radius: 10px;
    font-size: 0.8rem; margin-top: 15px; font-weight: 500;
}
.toast {
    font-size: 2.5rem; font-weight: 900; color: var(--gold);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* --- 底部控制台 (BTC Royal 风格：深色半透明) --- */
.controls-panel {
    /* 核心改动：不再是渐变色，而是深紫+磨砂 */
    background: rgba(20, 5, 35, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    
    flex-shrink: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    padding-top: 20px; padding-left: 20px; padding-right: 20px;
    
    display: flex; flex-direction: column; justify-content: center; 
    min-height: 180px; /* 稍微缩减高度 */
    
    /* 顶部紫色光晕 */
    box-shadow: 0 -5px 20px rgba(100, 0, 200, 0.1);
}
.control-layer { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.control-layer.hidden { display: none; }

/* 拟真筹码 (缩小版) */
.chips-rack { display: flex; justify-content: center; gap: 14px; width: 100%; }
.chip {
    position: relative; width: var(--chip-size); height: var(--chip-size);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 12px; color: #222;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    cursor: pointer; transition: transform 0.1s; background: none; border: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.5); /* 阴影也变小 */
}
.chip:active { transform: scale(0.9); }
/* 纹理 */
.chip::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 50%; z-index: -2; background: repeating-conic-gradient(var(--chip-main) 0deg 36deg, var(--chip-spot) 36deg 45deg); box-shadow: inset 0 2px 3px rgba(255,255,255,0.3), inset 0 -2px 3px rgba(0,0,0,0.4); }
.chip::after { content: ''; position: absolute; top: 5px; left: 5px; right: 5px; bottom: 5px; 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; }

.chip-10 { --chip-main: #2980b9; --chip-spot: #ecf0f1; }
.chip-50 { --chip-main: #27ae60; --chip-spot: #f1c40f; }
.chip-100 { --chip-main: #2c3e50; --chip-spot: #95a5a6; }
.chip-100::before { background: repeating-conic-gradient(var(--chip-main) 0deg 22.5deg, var(--chip-spot) 22.5deg 30deg); }
.chip-500 { --chip-main: #8e44ad; --chip-spot: #f1c40f; }
.chip-500::after { background: #fcf3cf; }
.chip-all { --chip-main: #111; --chip-spot: #f39c12; color: #c0392b; font-size: 10px; }
.chip-all::before { background: repeating-conic-gradient(var(--chip-main) 0deg 60deg, var(--chip-spot) 60deg 90deg); }
.chip-all::after { background: #f9e79f; }

.current-bet-display { color: #888; font-size: 0.8rem; margin-bottom: -5px; font-weight: 700; }
#current-bet { color: var(--gold); font-size: 1.2rem; font-weight: 900; }

/* 🔴 重点改造：发牌按钮 (幽灵金按钮) */
.btn-main {
    width: 80%; max-width: 300px; height: 50px;
    
    /* 透明背景 + 细边框 */
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid var(--gold);
    border-radius: 25px;
    
    color: var(--gold); 
    font-size: 1.1rem; font-weight: 700; letter-spacing: 4px;
    
    /* 霓虹光晕 */
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.1), inset 0 0 10px rgba(255, 215, 0, 0.05);
    
    transition: all 0.2s;
    margin-top: 10px;
}
.btn-main:active { 
    background: rgba(255, 215, 0, 0.2); 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transform: scale(0.98);
}
.btn-main:disabled { 
    border-color: #555; color: #555; box-shadow: none; background: transparent; 
}

/* 游戏操作按钮 */
#game-controls { flex-direction: row; gap: 15px; height: 100%; align-items: center; justify-content: center; padding: 10px 0; }
.btn-action {
    flex: 1; max-width: 100px; height: 100px;
    border-radius: 12px; 
    
    /* 深色玻璃态 */
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    
    color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 4px; padding: 0;
    transition: all 0.2s;
}
.btn-action:active { background: rgba(255,255,255,0.1); transform: scale(0.96); }

.btn-title { font-size: 1.1rem; font-weight: 900; }
.btn-sub { font-size: 0.7rem; font-weight: 500; opacity: 0.5; letter-spacing: 1px; }

/* 颜色强调 */
.btn-action.hit { border-color: rgba(46, 204, 113, 0.3); }
.btn-action.hit .btn-title { color: #2ecc71; }

.btn-action.stand { border-color: rgba(231, 76, 60, 0.3); }
.btn-action.stand .btn-title { color: #e74c3c; }

.btn-action.double { border-color: rgba(241, 196, 15, 0.3); }
.btn-action.double .btn-title { color: #f1c40f; }

/* 动画部分保持不变... */
.flying-chip { position: fixed; z-index: 100; pointer-events: none; box-shadow: 0 5px 15px rgba(0,0,0,0.6) !important; animation: chipBetMove 0.6s ease-in-out forwards; }
@keyframes slideIn { from { transform: translateY(-150px) scale(1.2); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes chipBetMove { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--tx), var(--ty)) scale(0.4); opacity: 0; } }
@keyframes popIn { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
.hidden { display: none !important; }

/* game/bj21/style.css - 追加破产弹窗 */

/* 遮罩层 */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

/* 弹窗本体 */
.modal-box {
    width: 80%; max-width: 320px;
    background: linear-gradient(145deg, #1a0b2e, #0f0518);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.2);
    transform: scale(0.9); transition: transform 0.3s;
}
.modal-overlay.active .modal-box { transform: scale(1); }

.modal-title {
    font-size: 1.5rem; color: #e74c3c; font-weight: 900; margin-bottom: 10px;
    font-family: var(--font-main); letter-spacing: 2px;
}
.modal-desc {
    color: #aaa; font-size: 0.9rem; margin-bottom: 25px; line-height: 1.6;
}

/* 2048 传送门按钮 */
.btn-mining {
    display: block; width: 100%; padding: 15px 0;
    background: linear-gradient(to right, #2ecc71, #27ae60);
    color: #fff; font-weight: 900; text-decoration: none;
    border-radius: 30px; letter-spacing: 2px;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
    transition: transform 0.2s;
}
.btn-mining:active { transform: scale(0.96); }

