/* index_1_tw.css - 福彩风格版（优化尺寸V2，已移除头部冲突样式） */

/* 确保底部导航不遮挡内容 */
body {
    padding-bottom: 50px !important;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 45px !important;
    }
}

@media (max-width: 480px) {
    body {
        padding-bottom: 40px !important;
    }
}

/* 悬浮对话框调整 - 确保不会太宽 */
@media (max-width: 480px) {
    .chat-dialog {
        max-width: calc(100vw - 15px) !important;
        left: 8px !important;
        right: 8px !important;
        transform: none !important;
    }
}

/* 福彩风格配色 */
:root {
    --primary: #e4393c; /* 福彩红 */
    --secondary: #d6b85a; /* 福彩金 */
    --danger: #c20c0c; /* 深红 */
    --success: #e4393c; /* 使用红色作为成功色 */
    --warning: #ff9900; /* 橙色 */
    --bg-gradient: linear-gradient(135deg, #e4393c 0%, #c20c0c 100%); /* 福彩渐变 */
    --gold-gradient: linear-gradient(135deg, #d6b85a 0%, #b8941f 100%); /* 金色渐变 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #f9f3e9 0%, #f5e6d3 100%);
    font-family: -apple-system, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
    padding-top: 45px; /* 为固定导航预留空间，但导航已由 head.php 接管，此值需根据实际情况调整 */
    line-height: 1.35;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #333;
    font-size: 13px;
}

body.loaded {
    opacity: 1;
}

/* ===== 注意：导航栏样式已移至 head.php，此处不再定义 ===== */
/* 原 .navbar, .nav-content, .logo, .user-area, .user-info, .score-display, .username, .login-link 等已移除 */

/* 容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 6px;
}

/* 卡片 - 福彩风格（尺寸优化V2） */
.card {
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(228, 57, 60, 0.1);
    transform: translateY(12px);
    opacity: 0;
    animation: fadeInUp 0.35s ease forwards;
    border: 1px solid #f0e6d3;
}

.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.card-header {
    background: var(--bg-gradient);
    color: white;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    letter-spacing: 0.2px;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--secondary);
}

.card-body {
    padding: 12px;
}

/* 倒计时 */
.countdown {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.timer {
    color: var(--primary);
    font-weight: bold;
    font-size: 18px;
    margin-left: 3px;
    white-space: nowrap;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

/* 开奖结果 */
.lottery-result {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 12px 0;
    overflow: hidden;
}

.ball {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    min-width: 34px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 1px solid white;
}

.red-ball { 
    background: var(--primary);
    background: radial-gradient(circle at 30% 30%, #ff6b6b, var(--primary));
}

.blue-ball { 
    background: #2c3e50;
    background: radial-gradient(circle at 30% 30%, #4a6491, #2c3e50);
}

.result-type-box {
    background: var(--secondary);
    color: #333;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    margin-left: 4px;
    flex-shrink: 0;
    white-space: nowrap;
    min-width: 34px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(214, 184, 90, 0.3);
    border: 1px solid #c9a95a;
}

/* 最近开奖 */
.recent-title {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin: 12px 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    position: relative;
    padding-bottom: 4px;
}

.recent-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background: var(--secondary);
    border-radius: 1px;
}

.recent-numbers {
    display: flex;
    justify-content: center;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
}

.recent-number {
    min-width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: linear-gradient(135deg, #f8f4e9 0%, #f2e9d7 100%);
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
    color: #333;
    border: 1px solid #e6d9b8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 投注选项卡 */
.bet-tabs {
    display: flex;
    border-bottom: 1px solid #f0e6d3;
    background: #fdfaf5;
    border-radius: 6px 6px 0 0;
    padding: 2px 2px 0;
}

.bet-tab {
    flex: 1;
    padding: 10px 8px;
    text-align: center;
    font-weight: 600;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    border-radius: 4px 4px 0 0;
    position: relative;
}

.bet-tab.active {
    color: var(--primary);
    background: white;
    border-bottom: 2px solid var(--primary);
    margin-bottom: -1px;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
}

.bet-tab:hover:not(.active) {
    background-color: rgba(228, 57, 60, 0.08);
    color: var(--primary);
}

/* 投注选项 */
.bet-options {
    padding: 12px;
    overflow: hidden;
    background: white;
}

/* 组投注 - 两行布局（尺寸优化V2） */
.group-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.group-option {
    padding: 8px 4px;
    background: linear-gradient(135deg, #f8f4e9 0%, #f2e9d7 100%);
    border: 1px solid #e6d9b8;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease;
    min-width: 0;
    color: #333;
    position: relative;
}

.group-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--secondary);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.group-option.active {
    background: var(--bg-gradient);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(228, 57, 60, 0.25);
}

.group-option.active::before {
    opacity: 1;
}

.group-option:hover:not(.active) {
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(228, 57, 60, 0.15);
}

/* 单点投注 - 三行布局（尺寸优化V2） */
.single-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.single-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    width: 100%;
}

.single-option {
    padding: 6px 1px;
    background: linear-gradient(135deg, #f8f4e9 0%, #f2e9d7 100%);
    border: 1px solid #e6d9b8;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.15s ease;
    min-width: 0;
    color: #333;
}

.single-option.active {
    background: var(--bg-gradient);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(228, 57, 60, 0.25);
}

.single-option:hover:not(.active) {
    border-color: var(--primary);
    box-shadow: 0 1px 3px rgba(228, 57, 60, 0.15);
}

/* 已选投注 */
.selected-bet {
    background: linear-gradient(135deg, #fffaf0 0%, #fff5e6 100%);
    border-radius: 6px;
    padding: 10px 12px;
    margin: 10px 0;
    border-left: 3px solid var(--primary);
    display: none;
    animation: fadeIn 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0e6d3;
}

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

.selected-bet.show {
    display: block;
}

.selected-info {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.selected-item {
    min-width: 80px;
    flex-shrink: 0;
}

.selected-label {
    color: #666;
    font-size: 12px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.selected-value {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.win-amount {
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px;
    background: rgba(228, 57, 60, 0.08);
    border-radius: 4px;
    border: 1px dashed var(--primary);
}

/* 积分选择 */
.score-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0;
    padding: 0 4px;
    flex-wrap: nowrap;
    overflow: hidden;
}

.score-left, .score-right {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.score-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #f8f4e9 0%, #f2e9d7 100%);
    border: 1px solid #e6d9b8;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    min-width: 38px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    color: #333;
}

.score-btn.active {
    background: var(--bg-gradient);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(228, 57, 60, 0.25);
}

.score-btn:hover:not(.active) {
    border-color: var(--primary);
    box-shadow: 0 1px 3px rgba(228, 57, 60, 0.15);
}

.score-input-group {
    display: flex;
    flex-shrink: 0;
}

.score-input {
    width: 60px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #e6d9b8;
    border-left: none;
    border-right: none;
    padding: 6px;
    outline: none;
    white-space: nowrap;
    transition: border-color 0.15s ease;
    min-width: 0;
    background: #fff;
    color: #333;
    -moz-appearance: textfield;
}

.score-input::-webkit-outer-spin-button,
.score-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-input:focus {
    border-color: var(--primary);
}

.score-minus, .score-plus {
    padding: 6px 10px;
    background: linear-gradient(135deg, #f8f4e9 0%, #f2e9d7 100%);
    border: 1px solid #e6d9b8;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    min-width: 38px;
    color: #333;
}

.score-minus:hover, .score-plus:hover {
    background: var(--bg-gradient);
    color: white;
    border-color: var(--primary);
}

.score-minus { 
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.score-plus { 
    border-radius: 0 4px 4px 0;
    border-left: none;
}

/* 投注按钮 */
.bet-button {
    background: var(--bg-gradient);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
    white-space: nowrap;
    transition: all 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 6px rgba(228, 57, 60, 0.25);
    position: relative;
    letter-spacing: 0.3px;
}

.bet-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s ease;
}

.bet-button:hover::before {
    left: 100%;
}

.bet-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.bet-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(228, 57, 60, 0.35);
}

/* 投注期数提示 */
.betting-period {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
    border-left: 3px solid var(--primary);
    padding: 8px 12px;
    margin: 10px 0;
    font-size: 13px;
    color: #333;
    border-radius: 0 6px 6px 0;
    white-space: nowrap;
    animation: slideIn 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #ffcccc;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 投注成功提示 */
.bet-reminder {
    background: linear-gradient(135deg, #fff9e6 0%, #fff2cc 100%);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 10px 0;
    text-align: center;
    font-size: 11px;
    color: #856404;
    border: 1px solid #ffeaa7;
    line-height: 1.35;
    font-weight: 600;
}

.bet-reminder strong {
    color: var(--primary);
    font-weight: 600;
}

/* 历史记录表格 - 保持原有样式，仅调整颜色 */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: fixed;
}

.history-table th {
    background: #f8f9fa;
    padding: 6px 4px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #e8eaed;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.history-table td {
    padding: 4px 2px;
    border-bottom: 1px solid #f0f2f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* 历史表格列宽调整 - 新分配宽度比例 */
.history-table th:nth-child(1),
.history-table td:nth-child(1) { 
    width: 18% !important; /* 期号列 */
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) { 
    width: 44% !important; /* 开奖号码列 */
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) { 
    width: 25% !important; /* 预测列 */
}

.history-table th:nth-child(4),
.history-table td:nth-child(4) { 
    width: 13% !important; /* 结果列 */
}

.history-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-wrap: nowrap;
}

.small-ball {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 10px;
    flex-shrink: 0;
}

.type-box {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    min-width: 35px;
    text-align: center;
}

.red-box {
    background-color: #ff4757 !important;
    color: white !important;
}

.blue-box {
    background-color: #4facfe !important;
    color: white !important;
}

.grey-box {
    background-color: #6c757d !important;
    color: white !important;
}

/* 表格滚动容器 */
.table-scroll {
    overflow-x: hidden; /* 改为hidden防止水平滚动 */
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* 分页按钮 - 调小尺寸 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 3px 6px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
    min-height: 22px;
    line-height: 1;
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    padding: 3px 6px;
}

.page-btn:hover:not(.active):not(:disabled) {
    background: #f5f5f5;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 25px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 0;
    z-index: 1000;
    min-width: 100px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    animation: fadeIn 0.15s ease;
}

.dropdown-content a {
    display: block;
    padding: 4px 10px;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    white-space: nowrap;
    transition: background-color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-content a:hover {
    background: #f5f5f5;
}

/* 响应式优化 - 关键部分 */
@media (max-width: 768px) {
    .container {
        padding: 4px;
    }
    
    .card-header {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    /* 组投注 - 保证两行不换行 */
    .group-options {
        grid-template-columns: repeat(4, minmax(60px, 1fr));
        gap: 4px;
    }
    
    .group-option {
        padding: 6px 2px;
        font-size: 12px;
        min-width: 0;
    }
    
    /* 单点投注 - 三行布局适配 */
    .single-row {
        grid-template-columns: repeat(10, minmax(26px, 1fr));
        gap: 2px;
    }
    
    .single-option {
        padding: 4px 0;
        font-size: 11px;
        min-width: 0;
    }
    
    /* 卡片和文字不换行 */
    .card-header, .countdown, .timer, .recent-title, 
    .bet-tab, .group-option, .single-option, 
    .selected-label, .selected-value, .win-amount,
    .score-btn, .bet-button, .history-table th,
    .history-table td, .username, .score-display,
    .login-link, .result-type-box, .recent-number,
    .ball span, .selected-bet, .betting-period {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    /* 倒计时和按钮大小调整 */
    .timer {
        font-size: 16px;
    }
    
    .bet-button {
        padding: 12px;
        font-size: 15px;
    }
    
    /* 积分选择区域优化 */
    .score-section {
        gap: 4px;
    }
    
    .score-btn {
        min-width: 35px;
        padding: 4px 6px;
        font-size: 12px;
    }
    
    .score-input {
        width: 50px;
        font-size: 13px;
    }
    
    .score-minus, .score-plus {
        min-width: 35px;
        padding: 4px 8px;
    }
    
    /* 历史表格响应式 */
    .history-table {
        font-size: 10px;
    }
    
    .history-table th,
    .history-table td {
        padding: 3px 1px;
    }
    
    .history-table th:nth-child(1),
    .history-table td:nth-child(1) { width: 20% !important; }
    
    .history-table th:nth-child(2),
    .history-table td:nth-child(2) { width: 42% !important; }
    
    .history-table th:nth-child(3),
    .history-table td:nth-child(3) { width: 25% !important; }
    
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) { width: 13% !important; }
    
    .small-ball {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    /* 分页按钮响应式 */
    .pagination {
        gap: 2px;
        margin-top: 6px;
    }
    
    .page-btn {
        padding: 2px 4px;
        font-size: 10px;
        min-height: 20px;
        border-radius: 1px;
    }
    
    .page-btn.active {
        padding: 2px 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 3px;
    }
    
    /* 组投注 - 进一步缩小 */
    .group-options {
        grid-template-columns: repeat(4, minmax(50px, 1fr));
        gap: 3px;
    }
    
    .group-option {
        padding: 4px 1px;
        font-size: 11px;
        border-width: 1px;
    }
    
    /* 单点投注 - 进一步缩小 */
    .single-row {
        grid-template-columns: repeat(10, minmax(22px, 1fr));
        gap: 1px;
    }
    
    .single-option {
        padding: 3px 0;
        font-size: 10px;
        border-width: 1px;
    }
    
    /* 开奖结果球体大小 */
    .ball {
        width: 30px;
        height: 30px;
        font-size: 13px;
        min-width: 30px;
    }
    
    .result-type-box {
        padding: 3px 6px;
        font-size: 12px;
        min-width: 32px;
    }
    
    /* 倒计时 */
    .timer {
        font-size: 15px;
    }
    
    /* 最近开奖数字 */
    .recent-number {
        min-width: 26px;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
    }
    
    /* 投注选项卡 */
    .bet-tab {
        padding: 8px 4px;
        font-size: 13px;
    }
    
    /* 积分选择 */
    .score-btn {
        min-width: 32px;
        padding: 3px 4px;
        font-size: 11px;
    }
    
    .score-input {
        width: 45px;
        font-size: 12px;
        padding: 4px;
    }
    
    .score-minus, .score-plus {
        min-width: 32px;
        padding: 3px 6px;
        font-size: 13px;
    }
    
    .bet-button {
        padding: 10px;
        font-size: 14px;
    }
    
    /* 历史表格 */
    .history-table {
        font-size: 9px;
    }
    
    .history-table th,
    .history-table td {
        padding: 2px 1px;
    }
    
    .history-table th:nth-child(1),
    .history-table td:nth-child(1) { width: 22% !important; }
    
    .history-table th:nth-child(2),
    .history-table td:nth-child(2) { width: 40% !important; }
    
    .history-table th:nth-child(3),
    .history-table td:nth-child(3) { width: 25% !important; }
    
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) { width: 13% !important; }
    
    .small-ball {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
    
    /* 导航栏已在 head.php 中定义，此处不再需要，但保留 body 上边距可能需要调整 */
    /* 原导航栏相关样式已移除，但 body 的 padding-top 可能需要保留以适应固定头部 */
    
    /* 分页按钮响应式 */
    .pagination {
        gap: 1px;
        margin-top: 4px;
    }
    
    .page-btn {
        padding: 1px 3px;
        font-size: 9px;
        min-height: 18px;
        border-radius: 1px;
        border-width: 0.5px;
    }
    
    .page-btn.active {
        padding: 1px 3px;
    }
}

@media (max-width: 360px) {
    /* 极端小屏幕优化 */
    .group-options {
        grid-template-columns: repeat(4, minmax(45px, 1fr));
    }
    
    .group-option {
        padding: 3px 0;
        font-size: 10px;
    }
    
    .single-row {
        grid-template-columns: repeat(10, minmax(20px, 1fr));
    }
    
    .single-option {
        padding: 2px 0;
        font-size: 9px;
    }
    
    .ball {
        width: 28px;
        height: 28px;
        font-size: 12px;
        min-width: 28px;
    }
    
    .result-type-box {
        padding: 2px 4px;
        font-size: 11px;
        min-width: 30px;
    }
    
    .bet-tab {
        padding: 6px 2px;
        font-size: 12px;
    }
    
    .card-header {
        padding: 6px 8px;
        font-size: 13px;
    }
    
    /* 历史表格极端小屏幕优化 */
    .history-table th:nth-child(1),
    .history-table td:nth-child(1) { width: 24% !important; }
    
    .history-table th:nth-child(2),
    .history-table td:nth-child(2) { width: 38% !important; }
    
    .history-table th:nth-child(3),
    .history-table td:nth-child(3) { width: 25% !important; }
    
    .history-table th:nth-child(4),
    .history-table td:nth-child(4) { width: 13% !important; }
    
    .small-ball {
        width: 16px;
        height: 16px;
        font-size: 7px;
    }
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 强制不换行类 */
.no-wrap {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 预测和结果框样式 */
.prediction-container {
    display: flex;
    gap: 1px;
    justify-content: center;
}

.prediction-box {
    display: inline-block;
    padding: 1px 2px;
    border-radius: 1px;
    font-size: 8px;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
    color: white;
}

.prediction-red {
    background-color: #ff4757 !important;
}

.prediction-blue {
    background-color: #4facfe !important;
}

.result-box {
    display: inline-block;
    padding: 1px 2px;
    border-radius: 1px;
    font-size: 8px;
    font-weight: 600;
    min-width: 14px;
    text-align: center;
    color: white;
}

.result-red {
    background-color: #ff4757 !important;
}

.result-blue {
    background-color: #4facfe !important;
}

/* 自定义确认框样式 - 福彩风格（尺寸优化V2） */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.25s ease;
    padding: 8px;
}

.confirm-box {
    background: white;
    border-radius: 10px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(12px);
    animation: slideUp 0.25s ease forwards;
    border: 1px solid var(--secondary);
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

.confirm-header {
    background: var(--bg-gradient);
    color: white;
    padding: 14px 16px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    position: relative;
}

.confirm-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--secondary);
}

.confirm-body {
    padding: 16px 18px;
    max-height: 50vh;
    overflow-y: auto;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0e6d3;
}

.confirm-label {
    color: #666;
    font-weight: 600;
    font-size: 13px;
}

.confirm-value {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.confirm-value.highlight {
    color: var(--primary);
    font-size: 16px;
    font-weight: bold;
}

.confirm-footer {
    padding: 14px 16px;
    display: flex;
    gap: 10px;
    background: #fdfaf5;
}

.confirm-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.confirm-btn.cancel {
    background: linear-gradient(135deg, #f8f4e9 0%, #f2e9d7 100%);
    color: #333;
    border: 1px solid #e6d9b8;
}

.confirm-btn.cancel:hover {
    background: #e6d9b8;
    border-color: #d6b85a;
}

.confirm-btn.confirm {
    background: var(--bg-gradient);
    color: white;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 4px rgba(228, 57, 60, 0.25);
}

.confirm-btn.confirm:hover {
    box-shadow: 0 4px 8px rgba(228, 57, 60, 0.35);
}

.confirm-reminder {
    margin-top: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff2cc 100%);
    border-radius: 6px;
    border-left: 3px solid var(--warning);
    font-size: 12px;
    color: #856404;
    line-height: 1.35;
    font-weight: 600;
}

.reminder-icon {
    display: inline-block;
    background: var(--warning);
    color: white;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    margin-right: 6px;
    font-weight: bold;
    font-size: 11px;
}

/* ===== 游戏选择卡片样式已移至 head.php，此处不再定义 ===== */
/* 原 .game-selector-card, .game-selector-grid, .game-option 等已移除 */