/* 全局样式 */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #43e97b;
    --danger-color: #f5576c;
    --warning-color: #feca57;
    --info-color: #4facfe;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 30px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

/* 封盘倒计时样式 */
#closeCountdownContainer {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    background: #000000;
    border-radius: 20px;
    margin-left: 15px;
}

#closeCountdownLabel {
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

#closeCountdownLabel i {
    margin-right: 5px;
}

/* 封盘倒计时闪烁动画（5分钟内） */
@keyframes countdown-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.countdown-urgent {
    animation: countdown-blink 1s ease-in-out infinite;
}

/* 手机端封盘倒计时样式 */
@media (max-width: 768px) {
    /* PC端倒计时在手机端隐藏 */
    #closeCountdownContainer.pc-countdown {
        display: none !important;
    }
    
    /* 手机端倒计时样式 */
    #closeCountdownContainerMobile {
        padding: 1px 5px !important;
        margin-left: 5px !important;
        background: #000000;
        border-radius: 20px;
    }
    
    #closeCountdownLabelMobile {
        font-size: 12px !important;
    }
    
    #closeCountdownLabelMobile i {
        margin-right: 2px !important;
        font-size: 10px !important;
    }
    
    /* 手机端只隐藏选择玩法标签，保留选择盘标签 */
    .select-play-label {
        display: none !important;
    }
}

/* PC端隐藏手机端倒计时 */
@media (min-width: 769px) {
    #closeCountdownContainerMobile {
        display: none !important;
    }
}

/* 修复下拉菜单在table-responsive中被截断的问题 */
.table-responsive {
    overflow: visible !important;
}
.dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important;
}
/* 确保卡片内容不会截断下拉菜单 */
.card-body {
    overflow: visible !important;
}
.card {
    overflow: visible !important;
}
#agentSection .card {
    overflow: visible !important;
}
#agentSection {
    overflow: visible !important;
}

/* 隐藏number输入框的上下调节键 */
.odds-input-no-spin::-webkit-outer-spin-button,
.odds-input-no-spin::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
.odds-input-no-spin {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 夜间模式 */
body.dark-mode {
    --primary-color: #4a5fc1;
    --bg-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    background: #1a1a2e !important;
    color: #eee !important;
}

body.dark-mode .card {
    background: #16213e !important;
    color: #eee !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background: #0f3460 !important;
    color: #eee !important;
    border-color: #533483 !important;
}

body.dark-mode .shengxiao-header-cell {
    color: #fff !important;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: var(--transition);
}

html {
    height: -webkit-fill-available;
}

/* 投注玩法区域统一高度 */
.bet-type-section {
    min-height: 750px;
}

.main-container {
    max-width: 100%;
    margin: 0 auto;
}

/* 主内容布局容器 */
.content-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

/* 左侧主内容区域 */
.content-main {
    flex: 1;
    min-width: 0;
}

/* 右侧侧边栏固定宽度 */
.content-sidebar {
    width: 280px;
    min-width: 280px;
    flex-shrink: 0;
}

/* 登录/注册区域 */
#authSection {
    max-width: 450px;
    margin: 50px auto;
}

/* 右侧投注记录侧边栏 */
.bet-history-sidebar {
    display: none;
}

.bet-history-sidebar.show {
    display: block;
}

.bet-history-sidebar .card {
    margin-bottom: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: sticky;
    top: 20px;
}

.bet-history-sidebar .card-body {
    max-height: calc(100vh - 307px);
    overflow-y: auto !important;
    padding: 15px;
}

.bet-history-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.bet-history-item:last-child {
    border-bottom: none;
}

.bet-history-item:hover {
    background: #f8f9fa;
}



/* 卡片样式 */
.card {
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    border: none;
    overflow: hidden;
}

.card-header {
    border: none;
    padding: 20px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

/* 导航栏 */
.navbar {
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    padding: 15px 20px;
}

.bg-gradient {
    background: var(--bg-gradient);
}

/* 导航栏余额显示 */
.navbar-balance {
    display: flex;
    align-items: center;
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 0 8px;
    backdrop-filter: blur(10px);
}

/* 手机端额度显示 - 桌面端隐藏 */
.mobile-balance-display {
    display: none;
}

.navbar-balance i {
    font-size: 16px;
    margin-right: 6px;
}

.balance-amount {
    font-size: 15px;
    font-weight: bold;
    color: white;
    min-width: 80px;
    text-align: right;
}

.navbar-balance .btn {
    padding: 3px 6px;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.navbar-balance .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
    transition: all 0.3s;
}

/* 导航栏角色显示 */
.navbar-role {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    margin: 0 10px;
}

.navbar-role .badge {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

/* 用户信息卡片 */
.user-info-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    float: left;
}

.user-avatar i {
    font-size: 36px;
    color: white;
}

.user-details {
    display: inline-block;
}

.balance-display {
    text-align: right;
}

.balance-display h3 {
    font-size: 2rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

/* 号码球样式 */
.number-grid {
    margin: 20px 0;
}

/* 生肖表格布局 */
.shengxiao-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 生肖标题行 */
.shengxiao-header-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(50px, 1fr));
    gap: 8px;
    min-width: fit-content;
}

.shengxiao-header-cell {
    padding: 6px 5px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    color: #000;
    background: #fff !important;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
    cursor: pointer;
    min-width: 50px;
}

.shengxiao-header-cell:hover {
    background: #f0f0f0 !important;
    border-color: #999;
}

/* 号码行 */
.shengxiao-number-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(50px, 1fr));
    gap: 8px;
    min-width: fit-content;
}

.shengxiao-number-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

/* 号码球和赔率容器 */
.ball-with-odds {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

/* 赔率显示 */
.odds-display {
    font-size: 18px;
    color: #ff6600;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    margin-top: 0;
    line-height: 1;
}

.odds-display span {
    color: #ff6600;
    font-size: 18px;
}

/* 投注金额输入框 */
.bet-amount-input {
    width: 57px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    padding: 2px;
    margin-top: 0;
}

.bet-amount-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.bet-amount-input::placeholder {
    color: #999;
    font-size: 11px;
}

.bet-number {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    font-size: 16px;
    background: white;
}

.bet-number:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    filter: brightness(1.2);
}

.bet-number.selected {
    border: 4px solid #FFD700 !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6) !important;
}

/* 开奖号码球容器 */
.number-ball-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}

/* 开奖号码球 */
.number-ball {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 连数/独数号码球 - 无动画 */
.lianshu-ball {
    animation: none !important;
    transition: all 0.2s ease;
}

.lianshu-ball:hover {
    transform: scale(1.1);
}

.lianshu-ball.selected {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    border: 4px solid #FFD700 !important;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6) !important;
}

/* 生肖标签 */
.shengxiao-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
    font-weight: bold;
}

.ball-red { 
    background: #FF0000;
}

.ball-blue { 
    background: #0000FF;
}

.ball-green { 
    background: #00AA00;
}

.ball-special { 
    width: 70px;
    height: 70px;
    font-size: 24px;
}

/* 生肖网格 */
.shengxiao-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.shengxiao-item {
    width: 100px;
    min-height: 80px;
    padding: 10px;
    border: 3px solid var(--primary-color);
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.shengxiao-item:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.shengxiao-item.selected {
    background: var(--primary-color);
    color: white;
}

.shengxiao-item i {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

/* 快速操作按钮 */
.quick-actions button {
    margin-right: 8px;
    margin-bottom: 8px;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    padding: 3px 5px !important;
    font-size: 13px;
}

/* 清空选号按钮和特殊多选按钮不受宽度限制 */
.quick-actions button.clear-btn {
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
    height: 31px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}

/* 确认投注按钮样式 */
.quick-actions button.confirm-bet-btn {
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    height: 31px !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    margin-bottom: 0 !important;
}

/* 各数/智能填充按钮样式 */
.quick-actions button.geshu-btn {
    width: auto !important;
    min-width: 70px !important;
    max-width: none !important;
    height: 31px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}

/* 正码位置按钮样式 */
.quick-actions button.zhengma-pos-btn {
    width: auto !important;
    min-width: 50px !important;
    max-width: none !important;
    height: 31px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}

/* 快速金额按钮样式 */
.quick-amount-btn {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-amount-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #333;
}

.quick-amount-btn:active {
    background: #dee2e6;
}

.quick-amount button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* 脉冲按钮 */
.pulse-btn {
    animation: pulse 2s infinite;
}

/* 中奖模态框 */
.win-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
}

.win-animation {
    font-size: 100px;
    animation: win-bounce 1s infinite;
}

.win-animation i {
    color: #feca57;
    filter: drop-shadow(0 0 20px #feca57);
}

/* 动画效果 */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-in {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes roll-in {
    from {
        transform: translateX(-100px) rotate(-360deg);
        opacity: 0;
    }
    to {
        transform: translateX(0) rotate(0);
        opacity: 1;
    }
}

@keyframes special-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(250, 112, 154, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(254, 225, 64, 0.8);
    }
}

@keyframes win-bounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(-10deg);
    }
    75% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

.animate-slide-in {
    animation: slide-in 0.5s ease-out;
}

/* 桌面端显示侧边栏 - 由JavaScript控制显示/隐藏 */

/* 响应式设计 */
@media (max-width: 991px) {
    .content-sidebar {
        display: none !important;
    }
    
    .content-wrapper {
        display: block;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
        min-height: 100%;
        min-height: -webkit-fill-available;
        background-attachment: fixed;
        /* 修复键盘收起后的空白问题 */
        overflow-x: hidden;
        position: relative;
    }
    
    html {
        height: 100%;
        height: -webkit-fill-available;
        background: var(--bg-gradient);
        overflow-x: hidden;
    }
    
    /* 手机端导航栏 - 菜单水平显示在开奖号码下方 */
    .navbar {
        padding: 5px 10px;
    }
    
    .navbar .container-fluid {
        flex-wrap: wrap;
    }
    
    .navbar-brand {
        flex: 1;
    }
    
    .navbar-toggler {
        display: none !important;
    }
    
    .navbar-collapse {
        display: flex !important;
        flex-basis: 100%;
        order: 3;
    }
    
    .navbar-nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 2px;
        width: 100%;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    
    .navbar-nav .nav-item {
        margin: 0;
    }
    
    .navbar-nav .nav-link {
        padding: 2px 4px !important;
        font-size: 10px;
        white-space: nowrap;
    }
    
    .navbar-nav .nav-link i {
        display: none;
    }
    
    .navbar-balance {
        font-size: 10px;
        padding: 0;
        background: none;
        border-radius: 0;
        color: #fff;
        white-space: nowrap;
        gap: 4px;
        display: none !important;
    }
    
    .navbar-balance .balance-amount {
        font-size: 10px;
        min-width: auto;
        text-align: left;
    }
    
    /* 手机端额度显示在玩法选择标题行 */
    .mobile-balance-display {
        display: flex !important;
        align-items: center;
        margin-left: 8px;
        color: #ff0000;
        font-size: 11px;
        font-weight: bold;
        gap: 3px;
    }
    
    .navbar-balance .btn-sm {
        display: none;
    }
    
    .navbar-role {
        padding: 2px 4px;
    }
    
    .navbar-role .badge {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    /* 手机端选择玩法/选择盘标题 - 一行显示 */
    .card-header.bg-gradient-success {
        padding: 8px 10px !important;
    }
    
    .card-header.bg-gradient-success > div:first-child {
        flex-wrap: nowrap !important;
        gap: 4px;
    }
    
    .bet-header-text {
        font-size: 11px !important;
        white-space: nowrap;
    }
    
    #panSelectContainer {
        margin-left: 4px !important;
        display: inline-flex !important;
        align-items: center;
    }
    
    #panSelectContainer .form-select {
        font-size: 10px;
        padding: 2px 4px;
        height: auto;
        width: 55px !important;
    }
    
    #btnMacauBet, #btnHongkongBet {
        font-size: 9px !important;
        padding: 2px 4px !important;
        margin-right: 2px !important;
    }
    
    #btnMacauBet i, #btnHongkongBet i {
        display: none;
    }
    
    /* 隐藏右侧占位div */
    .card-header.bg-gradient-success > div:last-child {
        display: none;
    }
    
    /* 手机端快选按钮折叠 */
    .quick-select-content {
        display: none;
    }
    
    .quick-select-content.show {
        display: block;
    }
    
    /* 快选折叠按钮样式 */
    .quick-select-toggle {
        white-space: nowrap !important;
        font-size: 11px !important;
        padding: 2px 10px !important;
        width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        border-radius: 4px !important;
        height: 26px !important;
        line-height: 1 !important;
    }
    
    .quick-select-toggle i {
        font-size: 10px !important;
        margin-right: 35px !important;
    }
    
    .quick-select-toggle,
    .quick-select-toggle:hover,
    .quick-select-toggle:focus,
    .quick-select-toggle:active {
        background-color: #f8f9fa !important;
        border-color: #6c757d !important;
        color: #333 !important;
    }
    
    .quick-select-toggle span,
    .quick-select-toggle:hover span,
    .quick-select-toggle:focus span,
    .quick-select-toggle:active span {
        color: #333 !important;
    }
    
    .quick-select-toggle i,
    .quick-select-toggle:hover i,
    .quick-select-toggle:focus i,
    .quick-select-toggle:active i {
        color: #333 !important;
    }
    
    /* 移动端玩法区域高度自适应 */
    .bet-type-section {
        min-height: auto;
    }
    
    .main-container {
        padding: 0;
        max-width: 100%;
        min-height: 100vh;
        background: var(--bg-gradient);
    }
    
    .card {
        border-radius: 0;
        margin-bottom: 10px;
    }
    
    .card-body {
        padding: 10px 5px;
    }
    
    .shengxiao-table {
        margin: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }
    
    .shengxiao-header-row,
    .shengxiao-number-row {
        grid-template-columns: repeat(12, minmax(42px, 1fr));
        gap: 2px;
        min-width: 520px;
    }
    
    .shengxiao-header-cell {
        padding: 4px 1px;
        font-size: 12px;
        border: 1px solid #ddd;
        min-width: 42px;
    }
    
    .bet-number {
        width: 28px;
        height: 28px;
        font-size: 10px;
        border-width: 2px;
    }
    
    .bet-number.selected {
        border: 3px solid #FFD700 !important;
    }
    
    .shengxiao-number-cell {
        min-height: 75px;
        min-width: 42px;
    }
    
    .ball-with-odds {
        gap: 0;
    }
    
    .odds-display {
        font-size: 10px;
    }
    
    .odds-display span {
        font-size: 10px;
    }
    
    .bet-amount-input {
        width: 47px;
        height: 26px;
        font-size: 10px;
    }
    
    .number-ball {
        width: 50px;
        height: 50px;
        font-size: 16px;
        margin: 3px;
    }
    
    .ball-special {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }
    
    /* 移动端快选按钮样式 - 一排显示9个 */
    .quick-actions .btn-sm {
        padding: 2px 4px !important;
        font-size: 11px !important;
        min-width: 36px !important;
        margin: 1px !important;
    }
    
    .quick-actions .clear-btn,
    .quick-actions #specialMultiSelectBtn {
        min-width: auto !important;
        padding: 2px 5px !important;
        font-size: 10px !important;
        margin: 1px 2px !important;
    }
    
    /* 手机端清空选号按钮隐藏图标 */
    .quick-actions .clear-btn i {
        display: none;
    }
    
    /* 手机端按钮行紧凑布局 */
    .quick-actions .mt-2 {
        gap: 3px !important;
    }
    
    .quick-actions .geshu-btn {
        padding: 2px 5px !important;
        font-size: 10px !important;
        min-width: auto !important;
        margin: 1px 2px !important;
    }
    
    .quick-actions .confirm-bet-btn {
        padding: 2px 8px !important;
        font-size: 10px !important;
        min-width: auto !important;
        width: auto !important;
        margin: 1px 2px !important;
    }
    
    .quick-actions .confirm-bet-btn i {
        display: none;
    }
    
    /* 平肖连肖生肖按钮 - 手机端一行显示12个 */
    .shengxiao-grid {
        gap: 0;
        margin: 5px 0;
        margin-left: 42px; /* 和赔率标签宽度对齐 */
        flex-wrap: nowrap;
        overflow-x: visible;
        justify-content: space-between;
        width: calc(100% - 42px);
    }
    
    .shengxiao-item {
        width: 22px;
        min-width: 22px;
        min-height: 22px;
        padding: 1px;
        border: 1px solid var(--primary-color);
        border-radius: 4px;
        font-size: 9px;
        flex-shrink: 0;
    }
    
    .shengxiao-item i {
        display: none;
    }
    
    /* 平肖连肖赔率 - 手机端缩小并对齐生肖 */
    .lianxiao-odds-row {
        gap: 0 !important;
        margin-bottom: 2px !important;
        justify-content: flex-start;
    }
    
    .lianxiao-odds-label {
        font-size: 8px !important;
        padding: 1px 2px !important;
        white-space: nowrap;
        width: 42px;
        min-width: 42px;
        flex-shrink: 0;
    }
    
    .lianxiao-odds-value {
        font-size: 8px !important;
        gap: 0 !important;
        flex: 1;
        justify-content: space-between;
    }
    
    .lianxiao-odds-value span {
        width: 22px;
        min-width: 22px;
        text-align: center;
        font-size: 8px !important;
    }
    
    /* 平尾连尾赔率 - 手机端缩小并对齐尾数 */
    .lianwei-odds-row {
        gap: 0 !important;
        margin-bottom: 2px !important;
        justify-content: flex-start;
    }
    
    .lianwei-odds-label {
        font-size: 8px !important;
        padding: 1px 2px !important;
        white-space: nowrap;
        width: 42px;
        min-width: 42px;
        flex-shrink: 0;
    }
    
    .lianwei-odds-value {
        font-size: 8px !important;
        gap: 0 !important;
        flex: 1;
        justify-content: space-between;
        padding-left: 0 !important;
    }
    
    .lianwei-odds-value span {
        text-align: center;
        font-size: 9px !important;
    }
    
    /* 连数独平页面 - 手机端缩小 */
    #lianshuDushuContainer {
        gap: 2px !important;
        min-width: 360px;
        overflow-x: auto;
    }
    
    #lianshuDushuContainer .number-ball,
    #lianshuDushuContainer .lianshu-ball {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
        line-height: 24px !important;
    }
    
    #lianshuDushuContainer .lianshu-tail-btn,
    #lianshuDushuContainer .lianshu-shengxiao-btn {
        padding: 2px 1px !important;
        font-size: 10px !important;
        border-radius: 5px !important;
    }
    
    #lianshuDushuContainer span[data-odds-type] {
        font-size: 8px !important;
        padding: 2px 3px !important;
        min-width: auto !important;
        border-radius: 6px !important;
    }
    
    #lianshuDushuContainer .lianshu-odds-display {
        font-size: 8px !important;
    }
    
    /* 不中页面 - 手机端缩小 */
    #buzhongContainer {
        gap: 2px !important;
        min-width: 360px;
        overflow-x: auto;
    }
    
    #buzhongContainer .number-ball,
    #buzhongContainer .buzhong-ball {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
        line-height: 24px !important;
    }
    
    #buzhongContainer .buzhong-tail-btn,
    #buzhongContainer .buzhong-shengxiao-btn {
        padding: 2px 1px !important;
        font-size: 10px !important;
        border-radius: 5px !important;
    }
    
    #buzhongContainer span[data-buzhong-odds-type] {
        font-size: 8px !important;
        padding: 2px 3px !important;
        min-width: auto !important;
        border-radius: 6px !important;
    }
    
    #buzhongContainer .buzhong-odds-display {
        font-size: 8px !important;
    }
    
    /* 正码位置按钮 - 手机端缩小 */
    .quick-actions button.zhengma-pos-btn {
        min-width: 40px !important;
        height: 26px !important;
        padding: 0 4px !important;
        font-size: 9px !important;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .shengxiao-header-row,
    .shengxiao-number-row {
        gap: 1px;
    }
    
    .shengxiao-header-cell {
        padding: 3px 0;
        font-size: 11px;
    }
    
    .bet-number {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .shengxiao-number-cell {
        min-height: 85px;
    }
    
    .odds-display {
        font-size: 11px;
    }
    
    .odds-display span {
        font-size: 11px;
    }
    
    .bet-amount-input {
        width: 35px;
        height: 21px;
        font-size: 9px;
    }
    
    .number-ball {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .ball-special {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    .user-info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .balance-display {
        text-align: center;
        margin-top: 15px;
    }
    
    /* 移动端导航栏余额 */
    .navbar-balance {
        padding: 6px 12px;
        margin: 10px 0;
    }
    
    .balance-amount {
        font-size: 16px;
        min-width: 80px;
    }
    
    .navbar-balance i {
        font-size: 16px;
    }
    
    /* 移动端导航栏角色 */
    .navbar-role {
        padding: 6px 12px;
        margin: 10px 0;
    }
    
    .navbar-role .badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    /* 小屏幕快选按钮 - 更紧凑 */
    .quick-actions .btn-sm {
        padding: 1px 3px !important;
        font-size: 10px !important;
        min-width: 32px !important;
        margin: 1px !important;
    }
    
    .quick-actions .clear-btn,
    .quick-actions #specialMultiSelectBtn {
        min-width: auto !important;
        padding: 1px 5px !important;
        font-size: 10px !important;
    }
}

/* 表格样式 */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: var(--bg-gradient);
    color: white;
}

/* 徽章样式 */
.badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .theme-toggle,
    .lang-toggle,
    .navbar,
    button {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 赔率导航标签样式 */
.odds-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border: 2px solid #17a2b8;
    border-radius: 8px;
}

.odds-tab {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-right: 1px solid #e0e0e0;
}

.odds-tab:last-child {
    border-right: none;
}

.odds-tab:hover {
    background: #e3f2fd;
}

.odds-tab.active {
    background: #17a2b8;
    color: white;
}

.odds-tab i {
    margin-right: 5px;
}

/* 赔率管理页面自适应缩放 */
.odds-management-grid {
    font-size: clamp(9px, 1.2vw, 12px);
}

.odds-management-grid .odds-ball {
    width: clamp(22px, 2.5vw, 30px);
    height: clamp(22px, 2.5vw, 30px);
    font-size: clamp(10px, 1.2vw, 13px);
}

.odds-management-grid input.odds-input-no-spin {
    width: clamp(35px, 4vw, 55px);
    height: clamp(18px, 2.2vw, 26px);
    font-size: clamp(9px, 1.1vw, 12px);
    padding: 1px 2px;
}

.odds-management-grid .bet-amount-text {
    font-size: clamp(9px, 1.1vw, 12px);
    min-width: clamp(30px, 4vw, 50px);
}

.odds-management-grid .profit-loss-text {
    font-size: clamp(9px, 1.1vw, 12px);
    min-width: clamp(35px, 4.5vw, 55px);
}

/* 平特肖/连肖等赔率表格自适应 */
.odds-shengxiao-grid input.form-control {
    width: clamp(50px, 6vw, 80px);
    font-size: clamp(10px, 1.2vw, 14px);
}

.odds-shengxiao-grid label {
    font-size: clamp(11px, 1.3vw, 14px);
}

/* 中等屏幕适配 */
@media (max-width: 1400px) {
    .odds-management-grid .table td {
        padding: 3px 2px !important;
    }
    
    .odds-management-grid div[style*="gap"] {
        gap: 4px !important;
    }
}

/* 小屏幕适配 */
@media (max-width: 1200px) {
    .odds-management-grid .table td {
        padding: 2px 1px !important;
    }
    
    .odds-management-grid div[style*="gap"] {
        gap: 3px !important;
    }
}

/* 更小屏幕 */
@media (max-width: 992px) {
    .odds-management-grid .row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .odds-management-grid .table td {
        padding: 4px 3px !important;
    }
}


/* 投注页面手机端自适应 */
@media (max-width: 768px) {
    /* 生肖表格横向滚动 */
    .shengxiao-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* 生肖头部 */
    .shengxiao-header {
        min-width: 45px !important;
        font-size: 12px !important;
        padding: 4px 2px !important;
    }
    
    /* 号码单元格 */
    .shengxiao-number-cell {
        min-width: 45px !important;
        min-height: 70px !important;
        padding: 2px !important;
    }
    
    /* 号码球 */
    .bet-number {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
    
    /* 赔率显示 */
    .odds-display {
        font-size: 9px !important;
    }
    
    .odds-display span {
        font-size: 9px !important;
    }
    
    /* 金额输入框 */
    .bet-amount-input {
        width: 38px !important;
        height: 20px !important;
        font-size: 10px !important;
        padding: 1px 2px !important;
    }
    
    /* 号码球和赔率容器 */
    .ball-with-odds {
        gap: 1px !important;
    }
}

/* 更小屏幕 */
@media (max-width: 480px) {
    .shengxiao-header {
        min-width: 38px !important;
        font-size: 11px !important;
    }
    
    .shengxiao-number-cell {
        min-width: 38px !important;
        min-height: 65px !important;
    }
    
    .bet-number {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }
    
    .odds-display,
    .odds-display span {
        font-size: 8px !important;
    }
    
    .bet-amount-input {
        width: 32px !important;
        height: 18px !important;
        font-size: 9px !important;
    }
}

/* 超小屏幕 - 强制横向滚动 */
@media (max-width: 380px) {
    .shengxiao-table {
        display: block;
        width: 100%;
        overflow-x: scroll;
    }
    
    .shengxiao-header-row,
    .shengxiao-number-row {
        display: flex;
        flex-wrap: nowrap;
        min-width: 500px;
    }
    
    .shengxiao-header,
    .shengxiao-number-cell {
        flex-shrink: 0;
        min-width: 40px !important;
    }
}


/* 不中和连数页面 - 横向滚动支持 */
.buzhong-scroll-wrapper,
.lianshu-scroll-wrapper,
.lianxiao-scroll-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 10px;
}

#buzhongContainer,
#lianshuDushuContainer {
    min-width: 100%;
}

/* 平肖连肖Grid布局 */
#lianxiaoGridContainer {
    min-width: 100%;
    gap: clamp(2px, 0.6vw, 10px);
}

/* 平肖连肖生肖按钮自适应 */
#lianxiaoGridContainer .lianxiao-shengxiao-btn {
    font-size: clamp(10px, 1.5vw, 16px) !important;
    padding: clamp(3px, 0.8vw, 10px) clamp(5px, 1vw, 15px) !important;
    border-radius: clamp(5px, 1vw, 10px) !important;
}

/* 平肖连肖赔率标签自适应 */
#lianxiaoGridContainer .lianxiao-grid-label {
    font-size: clamp(8px, 1.2vw, 16px) !important;
    padding: clamp(2px, 0.6vw, 8px) clamp(4px, 1vw, 15px) !important;
    border-radius: clamp(4px, 0.8vw, 10px) !important;
}

/* 平肖连肖赔率值自适应 */
#lianxiaoGridContainer .lianxiao-grid-odds {
    font-size: clamp(10px, 1.3vw, 18px) !important;
}

/* 手机端平肖连肖Grid布局 */
@media (max-width: 768px) {
    #lianxiaoGridContainer {
        gap: 1px 2px !important;
        grid-template-columns: 38px repeat(12, 1fr) !important;
    }
    
    #lianxiaoGridContainer > div {
        padding: 2px 1px !important;
    }
    
    #lianxiaoGridContainer .lianxiao-shengxiao-btn {
        font-size: 9px !important;
        padding: 2px 1px !important;
        border-radius: 3px !important;
        min-width: 0 !important;
    }
    
    #lianxiaoGridContainer .lianxiao-grid-label {
        font-size: 7px !important;
        padding: 2px 1px !important;
        border-radius: 3px !important;
        white-space: nowrap !important;
    }
    
    #lianxiaoGridContainer .lianxiao-grid-label .odds-suffix {
        display: none !important;
    }
    
    #lianxiaoGridContainer .lianxiao-grid-odds {
        font-size: 8px !important;
    }
}

/* 平尾连尾Grid布局 */
#lianweiGridContainer {
    min-width: 100%;
    gap: clamp(2px, 0.6vw, 10px);
}

/* 平尾连尾尾数按钮自适应 */
#lianweiGridContainer .lianwei-weishu-btn {
    font-size: clamp(10px, 1.5vw, 16px) !important;
    padding: clamp(3px, 0.8vw, 10px) clamp(5px, 1vw, 15px) !important;
    border-radius: clamp(5px, 1vw, 10px) !important;
}

/* 平尾连尾赔率标签自适应 */
#lianweiGridContainer .lianwei-grid-label {
    font-size: clamp(8px, 1.2vw, 16px) !important;
    padding: clamp(2px, 0.6vw, 8px) clamp(4px, 1vw, 15px) !important;
    border-radius: clamp(4px, 0.8vw, 10px) !important;
}

/* 平尾连尾赔率值自适应 */
#lianweiGridContainer .lianwei-grid-odds {
    font-size: clamp(10px, 1.3vw, 18px) !important;
}

/* 手机端平尾连尾Grid布局 */
@media (max-width: 768px) {
    #lianweiGridContainer {
        gap: 1px 2px !important;
        grid-template-columns: 38px repeat(10, 1fr) !important;
    }
    
    #lianweiGridContainer > div {
        padding: 2px 1px !important;
    }
    
    #lianweiGridContainer .lianwei-weishu-btn {
        font-size: 9px !important;
        padding: 2px 1px !important;
        border-radius: 3px !important;
        min-width: 0 !important;
    }
    
    #lianweiGridContainer .lianwei-grid-label {
        font-size: 7px !important;
        padding: 2px 1px !important;
        border-radius: 3px !important;
        white-space: nowrap !important;
    }
    
    #lianweiGridContainer .lianwei-grid-label .odds-suffix {
        display: none !important;
    }
    
    #lianweiGridContainer .lianwei-grid-odds {
        font-size: 8px !important;
    }
}

/* 赔率后缀 - 默认隐藏，只在大屏幕全屏时显示 */
.odds-suffix {
    display: none;
}

@media (min-width: 1400px) {
    .odds-suffix {
        display: inline;
    }
}

/* 不中和连数页面自适应缩放 */
#buzhongContainer,
#lianshuDushuContainer {
    font-size: clamp(8px, 1.5vw, 18px);
    gap: clamp(2px, 0.6vw, 10px);
}

/* 号码球自适应 */
#buzhongContainer .buzhong-ball,
#lianshuDushuContainer .lianshu-ball,
#lianshuDushuContainer .number-ball {
    width: clamp(22px, 3.5vw, 50px) !important;
    height: clamp(22px, 3.5vw, 50px) !important;
    font-size: clamp(9px, 1.3vw, 16px) !important;
    line-height: clamp(22px, 3.5vw, 50px) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* 赔率显示自适应 */
#buzhongContainer .buzhong-odds-display,
#lianshuDushuContainer .lianshu-odds-display {
    font-size: clamp(8px, 1.2vw, 20px) !important;
}

/* 赔率标签按钮自适应 - 更小的最小值 */
#buzhongContainer .buzhong-odds-label,
#lianshuDushuContainer .lianshu-odds-label,
#buzhongContainer span[data-buzhong-odds-type],
#lianshuDushuContainer span[data-odds-type] {
    font-size: clamp(7px, 1.1vw, 18px) !important;
    padding: clamp(1px, 0.5vw, 10px) clamp(2px, 1vw, 20px) !important;
    border-radius: clamp(4px, 1.5vw, 25px) !important;
    min-width: auto !important;
    white-space: nowrap !important;
}

/* 尾数和生肖按钮自适应 */
#buzhongContainer .buzhong-tail-btn,
#buzhongContainer .buzhong-shengxiao-btn,
#lianshuDushuContainer .lianshu-tail-btn,
#lianshuDushuContainer .lianshu-shengxiao-btn {
    font-size: clamp(9px, 1.3vw, 18px) !important;
    padding: clamp(1px, 0.5vw, 10px) clamp(1px, 0.3vw, 5px) !important;
    border-radius: clamp(4px, 1.2vw, 20px) !important;
    border-width: clamp(1px, 0.15vw, 2px) !important;
}

/* 单元格间距自适应 */
#buzhongContainer > div,
#lianshuDushuContainer > div {
    gap: clamp(1px, 0.4vw, 12px);
}

/* 尾数和生肖按钮行 */
.buzhong-tail-row,
.buzhong-shengxiao-row,
.lianshu-tail-row,
.lianshu-shengxiao-row {
    display: flex;
    flex-wrap: nowrap;
    min-width: fit-content;
}

/* 号码球表格行 */
.buzhong-number-row,
.lianshu-number-row {
    display: flex;
    flex-wrap: nowrap;
    min-width: fit-content;
}

/* 赔率按钮行 */
.buzhong-odds-row,
.lianshu-odds-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding-bottom: 5px;
}

/* 手机端投注类型导航栏 - 一行显示，去掉图标 */
@media (max-width: 768px) {
    .bet-type-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
    }
    
    .bet-type-nav label.btn {
        padding: 6px 2px !important;
        font-size: 12px !important;
        flex: 1 !important;
        white-space: nowrap !important;
    }
    
    .bet-type-nav label.btn i {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .bet-type-nav label.btn {
        padding: 5px 1px !important;
        font-size: 11px !important;
    }
}


/* 手机端投注记录表格 - 缩小显示 */
@media (max-width: 768px) {
    #betHistory .table {
        font-size: 11px !important;
    }
    
    #betHistory .table th,
    #betHistory .table td {
        padding: 4px 3px !important;
        vertical-align: middle !important;
    }
    
    #betHistory .table th {
        font-size: 10px !important;
        white-space: nowrap !important;
    }
    
    #betHistory .table .badge {
        font-size: 9px !important;
        padding: 2px 4px !important;
    }
    
    /* 号码列允许换行但限制宽度 */
    #betHistory .table td:nth-child(3) {
        max-width: 120px !important;
        word-break: break-all !important;
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    #betHistory .table {
        font-size: 10px !important;
    }
    
    #betHistory .table th,
    #betHistory .table td {
        padding: 3px 2px !important;
    }
    
    #betHistory .table th {
        font-size: 9px !important;
    }
    
    #betHistory .table .badge {
        font-size: 8px !important;
        padding: 1px 3px !important;
    }
    
    #betHistory .table td:nth-child(3) {
        max-width: 100px !important;
        font-size: 9px !important;
    }
}


/* 手机端特码生肖表格 - 强制横向滚动 */
@media (max-width: 768px) {
    .shengxiao-table {
        display: block !important;
        width: 100% !important;
        overflow-x: visible !important;
    }
    
    .shengxiao-header-row,
    .shengxiao-number-row {
        display: grid !important;
        grid-template-columns: repeat(12, 1fr) !important;
        gap: 2px !important;
        min-width: 0 !important;
    }
    
    .shengxiao-header-cell {
        min-width: 0 !important;
        padding: 3px 1px !important;
        font-size: 11px !important;
        border-width: 1px !important;
    }
    
    .shengxiao-number-cell {
        min-width: 0 !important;
        padding: 1px !important;
    }
    
    .shengxiao-number-cell .bet-number {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
        margin: 1px !important;
    }
    
    .shengxiao-number-cell .odds-display {
        font-size: 8px !important;
    }
    
    .shengxiao-number-cell .bet-amount-input {
        width: 30px !important;
        height: 16px !important;
        font-size: 8px !important;
        padding: 0 1px !important;
    }
    
    .ball-with-odds {
        gap: 0 !important;
    }
}

@media (max-width: 480px) {
    .shengxiao-header-cell {
        padding: 2px 0 !important;
        font-size: 10px !important;
    }
    
    .shengxiao-number-cell .bet-number {
        width: 22px !important;
        height: 22px !important;
        font-size: 9px !important;
    }
    
    .shengxiao-number-cell .bet-amount-input {
        width: 28px !important;
        height: 14px !important;
        font-size: 7px !important;
    }
    
    .shengxiao-number-cell .odds-display {
        font-size: 7px !important;
    }
}


/* 盘设置页面输入框隐藏上下调节按钮 */
#oddsTemplateSection input[type="number"]::-webkit-inner-spin-button,
#oddsTemplateSection input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
#oddsTemplateSection input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 会员资料页面输入框隐藏上下调节按钮 */
#memberProfileSection input[type="number"]::-webkit-inner-spin-button,
#memberProfileSection input[type="number"]::-webkit-outer-spin-button,
#userBetLimitsModal input[type="number"]::-webkit-inner-spin-button,
#userBetLimitsModal input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}
#memberProfileSection input[type="number"],
#userBetLimitsModal input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* 手机端会员资料设置弹窗样式 */
@media (max-width: 768px) {
    #userBetLimitsModal .modal-dialog {
        margin: 3px !important;
        max-width: calc(100% - 6px) !important;
    }
    
    #userBetLimitsModal .modal-header {
        padding: 6px 8px !important;
        flex-wrap: wrap !important;
    }
    
    #userBetLimitsModal .modal-header > div {
        font-size: 10px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 2px 6px !important;
    }
    
    #userBetLimitsModal .modal-header .ms-3 {
        margin-left: 0 !important;
    }
    
    #userBetLimitsModal .modal-body {
        padding: 5px !important;
        max-height: 75vh !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #userBetLimitsModal .table {
        font-size: 9px !important;
        min-width: 420px !important;
        margin-bottom: 0 !important;
    }
    
    #userBetLimitsModal .table th,
    #userBetLimitsModal .table td {
        padding: 3px 1px !important;
        vertical-align: middle !important;
    }
    
    #userBetLimitsModal .table th {
        font-size: 8px !important;
        white-space: nowrap !important;
    }
    
    #userBetLimitsModal .user-limit-input {
        width: 42px !important;
        height: 24px !important;
        font-size: 10px !important;
        padding: 1px 2px !important;
    }
    
    #userBetLimitsModal .modal-footer {
        padding: 6px 8px !important;
    }
    
    #userBetLimitsModal .modal-footer .btn {
        font-size: 12px !important;
        padding: 5px 12px !important;
    }
}

@media (max-width: 480px) {
    #userBetLimitsModal .modal-header > div {
        font-size: 9px !important;
    }
    
    #userBetLimitsModal .table {
        font-size: 8px !important;
        min-width: 380px !important;
    }
    
    #userBetLimitsModal .table th {
        font-size: 7px !important;
    }
    
    #userBetLimitsModal .table td:first-child {
        font-size: 8px !important;
        max-width: 45px !important;
        word-break: break-all !important;
    }
    
    #userBetLimitsModal .user-limit-input {
        width: 38px !important;
        height: 22px !important;
        font-size: 9px !important;
    }
}

/* 盘设置页面输入框缩小宽度 */
#oddsTemplateSection .template-input {
    max-width: 80px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    text-align: center;
}

/* 盘设置页面标签缩小 */
#oddsTemplateSection .form-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

/* 盘设置页面列间距调整 */
#oddsTemplateSection .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* 手机端会员资料页面响应式样式 */
@media (max-width: 768px) {
    /* 会员资料头部信息 - 一行显示 */
    #memberProfileSection .alert {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    #memberProfileHeader {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        white-space: nowrap;
        gap: 3px !important;
    }
    
    #memberProfileHeader span {
        font-size: 10px !important;
    }
    
    #memberProfileHeader select {
        font-size: 10px !important;
        padding: 1px 15px 1px 3px !important;
    }
    
    /* 会员资料表格 - 自适应宽度 */
    #betLimitsTable {
        font-size: 9px !important;
        table-layout: fixed;
        width: 100%;
    }
    
    #betLimitsTable thead th {
        padding: 3px 1px !important;
        font-size: 9px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    #betLimitsTable tbody td {
        padding: 3px 1px !important;
        font-size: 9px !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 表格列宽百分比 - 自适应 */
    #betLimitsTable th:nth-child(1),
    #betLimitsTable td:nth-child(1) {
        width: 10% !important;
    }
    
    #betLimitsTable th:nth-child(2),
    #betLimitsTable td:nth-child(2) {
        width: 18% !important;
    }
    
    #betLimitsTable th:nth-child(3),
    #betLimitsTable td:nth-child(3),
    #betLimitsTable th:nth-child(4),
    #betLimitsTable td:nth-child(4),
    #betLimitsTable th:nth-child(5),
    #betLimitsTable td:nth-child(5) {
        width: 12% !important;
    }
    
    #betLimitsTable th:nth-child(6),
    #betLimitsTable td:nth-child(6),
    #betLimitsTable th:nth-child(7),
    #betLimitsTable td:nth-child(7),
    #betLimitsTable th:nth-child(8),
    #betLimitsTable td:nth-child(8) {
        width: 12% !important;
    }
    
    /* 输入框缩小 */
    #memberProfileSection .bet-limit-input {
        width: 100% !important;
        max-width: 40px !important;
        padding: 1px !important;
        font-size: 9px !important;
    }
    
    /* 禁止表格横向滚动，强制自适应 */
    #memberProfileSection .table-responsive {
        overflow-x: hidden;
    }
    
    #memberProfileSection .card-body {
        padding: 5px !important;
    }
}


/* 手机端结算明细页面样式 */
@media (max-width: 768px) {
    /* 结算明细汇总卡片 - 横向一行显示 */
    #subordinateSummary .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding: 8px 5px !important;
        margin: 0 !important;
    }
    
    #subordinateSummary .row > [class*="col-"] {
        flex: 1 1 0 !important;
        width: 0 !important;
        min-width: 55px !important;
        max-width: none !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
    }
    
    #subordinateSummary .card {
        border-radius: 8px !important;
        margin-bottom: 0 !important;
        height: 100% !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    
    #subordinateSummary .card-body {
        padding: 10px 5px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 90px !important;
    }
    
    #subordinateSummary .card-body i {
        font-size: 20px !important;
        margin-bottom: 6px !important;
    }
    
    #subordinateSummary .card-body h4 {
        font-size: 13px !important;
        margin-bottom: 4px !important;
        white-space: nowrap !important;
        font-weight: bold !important;
    }
    
    #subordinateSummary .card-body p {
        font-size: 10px !important;
        margin-bottom: 0 !important;
        white-space: nowrap !important;
        opacity: 0.9 !important;
    }
    
    /* 隐藏说明文字 */
    #subordinateSummary .alert {
        display: none !important;
    }
    
    /* 结算明细头部样式 */
    #settlementSection .card-header {
        padding: 8px 10px !important;
        flex-wrap: wrap !important;
    }
    
    #settlementSection .card-header h5 {
        font-size: 14px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
    }
    
    /* 日期选择器和标题同一行 */
    #settlementSection .card-header > div:last-child {
        order: -1 !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    
    #settlementSection .card-header > h5 {
        order: -2 !important;
    }
    
    /* 入股选择器 */
    #shareRatioContainer {
        flex-basis: 100% !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        font-size: 11px !important;
        margin-top: 5px !important;
        order: 1 !important;
    }
    
    #shareRatioContainer label {
        font-size: 12px !important;
    }
    
    #shareRatioContainer select {
        font-size: 11px !important;
        padding: 2px 5px !important;
    }
    
    #shareRatioContainer span {
        font-size: 9px !important;
    }
    
    /* 时间选择器 */
    #settlementDrawSelect {
        font-size: 11px !important;
        padding-right: 20px !important;
        background-position: right 4px center !important;
    }
    
    /* 入股选择器下拉框 */
    #settlementShareRatio {
        padding-right: 24px !important;
        padding-left: 8px !important;
        background-position: right 6px center !important;
        min-width: 55px !important;
    }
}

/* 更小屏幕的结算明细样式 */
@media (max-width: 480px) {
    #subordinateSummary .row > [class*="col-"] {
        min-width: 50px !important;
    }
    
    #subordinateSummary .card-body {
        padding: 8px 3px !important;
        min-height: 80px !important;
    }
    
    #subordinateSummary .card-body i {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }
    
    #subordinateSummary .card-body h4 {
        font-size: 11px !important;
    }
    
    #subordinateSummary .card-body p {
        font-size: 9px !important;
    }
}

/* 手机端结算明细表格样式 */
@media (max-width: 768px) {
    /* 下级结算和我的结算表格 */
    #subordinateDetail .table-responsive {
        overflow-x: hidden !important;
    }
    
    #subordinateDetail .table {
        font-size: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto !important;
    }
    
    #subordinateDetail .table th,
    #subordinateDetail .table td {
        padding: 4px 2px !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
        width: auto !important;
    }
    
    #subordinateDetail .table th {
        font-size: 9px !important;
    }
    
    #subordinateDetail .table .badge {
        font-size: 8px !important;
        padding: 2px 4px !important;
    }
    
    #subordinateDetail .table .btn-sm {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    
    /* 卡片头部 */
    #subordinateDetail .card-header {
        padding: 8px 10px !important;
    }
    
    #subordinateDetail .card-header h6 {
        font-size: 13px !important;
    }
    
    /* Tab导航 */
    #settlementTabs .nav-link {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
    
    #settlementTabs .nav-link i {
        display: none !important;
    }
}

@media (max-width: 480px) {
    #subordinateDetail .table {
        font-size: 9px !important;
    }
    
    #subordinateDetail .table th,
    #subordinateDetail .table td {
        padding: 3px 1px !important;
    }
    
    #subordinateDetail .table th {
        font-size: 8px !important;
    }
    
    #subordinateDetail .table .badge {
        font-size: 7px !important;
        padding: 1px 3px !important;
    }
    
    #subordinateDetail .table .btn-sm {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }
}


/* 手机端代理页面响应式样式 */

/* 代理页面创建表单 - 桌面端样式 */
.agent-create-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
}

.agent-form-item {
    display: flex;
    flex-direction: column;
}

.agent-form-item .form-label {
    font-size: 16px;
    margin-bottom: 4px;
}

.agent-input {
    width: 200px;
    height: 48px;
    font-size: 16px;
}

.agent-input-sm {
    width: 140px;
}

.agent-select {
    width: 160px;
    height: 48px;
    font-size: 16px;
}

.agent-pan-select {
    display: flex;
    gap: 10px;
    height: 48px;
    align-items: center;
}

.agent-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.agent-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.agent-checkbox-label span {
    font-size: 16px;
}

.agent-checkbox-item {
    flex-direction: row !important;
    align-items: center !important;
    margin-top: 30px;
}

.agent-checkbox-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 10px;
}

.agent-checkbox-item .form-label {
    font-size: 16px;
    margin-bottom: 0;
}

.agent-submit-item {
    margin-top: 30px;
}

.agent-submit-btn {
    height: 48px;
    font-size: 16px;
    padding: 0 25px;
}

@media (max-width: 768px) {
    /* 代理页面整体 */
    #agentSection {
        padding: 0 !important;
    }
    
    #agentSection .card {
        border-radius: 0 !important;
        margin-bottom: 8px !important;
    }
    
    #agentSection .card-header {
        padding: 8px 10px !important;
    }
    
    #agentSection .card-header h5 {
        font-size: 14px !important;
    }
    
    #agentSection .card-body {
        padding: 10px !important;
    }
    
    /* 创建下级账号表单 - 手机端垂直布局 */
    .agent-create-form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    .agent-form-item {
        width: 100% !important;
    }
    
    .agent-form-item .form-label {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .agent-input,
    .agent-input-sm,
    .agent-select {
        width: 100% !important;
        height: 42px !important;
        font-size: 15px !important;
    }
    
    /* 选择盘复选框 - 手机端一行显示 */
    .agent-pan-select {
        height: auto !important;
        gap: 15px !important;
        flex-wrap: wrap !important;
    }
    
    .agent-checkbox-label input[type="checkbox"] {
        width: 18px !important;
        height: 18px !important;
    }
    
    .agent-checkbox-label span {
        font-size: 14px !important;
    }
    
    /* 允许创建下级复选框 */
    .agent-checkbox-item {
        margin-top: 0 !important;
        padding: 8px 0 !important;
    }
    
    .agent-checkbox-item input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
    }
    
    .agent-checkbox-item .form-label {
        font-size: 14px !important;
    }
    
    /* 创建账号按钮 */
    .agent-submit-item {
        margin-top: 5px !important;
    }
    
    .agent-submit-btn {
        width: 100% !important;
        height: 44px !important;
        font-size: 15px !important;
    }
    
    /* 下级用户列表表格 */
    #subUsersList {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #subUsersList .table {
        font-size: 11px !important;
        min-width: 600px !important;
    }
    
    #subUsersList .table th,
    #subUsersList .table td {
        padding: 5px 4px !important;
        white-space: nowrap !important;
    }
    
    #subUsersList .table .badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    
    #subUsersList .table .btn-sm {
        font-size: 10px !important;
        padding: 3px 6px !important;
        margin: 1px !important;
    }
    
    #subUsersList .table .btn-group {
        flex-wrap: wrap !important;
        gap: 2px !important;
    }
    
    /* 下级投注统计 */
    #subBetsList {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #subBetsList .table {
        font-size: 11px !important;
        min-width: 500px !important;
    }
    
    #subBetsList .table th,
    #subBetsList .table td {
        padding: 5px 4px !important;
        white-space: nowrap !important;
    }
}

/* 更小屏幕的代理页面样式 */
@media (max-width: 480px) {
    #agentSection .card-header h5 {
        font-size: 13px !important;
    }
    
    #agentSection .card-body {
        padding: 8px !important;
    }
    
    .agent-form-item .form-label {
        font-size: 13px !important;
    }
    
    .agent-input,
    .agent-input-sm,
    .agent-select {
        height: 38px !important;
        font-size: 14px !important;
    }
    
    .agent-checkbox-label span {
        font-size: 13px !important;
    }
    
    .agent-submit-btn {
        height: 40px !important;
        font-size: 14px !important;
    }
    
    #subUsersList .table {
        font-size: 10px !important;
    }
    
    #subUsersList .table th,
    #subUsersList .table td {
        padding: 4px 3px !important;
    }
    
    #subUsersList .table .badge {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }
    
    #subUsersList .table .btn-sm {
        font-size: 9px !important;
        padding: 2px 4px !important;
    }
    
    #subBetsList .table {
        font-size: 10px !important;
    }
    
    #subBetsList .table th,
    #subBetsList .table td {
        padding: 4px 3px !important;
    }
}

/* Toast通知样式 */
#notificationToast {
    min-width: 280px;
    max-width: 90vw;
}

#notificationToast .toast-header {
    border-bottom: none;
}

#notificationToast.bg-success .toast-header,
#notificationToast.bg-danger .toast-header,
#notificationToast.bg-info .toast-header {
    background: transparent;
    color: white;
}

#notificationToast.bg-success .btn-close,
#notificationToast.bg-danger .btn-close,
#notificationToast.bg-info .btn-close {
    filter: invert(1);
}

#notificationToast .toast-body {
    font-size: 14px;
}

@media (max-width: 768px) {
    #notificationToast {
        min-width: 250px;
    }
    
    #notificationToast .toast-body {
        font-size: 13px;
    }
}

/* 电脑端投注明细表格样式 */
#betDetailList .table-responsive {
    overflow-x: auto;
}

#betDetailList .table {
    white-space: nowrap;
}

#betDetailList .table th,
#betDetailList .table td {
    vertical-align: middle;
}

/* 手机端投注明细页面样式 */
@media (max-width: 768px) {
    /* 投注明细页面整体 */
    #betDetailSection {
        padding: 0 !important;
    }
    
    #betDetailSection .card {
        border-radius: 0 !important;
        margin-bottom: 8px !important;
    }
    
    #betDetailSection .card-header {
        padding: 8px 10px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    #betDetailSection .card-header h5 {
        font-size: 14px !important;
        margin-bottom: 0 !important;
    }
    
    #betDetailSection .card-header .d-flex {
        width: 100% !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
    }
    
    #betDetailSection .card-header .form-select,
    #betDetailSection .card-header .form-control {
        font-size: 12px !important;
        padding: 4px 24px 4px 8px !important;
        height: 32px !important;
        background-position: right 6px center !important;
    }
    
    #betDetailSection .card-body {
        padding: 8px !important;
    }
    
    /* 统计卡片 - 两行三列 */
    #betDetailList .row.mb-3 {
        margin-bottom: 8px !important;
    }
    
    #betDetailList .row.mb-3 > div {
        padding: 3px !important;
    }
    
    #betDetailList .row.mb-3 .card {
        border-radius: 6px !important;
        margin-bottom: 0 !important;
    }
    
    #betDetailList .row.mb-3 .card-body {
        padding: 6px 4px !important;
    }
    
    #betDetailList .row.mb-3 .card-body .small,
    #betDetailList .row.mb-3 .card-body .text-muted {
        font-size: 9px !important;
    }
    
    #betDetailList .row.mb-3 .card-body .fw-bold {
        font-size: 11px !important;
    }
    
    /* 投注明细表格 */
    #betDetailList .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #betDetailList .table {
        font-size: 10px !important;
        min-width: 500px !important;
    }
    
    #betDetailList .table th,
    #betDetailList .table td {
        padding: 4px 3px !important;
        vertical-align: middle !important;
        white-space: nowrap !important;
    }
    
    #betDetailList .table th {
        font-size: 9px !important;
    }
    
    #betDetailList .table .badge {
        font-size: 8px !important;
        padding: 2px 4px !important;
    }
    
    /* 号码列允许换行 */
    #betDetailList .table td:nth-child(4),
    #betDetailList .table td:nth-child(5) {
        white-space: normal !important;
        word-break: break-all !important;
        max-width: 120px !important;
        font-size: 9px !important;
    }
    
    #betDetailList .table .btn-sm {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
}

@media (max-width: 480px) {
    #betDetailSection .card-header h5 {
        font-size: 13px !important;
    }
    
    #betDetailSection .card-header .form-select,
    #betDetailSection .card-header .form-control {
        font-size: 11px !important;
        padding: 3px 22px 3px 6px !important;
        height: 28px !important;
        background-position: right 5px center !important;
    }
    
    #betDetailList .row.mb-3 .card-body .small,
    #betDetailList .row.mb-3 .card-body .text-muted {
        font-size: 8px !important;
    }
    
    #betDetailList .row.mb-3 .card-body .fw-bold {
        font-size: 10px !important;
    }
    
    #betDetailList .table {
        font-size: 9px !important;
        min-width: 450px !important;
    }
    
    #betDetailList .table th {
        font-size: 8px !important;
    }
    
    #betDetailList .table th,
    #betDetailList .table td {
        padding: 3px 2px !important;
    }
    
    #betDetailList .table .badge {
        font-size: 7px !important;
        padding: 1px 3px !important;
    }
    
    #betDetailList .table td:nth-child(4),
    #betDetailList .table td:nth-child(5) {
        max-width: 100px !important;
        font-size: 8px !important;
    }
}

/* ========== 历史开奖页面手机端自适应 ========== */
@media (max-width: 768px) {
    /* 历史页面卡片头部 */
    #historySection .card-header {
        padding: 8px 10px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    
    #historySection .card-header h5 {
        font-size: 14px !important;
        margin-bottom: 0 !important;
    }
    
    #historySection .card-header .btn {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
    
    #historySection .card-body {
        padding: 8px !important;
    }
    
    /* 历史开奖表格 */
    #drawHistory .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #drawHistory .table {
        font-size: 11px !important;
        min-width: 100% !important;
    }
    
    #drawHistory .table th,
    #drawHistory .table td {
        padding: 6px 4px !important;
        vertical-align: middle !important;
    }
    
    #drawHistory .table th {
        font-size: 10px !important;
        white-space: nowrap !important;
    }
    
    /* 开奖号码球 - 手机端缩小 */
    #drawHistory .number-ball-container {
        margin: 1px !important;
    }
    
    #drawHistory .number-ball {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
    
    #drawHistory .number-ball.ball-special {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
    }
    
    #drawHistory .shengxiao-label {
        font-size: 8px !important;
    }
    
    #drawHistory .table .badge {
        font-size: 9px !important;
        padding: 2px 4px !important;
    }
    
    /* 盈亏显示 */
    #drawHistory .text-success,
    #drawHistory .text-danger {
        font-size: 10px !important;
    }
    
    /* 投注统计卡片 - 手机端一行显示4个 */
    #betStats .row {
        display: flex !important;
        flex-wrap: nowrap !important;
    }
    
    #betStats .row > div {
        flex: 1 !important;
        max-width: 25% !important;
        padding: 0 3px !important;
    }
    
    #betStats .stat-card {
        padding: 8px 2px !important;
    }
    
    #betStats .stat-card i {
        font-size: 20px !important;
        margin-bottom: 4px !important;
    }
    
    #betStats .stat-card h4 {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }
    
    #betStats .stat-card p {
        font-size: 9px !important;
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    #historySection .card-header h5 {
        font-size: 13px !important;
    }
    
    #historySection .card-header .btn {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
    
    #drawHistory .table {
        font-size: 10px !important;
    }
    
    #drawHistory .table th {
        font-size: 9px !important;
    }
    
    #drawHistory .table th,
    #drawHistory .table td {
        padding: 4px 2px !important;
    }
    
    /* 开奖号码球 - 小屏幕更小 */
    #drawHistory .number-ball {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }
    
    #drawHistory .number-ball.ball-special {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
    
    #drawHistory .shengxiao-label {
        font-size: 7px !important;
    }
    
    #drawHistory .table .badge {
        font-size: 8px !important;
        padding: 1px 3px !important;
    }
    
    #drawHistory .text-success,
    #drawHistory .text-danger {
        font-size: 9px !important;
    }
    
    /* 投注统计卡片 - 小屏幕更紧凑 */
    #betStats .row > div {
        padding: 0 2px !important;
    }
    
    #betStats .stat-card {
        padding: 6px 1px !important;
    }
    
    #betStats .stat-card i {
        font-size: 16px !important;
        margin-bottom: 2px !important;
    }
    
    #betStats .stat-card h4 {
        font-size: 10px !important;
        margin-bottom: 1px !important;
    }
    
    #betStats .stat-card p {
        font-size: 8px !important;
    }
}


/* ========== 结算页面投注明细卡片样式 ========== */
#myBetDetailCard {
    margin-top: 15px;
}

#myBetDetailCard .card-header {
    padding: 10px 15px;
}

#myBetDetailCard .card-header h6 {
    margin: 0;
    font-size: 16px;
}

#settlementBetDetailList .table {
    margin-bottom: 0;
}

#settlementBetDetailList .table th,
#settlementBetDetailList .table td {
    font-size: 13px;
    padding: 8px 10px;
}

/* 电脑端结算页面投注明细表格样式 */
.settlement-bet-table {
    table-layout: fixed;
    width: 100%;
}

/* 号码列样式 - 限制宽度并允许换行 */
.settlement-bet-table th:nth-child(5),
.settlement-bet-table td:nth-child(5) {
    width: 35%;
    max-width: 300px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 号码单元格内容样式 */
.numbers-cell {
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
}

/* 其他列固定宽度 */
.settlement-bet-table th:nth-child(1),
.settlement-bet-table td:nth-child(1) {
    width: 50px;
}

.settlement-bet-table th:nth-child(2),
.settlement-bet-table td:nth-child(2) {
    width: 45px;
}

.settlement-bet-table th:nth-child(3),
.settlement-bet-table td:nth-child(3) {
    width: 40px;
}

.settlement-bet-table th:nth-child(4),
.settlement-bet-table td:nth-child(4) {
    width: 55px;
}

.settlement-bet-table th:nth-child(6),
.settlement-bet-table td:nth-child(6) {
    width: 70px;
}

.settlement-bet-table th:nth-child(7),
.settlement-bet-table td:nth-child(7) {
    width: 60px;
}

.settlement-bet-table th:nth-child(8),
.settlement-bet-table td:nth-child(8) {
    width: 55px;
}

/* 赔率信息默认样式 */
.bet-odds-info {
    font-size: 11px;
    display: inline;
}

/* 手机端结算页面投注明细样式 */
@media (max-width: 768px) {
    #myBetDetailCard {
        margin-top: 10px;
        border-radius: 0 !important;
    }
    
    #myBetDetailCard .card-header {
        padding: 8px 10px !important;
    }
    
    #myBetDetailCard .card-header h6 {
        font-size: 14px !important;
    }
    
    #settlementBetDetailList .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 手机端隐藏状态列 */
    .settlement-bet-table .hide-on-mobile {
        display: none !important;
    }
    
    /* 手机端禁用横向滚动，让表格自动换行 */
    #settlementBetDetailList {
        overflow-x: hidden !important;
    }
    
    /* 投注明细表格自适应 */
    .settlement-bet-table {
        font-size: 11px !important;
        width: 100% !important;
        table-layout: fixed !important;
    }
    
    .settlement-bet-table th,
    .settlement-bet-table td {
        padding: 5px 4px !important;
        vertical-align: middle !important;
    }
    
    .settlement-bet-table th {
        font-size: 10px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }
    
    .settlement-bet-table .badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    
    /* 号码列允许换行 - 使用table-layout:fixed时需要设置宽度 */
    .settlement-bet-table th:nth-child(5),
    .settlement-bet-table td:nth-child(5) {
        width: auto !important;
        word-break: break-word !important;
        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
        font-size: 10px !important;
        line-height: 1.4 !important;
    }
    
    /* 号码列中的赔率信息缩小 */
    .bet-odds-info {
        font-size: 8px !important;
        line-height: 1.2 !important;
    }
    
    /* 金额列紧凑显示 */
    .settlement-bet-table td:nth-child(6),
    .settlement-bet-table td:nth-child(7),
    .settlement-bet-table td:nth-child(8) {
        font-size: 10px !important;
        white-space: nowrap !important;
    }
    
    .settlement-bet-table .rebate-amount {
        display: inline-block;
    }
    
    /* 统计行样式 */
    #settlementBetDetailList > div:last-child {
        font-size: 12px !important;
        padding: 8px !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 480px) {
    #myBetDetailCard .card-header h6 {
        font-size: 13px !important;
    }
    
    .settlement-bet-table {
        font-size: 10px !important;
    }
    
    .settlement-bet-table th {
        font-size: 9px !important;
        padding: 4px 2px !important;
    }
    
    .settlement-bet-table td {
        padding: 4px 2px !important;
        font-size: 9px !important;
    }
    
    .settlement-bet-table .badge {
        font-size: 8px !important;
        padding: 1px 3px !important;
    }
    
    .settlement-bet-table th:nth-child(5),
    .settlement-bet-table td:nth-child(5) {
        font-size: 9px !important;
        line-height: 1.3 !important;
        word-break: break-word !important;
        white-space: pre-wrap !important;
        overflow-wrap: anywhere !important;
    }
    
    /* 号码列中的赔率信息更小 */
    .bet-odds-info {
        font-size: 7px !important;
    }
    
    /* 统计行样式 */
    #settlementBetDetailList > div:last-child {
        font-size: 11px !important;
        padding: 6px !important;
    }
}

/* ==================== 历史记录页面样式 ==================== */

/* 用户列表项 */
.history-user-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.history-user-item:hover {
    background: #f8f9fa;
}

.history-user-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.history-user-item.active .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.history-user-item .user-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-user-item .user-role {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(0,0,0,0.1);
}

.history-user-item.active .user-role {
    background: rgba(255,255,255,0.2);
}

.history-user-item .user-stats {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

/* 子用户缩进 */
.history-user-item.level-1 { padding-left: 15px; }
.history-user-item.level-2 { padding-left: 30px; }
.history-user-item.level-3 { padding-left: 45px; }
.history-user-item.level-4 { padding-left: 60px; }

/* 展开/收起图标 */
.history-user-item .toggle-icon {
    cursor: pointer;
    width: 20px;
    text-align: center;
}

/* 历史详情卡片 */
.history-draw-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.history-draw-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.history-draw-header:hover {
    background: linear-gradient(135deg, #e8ecf1 0%, #d8dce0 100%);
}

.history-draw-header.hongkong {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ec 100%);
}

.history-draw-header.hongkong:hover {
    background: linear-gradient(135deg, #ffe8ec 0%, #ffd6dc 100%);
}

.history-draw-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.history-draw-date {
    font-weight: 600;
    color: #333;
    font-size: 18px;
}

.history-draw-number {
    font-size: 17px;
    color: #666;
}

.history-draw-region {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #007bff;
    color: white;
}

.history-draw-region.hongkong {
    background: #FB718F;
}

/* 开奖号码显示 */
.history-draw-result {
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-result-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

/* 号码球容器 - 用于垂直排列号码和生肖 */
.history-result-ball-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin: 0 2px;
}

/* 生肖标签 */
.history-result-zodiac {
    font-size: 11px;
    color: #333;
    font-weight: bold;
    margin-top: 2px;
    white-space: nowrap;
}

/* 波色颜色 */
.history-result-ball.bose-red {
    background: #FF0000;
}

.history-result-ball.bose-blue {
    background: #0066FF;
}

.history-result-ball.bose-green {
    background: #00AA00;
}

/* 特码球 - 和普通球一样大 */
.history-result-ball.special {
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.history-result-plus {
    font-weight: bold;
    color: #FF0000;
    font-size: 18px;
    margin: 0 5px;
}

/* 投注汇总 */
.history-draw-summary {
    display: flex;
    gap: 20px;
    font-size: 18px;
}

.history-draw-summary .bet-amount {
    color: #007bff;
}

.history-draw-summary .win-amount {
    color: #28a745;
}

.history-draw-summary .rebate-amount {
    color: #ff9800;
}

.history-draw-summary .profit {
    font-weight: 600;
}

.history-draw-summary .profit.positive {
    color: #28a745;
}

.history-draw-summary .profit.negative {
    color: #dc3545;
}

/* 投注详情 */
.history-draw-body {
    padding: 15px;
    background: #fafafa;
    display: none;
}

.history-draw-body.show {
    display: block;
}

.history-bet-table {
    width: 100%;
    font-size: 13px;
}

.history-bet-table th {
    background: #f0f0f0;
    padding: 8px 10px;
    text-align: left;
    font-weight: 500;
}

.history-bet-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.history-bet-table tr:last-child td {
    border-bottom: none;
}

/* 汇总统计卡片 */
.history-summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.history-summary-card .summary-title {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 15px;
}

.history-summary-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.history-summary-stats .stat-item {
    flex: 1;
}

.history-summary-stats .stat-value {
    font-size: 24px;
    font-weight: bold;
}

.history-summary-stats .stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* 手机端适配 */
@media (max-width: 768px) {
    /* 手机端历史页面保持左右布局 */
    #historySection .row.g-0 {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }
    
    #historyUserListCol {
        display: block !important;
        width: 120px !important;
        min-width: 120px !important;
        flex: 0 0 120px !important;
        max-width: 120px !important;
    }
    
    #historyUserListCol .p-2 {
        padding: 4px !important;
    }
    
    #historyUserListCol #historyUserSearch {
        font-size: 11px !important;
        padding: 4px 6px !important;
    }
    
    #historyUserList {
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
    }
    
    #historyDetailCol {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
    
    /* 手机端隐藏用户选择下拉框 */
    #historyMobileUserSelect {
        display: none !important;
    }
    
    /* 手机端历史详情区域自适应 */
    #historyDetail {
        max-height: calc(100vh - 200px) !important;
        overflow-y: auto !important;
        padding: 8px !important;
    }
    
    /* 历史页面卡片 */
    #historySection .card-body {
        overflow: hidden !important;
    }
    
    /* 用户列表项手机端样式 - 更紧凑 */
    .history-user-item {
        padding: 6px 4px !important;
    }
    
    .history-user-item .user-name {
        font-size: 11px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .history-user-item .user-name .toggle-icon,
    .history-user-item .user-name > span:first-child {
        width: 14px !important;
        min-width: 14px !important;
    }
    
    .history-user-item .user-name i {
        font-size: 10px !important;
    }
    
    .history-user-item .user-role {
        font-size: 9px !important;
        padding: 1px 3px !important;
    }
    
    .history-user-item .user-stats {
        font-size: 9px !important;
    }
    
    /* 子级用户缩进减小 */
    .history-user-item.level-1 {
        padding-left: 8px !important;
    }
    
    .history-user-item.level-2 {
        padding-left: 12px !important;
    }
    
    .history-draw-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 6px 8px !important;
    }
    
    /* 手机端开奖信息一行显示 */
    .history-draw-info {
        flex-wrap: nowrap !important;
        gap: 3px !important;
        width: 100%;
    }
    
    .history-draw-date {
        font-size: 9px !important;
        white-space: nowrap;
    }
    
    .history-draw-number {
        font-size: 8px !important;
        white-space: nowrap;
    }
    
    .history-draw-region {
        font-size: 7px !important;
        padding: 1px 3px !important;
        white-space: nowrap;
    }
    
    /* 开奖号码球缩小 */
    .history-draw-result {
        gap: 2px !important;
    }
    
    .history-result-ball {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
    }
    
    .history-result-ball.special {
        width: 16px !important;
        height: 16px !important;
        font-size: 8px !important;
    }
    
    .history-result-ball-container {
        margin: 0 1px !important;
    }
    
    .history-result-zodiac {
        font-size: 7px !important;
        margin-top: 1px !important;
    }
    
    .history-result-plus {
        font-size: 8px !important;
        margin: 0 1px !important;
    }
    
    /* 投注汇总一行显示 */
    .history-draw-summary {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 8px !important;
        width: 100%;
    }
    
    .history-draw-summary span {
        white-space: nowrap;
    }
    
    .history-draw-summary .profit {
        font-size: 9px !important;
    }
    
    .history-draw-summary i {
        font-size: 8px !important;
    }
    
    .history-summary-stats .stat-value {
        font-size: 10px !important;
    }
    
    .history-summary-stats .stat-label {
        font-size: 7px !important;
    }
    
    .history-summary-card {
        padding: 6px !important;
    }
    
    .history-summary-card .summary-title {
        font-size: 9px !important;
        margin-bottom: 5px !important;
    }
    
    .history-summary-stats {
        gap: 1px !important;
    }
    
    .history-summary-stats .stat-item {
        min-width: 0 !important;
    }
    
    /* 历史投注记录表格自适应 */
    #historyDetail .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    #historyDetail .table {
        font-size: 10px !important;
    }
    
    #historyDetail .table th,
    #historyDetail .table td {
        padding: 4px 3px !important;
        white-space: nowrap !important;
    }
    
    /* 历史投注详情表格 */
    .history-bet-table {
        font-size: 8px !important;
        table-layout: fixed !important;
        width: 100% !important;
    }
    
    /* 手机端表格列宽 */
    .history-bet-table th:nth-child(1),
    .history-bet-table td:nth-child(1) {
        width: 50px !important;
    }
    
    .history-bet-table th:nth-child(2),
    .history-bet-table td:nth-child(2) {
        width: auto !important;
    }
    
    .history-bet-table th:nth-child(3),
    .history-bet-table td:nth-child(3) {
        width: 45px !important;
    }
    
    .history-bet-table th:nth-child(5),
    .history-bet-table td:nth-child(5) {
        width: 35px !important;
    }
    
    .history-bet-table th {
        padding: 3px 2px !important;
        font-size: 7px !important;
    }
    
    .history-bet-table td {
        padding: 3px 2px !important;
        font-size: 7px !important;
        white-space: normal !important;
        word-break: break-all !important;
    }
    
    /* 手机端隐藏状态列 */
    .history-bet-table .status-col {
        display: none !important;
    }
    
    .history-draw-body {
        padding: 4px !important;
    }
}

/* PC端隐藏手机端用户选择 */
@media (min-width: 769px) {
    #historyMobileUserSelect {
        display: none !important;
    }
}

/* ========== 协议页面样式 ========== */

/* 手机端协议页面 */
@media (max-width: 768px) {
    #agreementSection {
        padding: 5px !important;
    }
    
    #agreementSection .card {
        max-height: calc(100vh - 10px) !important;
        height: auto !important;
    }
    
    #agreementSection .card-header {
        padding: 6px !important;
    }
    
    #agreementSection .card-header h5 {
        font-size: 14px !important;
    }
    
    #agreementSection .card-body.agreement-content {
        font-size: 10px !important;
        line-height: 1.25 !important;
        padding: 6px !important;
    }
    
    #agreementSection .card-body.agreement-content p {
        margin-bottom: 2px !important;
    }
    
    #agreementSection .card-body.agreement-content h6 {
        font-size: 11px !important;
        margin-top: 6px !important;
        margin-bottom: 4px !important;
    }
    
    #agreementSection .card-footer {
        padding: 6px !important;
    }
    
    #agreementSection .card-footer .btn {
        padding: 5px 14px !important;
        font-size: 13px !important;
    }
}

/* 更小屏幕 */
@media (max-width: 480px) {
    #agreementSection .card-header {
        padding: 5px !important;
    }
    
    #agreementSection .card-header h5 {
        font-size: 13px !important;
    }
    
    #agreementSection .card-body.agreement-content {
        font-size: 9px !important;
        line-height: 1.2 !important;
        padding: 5px !important;
    }
    
    #agreementSection .card-body.agreement-content p {
        margin-bottom: 1px !important;
    }
    
    #agreementSection .card-body.agreement-content h6 {
        font-size: 10px !important;
        margin-top: 4px !important;
        margin-bottom: 2px !important;
    }
    
    #agreementSection .card-footer {
        padding: 5px !important;
    }
    
    #agreementSection .card-footer .btn {
        padding: 4px 12px !important;
        font-size: 12px !important;
    }
}
