/* --- 基础全局样式 --- */
:root {
    --primary: #1890ff;
    --red: #f5222d;
    --green: #52c41a;
    --blue: #1890ff;
    --orange: #fa8c16;
    --gray-dim: #bfbfbf;
    --text-main: #333;
    --text-gray: #666;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-radius: 8px;
}

body {
    background: url('../images/b-g.jpg') no-repeat center center fixed;
    background-size: cover;
    font-family: "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.main-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px;
    box-sizing: border-box;
}

/* --- 顶部导航与标签 --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #886800;
    color: #fff;
    padding: 12px 16px;
    /*border-radius: var(--border-radius);*/
    margin-bottom: 0px;
}

.tab-list {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.tab-link.active {
    background: var(--primary);
    color: #fff;
}

/* --- 筛选区域样式 --- */
.filter-section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filter-group {
    margin-bottom: 5px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-hint {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    background: #f0f2f5;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-main);
    transition: all 0.2s;
    user-select: none;
}

.filter-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
}

.btn-reset {
    background: #fff;
    color: var(--red);
    border-color: var(--red);
}
.btn-reset:hover {
    background: var(--red);
    color: #fff;
}

/* --- 【优化】单行卡片样式 --- */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 3px 18px;
    margin-bottom: 3px;
    overflow: hidden; /* 防止溢出 */
}

/* 主行容器：Flex布局 */
.lottery-row {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 两端对齐：左边是信息+平码，右边是特码 */
    width: 100%;
}

/* 左侧组合：包含期数、时间、平码 */
.left-section {
    display: flex;
    align-items: center;
    gap: 8px; /* 内部元素间距 */
    flex: 1; /* 占据剩余空间 */
    min-width: 0; /* 允许内容收缩 */
}

/* 期数和时间文本块 */
.info-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 70px; /* 固定最小宽度，防止挤压变形 */
    border-right: 1px solid #eee;
    padding-right: 8px;
    margin-right: 4px;
}

.period-text {
    font-weight: bold;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.2;
}

.time-text {
    color: var(--text-gray);
    font-size: 11px;
    line-height: 1.2;
    margin-top: 2px;
}

/* 平码区域 */
.normal-balls {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* 特码区域：独立在右侧 */
.special-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 10px; /* 与平码拉开距离 */
    position: relative;
}

/* 分隔线（可选，视觉上区分平码和特码） */
.separator {
    width: 1px;
    height: 24px;
    background: #eee;
    margin: 0 10px;
}

.ball-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.ball-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* 进一步缩小以适应一行 */
    height: 28px;
    border-radius: 50%;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.ball-num.red { background: var(--red); }
.ball-num.green { background: var(--green); }
.ball-num.blue { background: var(--blue); }

/* 特码球体样式 */
.ball-num.special {
    border: 2px solid #fff;
    transform: scale(1.1);
    width: 27px;
    height: 27px;
    font-size: 17px;
    box-shadow: 0 2px 5px rgba(250, 140, 22, 0.4);
}

/* 【新增】变灰/高亮失效样式 */
.ball-num.dimmed {
    background: var(--gray-dim) !important;
    border-color: #ccc !important;
    opacity: 0.3;
    transform: scale(0.85);
    box-shadow: none;
}

.ball-num.special.dimmed {
    transform: scale(0.9);
}

.special-label {
    position: absolute;
    top: 9px;
    left: -18px;
    background: #dc0e19;
    color: #fff;
    font-size: 9px;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: bold;
    line-height: 1;
    z-index: 1;
    transition: opacity 0.3s;
}

.ball-item.dimmed-item .special-label {
    opacity: 0.3;
}

.ball-zodiac {
    font-size: 10px;
    color: var(--text-gray);
    font-weight: 500;
    transition: color 0.3s;
    line-height: 1;
}

.special-zodiac {
    color: var(--orange);
    font-weight: bold;
    font-size: 11px;
}

.ball-item.dimmed-item .ball-zodiac {
    color: #ccc;
}

.empty-tip {
    text-align: center;
    color: #666;
    padding: 20px;
}

.footer-link {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}
.footer-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

/* 响应式：极小屏幕下的适配 */
@media (max-width: 375px) {
    .info-block {
        min-width: 60px;
    }
    .ball-num {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    .ball-num.special {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
    .normal-balls {
        gap: 4px;
    }
}
