/* 主样式文件 - 响应式彩票推荐网站 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #3498db;
    --bg-color: #f5f6fa;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --border-color: #e1e1e1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.navbar .nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar .nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 主容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 页面标题 */
.page-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 30px;
    border-radius: 10px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
}

/* 卡片样式 */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 号码球样式 */
.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin: 2px;
}

.ball.red {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.ball.blue {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.ball.fc3d {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    width: 40px;
    height: 40px;
    font-size: 18px;
}

/* 筛选区域 */
.filter-section {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-section select,
.filter-section input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
}

.filter-section .btn {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.filter-section .btn:hover {
    background: #c0392b;
}

/* 数据表格 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Tab导航 */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 推荐号码列表 */
.recommend-list {
    list-style: none;
}

.recommend-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafafa;
}

.recommend-item .number {
    font-weight: bold;
    color: #666;
    width: 30px;
}

.recommend-item .balls {
    flex: 1;
}

.recommend-item .history-tag {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.recommend-item .history-tag.new {
    background: #d4edda;
    color: #155724;
}

.recommend-item .history-tag.matched {
    background: #fff3cd;
    color: #856404;
}

/* 算法描述 */
.algo-desc {
    background: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #0c5460;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #c0392b;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background: #f8f9fa;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 5px;
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 首页卡片 */
.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.home-card {
    background: white;
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
}

.home-card:hover {
    transform: translateY(-5px);
}

.home-card .icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.home-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.home-card p {
    color: #666;
    margin-bottom: 20px;
}

.home-card.ssq {
    border-top: 4px solid #e74c3c;
}

.home-card.fc3d {
    border-top: 4px solid #9b59b6;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: rgba(255,255,255,0.8);
    padding: 30px 20px;
    text-align: center;
    margin-top: 50px;
}

.footer .disclaimer {
    max-width: 800px;
    margin: 0 auto;
    font-size: 12px;
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #c0392b;
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
    
    .navbar .nav-links.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
    
    .ball {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .recommend-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 暗色模式预留 */
@media (prefers-color-scheme: dark) {
    /* 可扩展暗色模式样式 */
}

/* 走势图样式 */
.trend-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
    background: #fff;
}

.trend-wrapper::after {
    content: '← 左右滑动查看 →';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    color: #999;
    background: rgba(255,255,255,0.9);
    padding: 2px 8px;
    border-radius: 4px;
    display: none;
    z-index: 20;
}

@media (max-width: 768px) {
    .trend-wrapper::after {
        display: block;
    }
}

.trend-table {
    border-collapse: collapse;
    width: max-content;
    font-size: 12px;
}

.trend-table th,
.trend-table td {
    min-width: 30px;
    width: 30px;
    max-width: 30px;
    height: 34px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #e0e0e0;
    padding: 2px;
    box-sizing: border-box;
}

.trend-table th.period-col,
.trend-table td.period-col {
    min-width: 75px;
    width: 75px;
    max-width: 75px;
    font-weight: 500;
    background: #f9f9f9;
    position: sticky;
    left: 0;
    z-index: 5;
}

/* 表头样式 */
.trend-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.trend-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.trend-table thead th.period-col {
    z-index: 15;
}

.trend-table .red-header {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    height: 36px;
}

.trend-table .blue-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    height: 36px;
}

.trend-table .num-header {
    font-size: 11px;
    font-weight: 500;
}

.trend-table .num-header.red-num {
    background: #fff8f8;
    color: #c62828;
}

.trend-table .num-header.blue-num {
    background: #f8fbff;
    color: #1565c0;
}

/* 数据行样式 */
.trend-table tbody tr:hover td {
    background: #fffde7 !important;
}

.trend-table tbody tr:hover td.period-col {
    background: #fff9c4 !important;
}

.trend-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.trend-table tbody tr:nth-child(even) td.period-col {
    background: #f5f5f5;
}

/* 遗漏数字样式 */
.trend-table td.omission {
    color: #bdbdbd;
    font-size: 11px;
}

.trend-table td.omission-high {
    color: #e53935;
    font-weight: bold;
}

/* 走势图中的球样式 */
.trend-table td .ball {
    width: 24px;
    height: 24px;
    font-size: 10px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
}

.trend-table td .ball.red {
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
    box-shadow: 0 2px 4px rgba(198, 40, 40, 0.3);
}

.trend-table td .ball.blue {
    background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%);
    box-shadow: 0 2px 4px rgba(21, 101, 192, 0.3);
}

/* 红蓝区分隔线 */
.trend-table .separator {
    border-left: 2px solid #7b1fa2 !important;
}
