/* ================= 布局基础 ================= */
.bet-container { 
    padding-bottom: 20px; 
}

.round-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 16px 24px; }
.status-badge { background: var(--green-soft); color: var(--green-dark); padding: 4px 10px; border-radius: 4px; font-size: 13px; margin-right: 8px; font-weight: 600; }
.time { font-size: 20px; font-weight: 700; color: var(--red); font-family: monospace; }

.bet-header h2 { margin: 0 0 4px; font-size: 18px; color: var(--green-dark); }
.bet-header .hint { margin-bottom: 20px; }

/* 选号区 */
.number-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.num-btn { position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid #ccc; border-radius: 8px; cursor: pointer; user-select: none; transition: all 0.1s; background: #fff; }
.num-btn .num { font-size: 20px; font-weight: 700; }
.num-btn:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.num-btn.red { color: var(--red); border-color: #f7d7d9; }
.num-btn.blue { color: var(--blue); border-color: #d0e0fc; }
.num-btn.green { color: var(--green); border-color: #d1e7dd; }
.num-btn.active { border-color: var(--green-dark) !important; box-shadow: 0 0 0 2px var(--green); background: var(--green-soft); }

/* ================= 底部操作栏 (绝对不悬浮，跟随文档流) ================= */
.action-bar { 
    background: #fff; 
    border: 2px solid var(--green); 
    border-radius: 12px; 
    padding: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative; /* 覆盖掉之前的 fixed */
    width: 100%;
    box-sizing: border-box;
}
.balance { font-size: 15px; font-weight: 600; color: var(--green-dark); }
.cart-info { font-size: 14px; color: var(--muted); }
.cart-info span { color: var(--red); font-weight: 700; }
.amount-box { display: flex; align-items: center; font-size: 14px; background: var(--green-soft); padding: 6px 12px; border-radius: 6px; border: 1px solid var(--green); }
.amount-box input { width: 70px; height: 30px; margin: 0 8px; border: 1px solid var(--line); border-radius: 4px; text-align: center; font-size: 16px; font-weight: 700; color: var(--red); outline: none; }
#btnSubmit { width: auto; padding: 0 32px; height: 42px; font-size: 16px; margin-left: 10px; font-weight: bold; }

/* ================= 开奖结果展示样式 ================= */
.bose-red { background: var(--red) !important; }
.bose-blue { background: var(--blue) !important; }
.bose-green { background: var(--green) !important; }
.bose-grey { background: #afafaf !important; }


/* 榜单样式 */
.rank-tabs { display: flex; margin: 20px 0 10px; border-bottom: 2px solid #8B0000; }
.rank-tab { flex: 1; text-align: center; padding: 12px; font-size: 16px; font-weight: bold; background: transparent; border: none; cursor: pointer; color: #666; transition: all 0.3s; }
.rank-tab.active { color: #8B0000; border-bottom: 3px solid #8B0000; background: rgba(139,0,0,0.05); }

.rank-box { padding: 10px; margin-bottom: 20px; }
.rank-table { width: 100%; border-collapse: collapse; text-align: center; }
.rank-table th { padding: 12px 5px; border-bottom: 2px solid #eee; }
.rank-table td { padding: 12px 5px; border-bottom: 1px dashed #eee; font-size: 14px; }
.rank-table tr:last-child td { border-bottom: none; }

/* 盈利绿色，亏损红色 */
.win-text { color: #198754 !important; }
.loss-text { color: #dc3545 !important; }

/* 榜单排名样式 */
.top-ten-row td { 
    border-bottom: 1px solid #f7ecd0 !important; /* 前十名带一点点金色边框 */
}
.top-ten-row:nth-child(1) { background: linear-gradient(90deg, #fffbe6, #fff) !important; }
.top-ten-row:nth-child(2) { background: linear-gradient(90deg, #f9f9f9, #fff) !important; }
.top-ten-row:nth-child(3) { background: linear-gradient(90deg, #fff5e6, #fff) !important; }

.normal-row { 
    background: #fff; 
    opacity: 0.85; /* 10名以后稍微淡化一点，不抢风头 */
}
.normal-row td {
    font-size: 13px;
    color: #777;
}



/* 手机端适配 */
@media (max-width: 500px) { 
    .num-btn .num { font-size: 16px; } 
    .number-grid { gap: 6px; } 
    .action-bar { flex-wrap: wrap; gap: 12px; }
    .balance, .cart-info { width: 48%; text-align: center; }
    .amount-box { width: 100%; justify-content: center; }
    #btnSubmit { width: 100%; margin-left: 0; }
}