/* ========== ssq_index.css - 福彩双色球专用样式（倒计时无背景版） ========== */
:root {
    --fc-red: #E4393C;      /* 福彩红 */
    --fc-blue: #1E88E5;     /* 福彩蓝 */
    --fc-gold: #F8B500;     /* 金色点缀 */
    --fc-dark: #2C3E50;     /* 深色文字 */
    --fc-light-bg: #F5F7FA; /* 背景灰 */
    --fc-card-bg: #FFFFFF;  /* 卡片白 */
    --fc-border: #E0E6ED;   /* 边框色 */
    --fc-success: #27AE60;  /* 成功绿 */
    --fc-danger: #E74C3C;   /* 警告红 */
}

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

body {
    background: var(--fc-light-bg);
    font-family: 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    padding-top: 0;
    padding-bottom: 65px;
    line-height: 1.5;
    min-height: 100vh;
    color: var(--fc-dark);
}

/* ========== 容器和卡片 ========== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

.card {
    background: var(--fc-card-bg);
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(228, 57, 60, 0.08);
    border: 1px solid var(--fc-border);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(145deg, var(--fc-red), #C62828);
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    border-bottom: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-header::before {
    content: "🎰 ";
    font-size: 16px;
}

.card-body {
    padding: 16px;
}

/* ========== 开奖信息 ========== */
.countdown {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    background: none;
    padding: 0;
    border-radius: 0;
}

.timer {
    color: var(--fc-red);
    font-weight: bold;
    font-size: 20px;
    margin-left: 5px;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    background: none;
    padding: 0;
    border-radius: 0;
}

.lottery-result {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 16px 0;
    flex-wrap: nowrap;
    overflow: hidden;
}

.ball-red, .ball-blue {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    border: 2px solid white;
    flex-shrink: 0;
}

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

.ball-blue {
    background: radial-gradient(circle at 30% 30%, #6AB0FF, var(--fc-blue));
}

/* 历史记录中的小球略小 */
.history-table .ball-red,
.history-table .ball-blue {
    width: 24px;
    height: 24px;
    font-size: 11px;
    margin: 0 2px;
    border-width: 1px;
}

/* ========== 投注选择器 - 固定行数布局 ========== */
.selector-section {
    margin-bottom: 20px;
}

.selector-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
    color: var(--fc-dark);
    border-left: 4px solid var(--fc-gold);
    padding-left: 12px;
}

/* 外层容器改为列方向 */
.ball-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

/* 每一行使用flex nowrap，使球不换行 */
.ball-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

/* 球的基本样式，宽度按比例分配，配合媒体查询控制最小尺寸 */
.ball-option {
    flex: 1 1 0;                /* 平均分配宽度 */
    min-width: 28px;            /* 限制最小宽度，防止过小 */
    max-width: 40px;            /* 限制最大宽度，防止过大 */
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border: 2px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ball-option.red {
    background: #FFF2F2;
    color: var(--fc-red);
    border-color: #FFCDD2;
}

.ball-option.red.selected {
    background: var(--fc-red);
    color: white;
    border-color: var(--fc-red);
    box-shadow: 0 6px 12px rgba(228,57,60,0.3);
    transform: scale(1.08);
}

.ball-option.blue {
    background: #E8F0FE;
    color: var(--fc-blue);
    border-color: #BBDEFB;
}

.ball-option.blue.selected {
    background: var(--fc-blue);
    color: white;
    border-color: var(--fc-blue);
    box-shadow: 0 6px 12px rgba(30,136,229,0.3);
    transform: scale(1.08);
}

/* 对于超小屏幕，进一步缩小球的最小宽度 */
@media (max-width: 480px) {
    .ball-option {
        min-width: 22px;
        height: 30px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .ball-option {
        min-width: 20px;
        height: 26px;
        font-size: 10px;
    }
}

.multiple-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid var(--fc-border);
    border-radius: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.multiple-input:focus {
    border-color: var(--fc-red);
    box-shadow: 0 0 0 4px rgba(228,57,60,0.15);
}

/* 加减按钮样式 */
.step-btn {
    width: 36px;
    height: 36px;
    background: #f0f2f5;
    border: none;
    font-size: 20px;
    font-weight: 600;
    color: var(--fc-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.step-btn:hover {
    background: #e0e4e9;
}
.step-btn:active {
    background: #d0d4da;
}

/* 机选按钮样式 */
.random-btn {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(52,152,219,0.3);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.random-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(52,152,219,0.4);
}

/* 机选列表样式 */
.random-list {
    background: #f8fafd;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--fc-border);
    margin-top: 10px;
}
.random-ticket {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}
.random-ticket:last-child {
    border-bottom: none;
}
.use-ticket-btn {
    background: white;
    border: 1px solid var(--fc-red);
    color: var(--fc-red);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-left: auto;
    transition: all 0.2s;
}
.use-ticket-btn:hover {
    background: var(--fc-red);
    color: white;
}

/* ========== 投注摘要 ========== */
.bet-summary {
    background: #F8FAFD;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0 15px;
    border: 1px solid var(--fc-border);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.02);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
}

.summary-row:last-child {
    margin-bottom: 0;
    font-weight: 700;
    color: var(--fc-red);
    font-size: 18px;
}

.bet-button {
    background: linear-gradient(145deg, var(--fc-red), #B71C1C);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 8px rgba(228,57,60,0.3);
    transition: all 0.2s;
    margin-top: 10px;
}

.bet-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(228,57,60,0.4);
}

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

.error-message {
    background: #FDEDEE;
    color: var(--fc-danger);
    padding: 12px 18px;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid #F5B7B1;
    font-weight: 600;
    font-size: 15px;
}

.success-message {
    background: #E8F5E9;
    color: var(--fc-success);
    padding: 12px 18px;
    border-radius: 8px;
    margin: 12px 0;
    border: 1px solid #A5D6A7;
    font-weight: 600;
    font-size: 15px;
}

/* ========== 表格 ========== */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--fc-border);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: white;
}

.history-table th {
    background: #F0F3F8;
    padding: 10px 6px;
    font-weight: 600;
    color: #2C3E50;
    border-bottom: 1px solid var(--fc-border);
    white-space: nowrap;
    font-size: 13px;
}

.history-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #ECF0F1;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-table tr:last-child td {
    border-bottom: none;
}

.type-box {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    color: white;
}

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

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

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    background: white;
    border: 1px solid #E0E6ED;
    border-radius: 6px;
    color: #2C3E50;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn.active {
    background: var(--fc-red);
    border-color: var(--fc-red);
    color: white;
    box-shadow: 0 3px 6px rgba(228,57,60,0.2);
}

.page-btn:hover:not(.active) {
    border-color: var(--fc-red);
    color: var(--fc-red);
}

/* ========== 底部导航 ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: white;
    border-top: 2px solid #E0E6ED;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.bottom-nav .nav-content {
    display: flex;
    width: 100%;
    max-width: 500px;
    height: 100%;
    align-items: center;
    justify-content: space-around;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: none;
    border: none;
    color: #7F8C8D;
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
    gap: 4px;
}

.nav-btn i {
    font-size: 1.4rem;
    color: #95A5A6;
    transition: color 0.2s;
}

.nav-btn.active,
.nav-btn.active i {
    color: var(--fc-red);
}

.nav-btn span {
    font-size: 0.7rem;
}


/* 新增样式：操作按钮、复选框等 */
.action-btn {
    background: white;
    border: 1px solid var(--fc-red);
    color: var(--fc-red);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.action-btn:hover {
    background: var(--fc-red);
    color: white;
}
#random-list-container {
    background: #f8fafd;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--fc-border);
}
.random-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}
.random-ticket {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}
.random-ticket:last-child {
    border-bottom: none;
}
.ticket-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.ticket-index {
    font-weight: 600;
    min-width: 24px;
    color: var(--fc-dark);
}
#select-all {
    width: 18px;
    height: 18px;
    margin-right: 4px;
}

