* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 确保在移动设备上内容不会被遮挡 */
@media (max-width: 768px) {
    body {
        padding-bottom: 20px;
    }
    
    /* 确保主内容区域在手机上有合适的高度 */
    .main-content {
        min-height: calc(100vh - 400px);
    }
    
    /* 确保面板内容在手机上有合适的高度 */
    .panel-content {
        min-height: 200px;
    }
    
    /* 确保表格容器在手机上自适应高度 */
    .table-container {
        height: auto;
        overflow-y: visible;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.header {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.announcement-bar {
    display: block;
    overflow: hidden;
}

.announcement-content {
    width: 100%;
}

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.announcement-item {
    display: block;
    color: #ff0000;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
    border: 2px solid #ffc107;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
    position: relative;
    overflow: hidden;
}

.announcement-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 193, 7, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.announcement-item span {
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(76, 175, 80, 0.3);
    font-weight: 900;
    letter-spacing: 1px;
}

.announcement-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.25);
    text-decoration: none;
    color: #cc0000;
    border-color: #ff9800;
}

.announcement-item:hover span {
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
    transform: scale(1.08);
    color: #cc0000;
}

/* 确保shine动画存在 */
@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.header-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    color: #4caf50;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 0;
}

/* 滑动图片轮播模块样式 */
/* 轮播容器 */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 0;
    padding: 0; /* 移除左右 padding，消除缝隙 */
    /* 移除固定高度，改用 padding-bottom 或 min-height */
    /* height: 162px;  <-- 删除这行，因为如果图片加载慢，这里会是白屏 */
    min-height: 162px; /* 设置最小高度 */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    /* 修改背景色，避免露白缝 */
    background: transparent;
    /* Safari 修复: 强制硬件加速 */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    z-index: 1;
    /* 消除亚像素渲染导致的缝隙 */
    font-size: 0;
    line-height: 0;
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* 轮播轨道 */
.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 162px; /* 轨道需要固定高度 */
    width: 100%;
}

/* 轮播滑块 */
.carousel-slide {
    min-width: 100%;
    height: 100%;
    /* 恢复 Flex 布局以支持图片居中，但在 Safari 上可能需要特殊处理 */
    display: block; 
    position: relative;
}

/* 轮播图片 */
.carousel-slide img {
    /* 强制填满容器 */
    display: block;
    width: 100%;
    height: 100%;
    
    /* 强制拉伸不保持比例 */
    object-fit: fill;
    
    /* Safari 修复: 移除 flex 相关属性 */
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    
    /* 绝对定位 */
    position: absolute;
    top: -1px; /* 向上微调 */
    left: -1px; /* 向左微调 */
    width: calc(100% + 2px); /* 增加宽度 */
    height: calc(100% + 2px); /* 增加高度 */
    
    /* 微调：轻微放大以覆盖可能的边缘缝隙 */
    transform: scale(1.005);
    transform-origin: center center;
}

/* 移除特殊图片处理，统一使用 object-fit: contain */
/* 
.carousel-slide img[height][width] { ... }
.carousel-slide img[width] { ... }
*/

.carousel-slide img:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.carousel-image {
    width: 100%;
    height: 162px;
    max-height: 162px;
    object-fit: fill;
    border-radius: 8px;
}

/* 图片加载动画 */
.carousel-slide::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(76, 175, 80, 0.3);
    border-radius: 50%;
    border-top-color: #4caf50;
    animation: spin 1s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-slide {
        min-height: 162px;
    }
    
    .carousel-slide img {
        max-height: 162px;
    }
}

.carousel-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

/* 移除 .carousel-nav-btn 相关样式 */
.carousel-nav-btn {
    display: none;
}

.carousel-dots {
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: #4caf50;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background-color: rgba(255,255,255,0.8);
}

.nav {
    background: url('nav_bg.jpg') no-repeat center center;
    background-size: cover;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.nav::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 5s infinite;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.nav ul li {
    margin: 0;
}

.nav ul li a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffeb3b, #ffc107);
    transition: width 0.3s ease;
}

.nav ul li a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.4);
}

.nav ul li a:hover::after {
    width: 100%;
}

.nav ul li a.active {
    background-color: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav ul li a.active::after {
    width: 100%;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.sidebar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #4caf50;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 6px;
    font-weight: bold;
}

.period-info {
    margin-bottom: 6px;
}

.period-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 14px;
    color: #ff0000;
    text-align: center;
}



/* 移除了previous-periods相关样式，简化界面 */

/* 刮刮奖样式 */
.scratch-container {
    position: relative;
    margin: 10px 0;
}

/* 全屏刮刮乐模式 */
.scratch-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 刮刮乐卡片样式 */
.scratch-ticket {
    width: 90%;
    max-width: 500px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 30px rgba(211, 47, 47, 0.5);
    position: relative;
    overflow: hidden;
}

/* 波浪形顶部 */
.scratch-ticket::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

/* 刮刮卡标题 */
.scratch-ticket h3 {
    color: #ffeb3b;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: 'Arial', sans-serif;
}

/* 刮刮区域容器 */
.scratch-area {
    position: relative;
    width: 100%;
    height: 150px;
    background: #f5f5f5;
    border: 2px solid #333;
    margin-bottom: 15px;
    overflow: hidden;
}

/* 刮刮区域内容 */
.scratch-area-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    z-index: 1;
}

/* 开奖号码显示 */
.scratch-numbers {
    font-size: 24px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 10px;
}

/* 开奖结果显示 */
.scratch-result-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

/* 倒计时显示 */
.scratch-countdown {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

/* 刷新按钮 */
.scratch-refresh-btn {
    display: block;
    margin: 0 auto 15px;
    padding: 10px 20px;
    background: #ffeb3b;
    color: #d32f2f;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.scratch-refresh-btn:hover {
    background: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* 底部网站信息 - 已移除 */
/* .scratch-footer {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
} */

/* 背景装饰 */
.scratch-ticket::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    z-index: 0;
}

/* 刮刮乐状态提示 */
.scratch-status {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* 普通刮刮乐卡片 */
.scratch-card {
    position: relative;
    width: 100%;
    height: 100px;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.scratch-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ccc 25%, #eee 25%, #eee 50%, #ccc 50%, #ccc 75%, #eee 75%, #eee 100%);
    background-size: 20px 20px;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.scratch-cover.scratched {
    opacity: 0;
    pointer-events: none;
}

.scratch-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.scratch-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.scratch-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scratch-btn:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #8e0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.scratch-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 刮刮奖结果显示 */
.scratch-result {
    font-size: 18px;
    font-weight: bold;
    color: #d32f2f;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border-radius: 8px;
    border: 1px solid #ffeeba;
    margin-top: 10px;
}

/* 刮刮奖状态提示 */
.scratch-status {
    text-align: center;
    color: #6c757d;
    margin: 10px 0;
    font-size: 14px;
}

/* 主内容区域在刮刮乐模式下的隐藏 */
body.scratch-mode .container {
    display: none;
}

.lottery-status {
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    padding: 6px 10px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
    border: 1px solid #ffeeba;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.status-title {
    font-weight: bold;
    color: #856404;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.status-text {
    color: #ff0000;
    font-weight: bold;
    font-size: 28px;
    font-family: 'Arial', sans-serif;
    text-shadow: 0 2px 6px rgba(255, 0, 0, 0.5);
    display: inline-block;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    text-align: center;
    letter-spacing: 1px;
    font-weight: 900;
}

.status-text::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.status-text:hover {
    transform: scale(1.05);
    text-shadow: 0 3px 8px rgba(255, 0, 0, 0.6);
    color: #cc0000;
}

.status-text:hover::after {
    transform: scaleX(1);
}

.lottery-result {
    background: #ffffff;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 结果数字优化 */
.result-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* 增加间距 */
    flex-wrap: nowrap;
}

.result-number {
    width: 32px;
    height: 32px;
    background: #17a2b8; /* 青色背景 */
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: none; /* 移除阴影以匹配扁平风格 */
    border: none;
}

.result-number.sum {
    background: #28a745; /* 绿色背景 */
    box-shadow: none;
}

.result-operator {
    width: 15px;
    height: 32px;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 16px;
    font-weight: bold;
    color: #333; /* 确保加号是黑色的 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 结果徽章样式 (圆形) */
.result-badges {
    display: flex;
    gap: 5px;
    margin-left: 5px;
}

.result-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.result-badge.red {
    background-color: #dc3545; /* 红色 */
}

.result-badge.grey {
    background-color: #6c757d; /* 灰色 */
}

/* 移除旧的 result-combo 样式 */
.result-combo {
    display: none;
}

/* 开奖结果类型样式 */
.result-type {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.result-type-item {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
}

/* 大小单双颜色样式 */
.result-type-item.big {
    color: red;
    background-color: #fff5f5;
    border: 1px solid #f5c6cb;
}

.result-type-item.small {
    color: blue;
    background-color: #f0f8ff;
    border: 1px solid #b8daff;
}

.result-type-item.odd {
    color: red;
    background-color: #fff5f5;
    border: 1px solid #f5c6cb;
}

.result-type-item.even {
    color: blue;
    background-color: #f0f8ff;
    border: 1px solid #b8daff;
}

/* 走势页面样式 */
.trend-container, .prediction-container {
    padding: 0;
}

.trend-section, .prediction-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    border: none;
}

.trend-section h3, .prediction-section h3 {
    color: #d32f2f;
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #d32f2f;
}

/* 走势表格样式 */
.trend-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: none; /* 移除阴影 */
    border-radius: 0; /* 移除圆角 */
    overflow: visible;
}

.trend-table th {
    background: transparent; /* 透明背景 */
    color: #333; /* 黑色文字 */
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-right: none;
    border-bottom: 2px solid #ddd; /* 底部边框 */
}

.trend-table th:last-child {
    border-right: none;
}

.trend-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #495057;
    font-weight: bold;
    position: relative;
}

/* 圆形图标样式 */
.trend-circle {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.trend-circle.blue {
    background-color: blue;
}

.trend-circle.red {
    background-color: red;
}

.trend-circle.green {
    background-color: green;
}

/* 胶囊形图标样式（用于组合） */
.trend-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.trend-pill.blue {
    background-color: blue;
}

.trend-pill.green {
    background-color: green;
}

.trend-pill.red {
    background-color: red; /* 大双 */
}

/* 走势页面样式调整 */
.trend-container {
    padding: 10px 0; /* 减少左右内边距 */
}

.trend-section {
    background: white; /* 白色背景 */
    padding: 0; /* 移除内边距 */
    border-radius: 0;
    margin-bottom: 12px;
    box-shadow: none; /* 移除阴影 */
    border: none;
}

.trend-section h3 {
    display: none; /* 隐藏标题 */
}

.trend-table tr:last-child td {
    border-bottom: none;
}

.trend-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.trend-table tr:hover {
    background-color: #e9ecef;
    transform: none;
    box-shadow: none;
}

/* 大小单双结果样式 */
.trend-table td.big {
    color: red;
    font-weight: bold;
}

.trend-table td.small {
    color: blue;
    font-weight: bold;
}

.trend-table td.odd {
    color: red;
    font-weight: bold;
}

.trend-table td.even {
    color: blue;
    font-weight: bold;
}

.trend-table td.small-odd {
    color: green;
    font-weight: bold;
}

.trend-table td.small-even {
    color: blue;
    font-weight: bold;
}

.trend-table td.big-odd {
    color: green;
    font-weight: bold;
}

.trend-table td.big-even {
    color: blue;
    font-weight: bold;
}

/* 结果单元格高亮 */
.trend-table td.result {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* 期数单元格样式 */
.trend-table td.period {
    font-weight: bold;
    color: #666;
}

/* 预测表格样式 */
.prediction-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.prediction-table th {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.prediction-table th:last-child {
    border-right: none;
}

.prediction-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #333333;
    font-weight: bold;
    position: relative;
    background-color: #ffffff;
}

.prediction-table tr:last-child td {
    border-bottom: none;
}

.prediction-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.prediction-table tr:hover {
    background-color: #e9ecef;
    transform: none;
    box-shadow: none;
}

/* 预测行特殊样式 */
.prediction-row {
    background-color: #fff3cd !important;
}

.prediction-row td {
    background-color: #fff3cd !important;
    font-weight: bold;
    color: #856404;
}

/* 预测组合类型样式 */
.prediction-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    color: black;
}

.prediction-type.xiao-dan {
    background-color: #4caf50;
    color: black;
}

.prediction-type.xiao-shuang {
    background-color: #4caf50;
    color: black;
}

.prediction-type.da-dan {
    background-color: #4caf50;
    color: black;
}

.prediction-type.da-shuang {
    background-color: #4caf50;
    color: black;
}

/* 结果状态样式 */
.result-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: bold;
    color: white;
}

.result-status.correct {
    background-color: #0080ff;
    color: white;
}

.result-status.wrong {
    background-color: #cccccc;
    color: #333333;
}

.result-status.pending {
    background-color: #4caf50;
    color: white;
}

/* 预测行中文字颜色修复 */
.prediction-row .prediction-type {
    color: black !important;
}

.prediction-row .result-status {
    color: white !important;
}

/* 预测表格单元格样式 */
.prediction-table td.period {
    font-weight: bold;
    color: #666;
}

.prediction-table td.number {
    font-weight: bold;
    color: #333;
}

.prediction-table td.result {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* 预测页面样式 */
.hot-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.hot-number {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 18px;
    color: white;
    background: linear-gradient(145deg, #e94560, #c73e54);
    box-shadow: 0 4px 10px rgba(233,69,96,0.4);
    transition: transform 0.3s ease;
}

.hot-number:hover {
    transform: scale(1.15) rotate(5deg);
}

.prediction-analysis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.analysis-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.analysis-title {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
}

.prediction-result {
    font-size: 28px;
    font-weight: bold;
    color: #4caf50;
}

.prediction-number {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(145deg, #e94560, #c73e54);
    border-radius: 8px;
    color: white;
}

.recommended-combination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.combo-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #4ecca3, #3db892);
    border-radius: 50%;
    font-weight: bold;
    color: white;
    font-size: 18px;
}

.trend-judgment {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.judgment-item {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(145deg, #45b7d1, #3498db);
    border-radius: 20px;
    color: white;
}

.probability-info {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.probability-info p {
    color: #6c757d;
    margin-bottom: 15px;
}

.probability-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.probability-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.probability-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #45b7d1, #3498db);
    border-radius: 50%;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.probability-percent {
    color: #6c757d;
    font-size: 14px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prediction-analysis {
        grid-template-columns: 1fr;
    }
}

.main-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
}

/* 标签导航 */
.panel-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
}

.panel-tab {
    padding: 8px 5px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
    height: 36px;
    line-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-tab.active {
    color: #4caf50;
    border-bottom: 2px solid #4caf50;
    font-weight: bold;
}

.panel-content {
    min-height: 350px;
    background-color: white;
    padding: 1px 5px;
    border-radius: 0 0 6px 6px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

th {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 14px;
}

tr {
    background-color: white;
    transition: all 0.2s ease;
}

tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

tr:last-child td {
    border-bottom: none;
}

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.settings-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 300px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.settings-title {
    font-weight: bold;
    color: #4caf50;
}

.settings-close {
    cursor: pointer;
    font-size: 20px;
    color: #666;
}

.setting-item {
    margin-bottom: 15px;
}

.setting-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4caf50;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* 统计界面样式 */
.stats-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.stats-title {
    font-size: 16px;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stats-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.stats-item:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-label {
    font-weight: bold;
    color: #495057;
}

.stats-value {
    font-weight: bold;
    color: #4caf50;
}

/* 综合统计样式 */
.comprehensive-day-section {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.comprehensive-day-title {
    font-size: 18px;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #4caf50;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 8px;
    border-radius: 8px;
}

.comprehensive-stats-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 优化统计区块间距和样式 */
.stats-section {
    margin-bottom: 10px;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.stats-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 统计容器样式 - 移除多余边框和阴影 */
.statistics-container {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* 优化标题样式 - 移除背景框 */
.stats-title {
    font-size: 16px;
    font-weight: bold;
    color: #4caf50;
    margin-bottom: 10px;
    border-bottom: 2px solid #4caf50; /* 保留底部红线 */
    padding-bottom: 5px;
    text-align: center;
    background: none; /* 移除背景 */
    padding: 0 0 5px 0; /* 调整内边距 */
    border-radius: 0; /* 移除圆角 */
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 整体布局优化 */
    .container {
        padding: 0 5px 5px 5px; /* 移除顶部内边距 */
        max-width: 100%;
    }
    
    /* 头部和公告栏优化 */
    .header {
        padding: 2px 5px; /* 极小公告栏内边距 */
        margin-bottom: 2px; /* 减小公告栏下方间隙 */
    }
    
    .announcement-list {
        gap: 2px;
    }
    
    .announcement-item {
        padding: 8px 10px;
        font-size: 15px;
        font-weight: 900; /* 加粗字体 */
    }
    
    .announcement-item:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(255,255,255,0.15);
    }
    
    /* 轮播图优化 */
    .carousel-container {
        margin-bottom: 2px;
    }
    
    .carousel-slide {
        min-height: 135px;
    }
    
    .carousel-image {
        max-height: 160px;
    }
    
    .carousel-slide img {
        max-height: 150px;
    }
    
    .carousel-nav {
        bottom: 10px;
        gap: 10px;
    }
    
    .carousel-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .carousel-dot {
        width: 10px;
        height: 10px;
    }
    
    /* 导航栏优化 */
    .nav {
        padding: 5px;
        margin-bottom: 2px; /* 减小导航栏下方间隙 */
        width: 100%;
    }
    
    .nav ul {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 4px;
        padding-bottom: 2px;
        list-style: none;
    }
    
    .nav ul li {
        text-align: center;
        margin: 0;
    }
    
    .nav ul li a {
        display: block;
        padding: 5px 4px; /* 减小左右内边距 */
        font-size: 12px; /* 稍微缩小字体以适应长名字 */
        white-space: nowrap;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        background-color: rgba(255,255,255,0.15);
        text-align: center;
        transition: all 0.2s ease;
        font-weight: bold;
    }
    
    .nav ul li a:hover {
        background-color: rgba(255,255,255,0.25);
        transform: none;
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }
    
    /* 主要内容布局 */
    .main-content {
        grid-template-columns: 1fr;
        gap: 2px; /* 减小主要模块之间的间隙 */
    }
    
    /* 侧边栏优化 */
    .sidebar {
        padding: 5px 5px 2px 5px; /* 减小侧边栏内边距，底部更小 */
    }
    
    .sidebar-section {
        margin-bottom: 0; /* 移除侧边栏章节下边距 */
    }
    
    .lottery-status {
        margin-bottom: 2px;
        padding: 4px;
    }
    
    .lottery-result {
        margin-bottom: 0; /* 结果区域作为最后元素，不需要下边距 */
        padding: 6px;
    }

    .sidebar-section h3 {
        font-size: 16px;
        margin-bottom: 5px;
    }
    
    .status-text {
        font-size: 18px;
    }
    
    /* 结果数字优化 */
.result-numbers {
    gap: 8px; /* 增加间距 */
    flex-wrap: nowrap;
}

.result-number {
    width: 32px;
    height: 32px;
    background: #17a2b8; /* 青色背景 */
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: none; /* 移除阴影以匹配扁平风格 */
    border: none;
}

.result-number.sum {
    background: #28a745; /* 绿色背景 */
    box-shadow: none;
}

.result-operator {
    width: 15px;
    height: 32px;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 16px;
    font-weight: bold;
}

/* 结果徽章样式 (圆形) */
.result-badges {
    display: flex;
    gap: 5px;
    margin-left: 5px;
}

.result-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.result-badge.red {
    background-color: #dc3545; /* 红色 */
}

.result-badge.grey {
    background-color: #6c757d; /* 灰色 */
}

/* 移除旧的 result-combo 样式 */
.result-combo {
    display: none;
}
    
    /* 主面板优化 */
    .main-panel {
        padding: 2px 5px 5px 5px; /* 减小主面板内边距，顶部更小 */
    }
    
    .panel-tabs {
        margin-bottom: 0;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0;
    }
    
    .panel-tab {
        padding: 4px;
        font-size: 12px;
        flex-shrink: 0;
        margin-right: 0;
        border-radius: 4px 4px 0 0;
        height: 36px;
        line-height: 1.2;
    }
    
    .panel-content {
        padding: 1px 5px;
        min-height: 250px;
    }
    
    /* 表格优化 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    th {
        white-space: nowrap;
    }
    
    /* 统计区域优化 */
    .stats-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .stats-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .stats-grid,
    .stats-grid-2col {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stats-item {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* 预测分析优化 */
    .prediction-section {
        padding: 0;
    }
    
    .hot-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* 综合统计优化 */
    .comprehensive-day-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .comprehensive-day-title {
        font-size: 16px;
        padding: 8px;
    }
    
    /* 统计容器优化 */
    .statistics-container {
        padding: 0;
    }
    
    /* 优化统计区块间距和样式 */
    .stats-section {
        margin-bottom: 12px;
        padding: 12px;
    }
    
    /* 开奖结果优化 */
    .lottery-result {
        padding: 8px; /* 减小内边距 */
    }
    
    .result-numbers {
        gap: 4px; /* 减小间距 */
    }
    
    .result-number {
        width: 34px; /* 减小尺寸 */
        height: 34px;
        font-size: 15px;
    }
    
    .result-operator {
        width: 15px; /* 减小运算符宽度 */
        height: 34px;
        font-size: 14px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 结果徽章样式 (圆形) */
    .result-badges {
        display: flex;
        gap: 4px;
        margin-left: 4px;
    }
    
    .result-badge {
        width: 30px; /* 减小徽章尺寸 */
        height: 30px;
        font-size: 13px;
    }
    
    /* 走势表格优化 */
    .trend-table {
        table-layout: fixed;
        width: 100%;
    }
    
    .trend-table th,
    .trend-table td {
        font-size: 10px; /* 进一步减小字体 */
        padding: 4px 1px; /* 极小内边距 */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 调整走势表格列宽 */
    .trend-table th:nth-child(1) { width: 18%; } /* 期号 */
    .trend-table th:nth-child(2) { width: 10%; } /* 结果 */
    .trend-table th:nth-child(3),
    .trend-table th:nth-child(4),
    .trend-table th:nth-child(5),
    .trend-table th:nth-child(6) { width: 7%; } /* 大小单双 */
    .trend-table th:nth-child(7),
    .trend-table th:nth-child(8),
    .trend-table th:nth-child(9),
    .trend-table th:nth-child(10) { width: 11%; } /* 组合 */

    .trend-circle {
        width: 16px; /* 减小圆形图标 */
        height: 16px;
        line-height: 16px;
        font-size: 10px;
    }
    
    .trend-pill {
        padding: 1px 2px; /* 减小胶囊图标 */
        font-size: 9px;
        border-radius: 4px;
        display: block; /* 确保居中 */
        margin: 0 auto;
        text-align: center;
        width: 100%;
    }
    
    /* 隐藏部分列以适应窄屏（如单点统计）或让其水平滚动 */
    /* 这里我们优化表格容器，确保其可以横向滚动，但隐藏滚动条 */
    .table-container {
        width: 100%;
        overflow-x: hidden; /* 尝试隐藏滚动条，因为内容应该适配了 */
    }

    /* 预测表格优化 */
    .prediction-table {
        table-layout: fixed;
        width: 100%;
    }
    
    .prediction-table th,
    .prediction-table td {
        font-size: 11px; /* 进一步减小字体 */
        padding: 6px 2px; /* 极小内边距 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .prediction-table th:nth-child(1) { width: 25%; } /* 期号 */
    .prediction-table th:nth-child(2) { width: 15%; } /* 号码 */
    .prediction-table th:nth-child(3) { width: 40%; } /* 预测 */
    .prediction-table th:nth-child(4) { width: 20%; } /* 结果 */
    
    .prediction-table .prediction-type {
        padding: 2px 4px; /* 减小标签内边距 */
        font-size: 10px;
        display: inline-block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 调整统计分析标题大小 */
    .trend-section h3,
    .prediction-section h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    /* 预测组合样式优化 */
    .recommended-combination {
        gap: 8px;
    }
    
    .combo-item {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    /* 概率信息优化 */
    .probability-item {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .probability-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    /* 热点号码优化 */
    .hot-numbers {
        gap: 8px;
    }
    
    /* 统计分析优化 */
    .analysis-item {
        padding: 15px;
    }
    
    .analysis-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .prediction-result {
        font-size: 24px;
    }
    
    /* 调整设置模态框大小 */
    .settings-content {
        width: 90%;
        max-width: 300px;
        padding: 20px;
    }
}