:root {
    --primary-color: #f53f3f;
    --secondary-color: #ff6b6b;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
   /* max-width: 1400px;*/
    margin: 0 auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(90deg, var(--primary-color), #DB2323);
    color: yellow;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.last-update {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
}

/* 导航标签 */
.nav-tabs {
    display: flex;
    background-color: #f1f5fd;
    padding: 0 30px;
    border-bottom: 1px solid #e0e6f5;
}

.tab {
    padding: 18px 30px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border-bottom: 3px solid transparent;
}

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

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: white;
}

/* 内容区域 */
.content {
    padding: 30px;
    flex-grow: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

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

/* 彩票头部 */
.lottery-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.lottery-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lottery-info {
    display: flex;
    gap: 30px;
    font-size: 1.1rem;
}

.period-label, .draw-date {
    background-color: #f8f9fa;
    padding: 8px 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* 开奖号码 */
.lottery-numbers {
    background: linear-gradient(135deg, #f8faff, #edf3ff);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.ball-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.ball, .special-ball {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.ball {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    color: var(--dark-color);
    border: 3px solid var(--primary-color);
}

.special-ball {
    background: linear-gradient(145deg, var(--secondary-color), #ff4757);
    color: white;
    border: 3px solid #ff4757;
}

.ball:hover, .special-ball:hover {
    transform: translateY(-5px) scale(1.05);
}

.loading {
    text-align: center;
    color: var(--gray-color);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* 历史记录控制栏 */
.lottery-history h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.period-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.period-select label {
    font-weight: 500;
}

.period-select select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    font-size: 1rem;
    cursor: pointer;
}

.search-box {
    display: flex;
    gap: 5px;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 350px;
    font-size: 1rem;
}

.search-box button {
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: #3a5bff;
}

/* 历史记录表格 */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

thead {
    background: linear-gradient(90deg, var(--primary-color), #DB2323);
    color: white;
}

th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 500;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

tbody tr:hover {
    background-color: #f8faff;
}

td {
    padding: 15px;
}

/* 表格中的号码球 */
td .ball, td .special-ball {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: inline-flex;
    margin: 2px;
}

/* 和值显示 */
.sum-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    background: #f0f4ff;
    padding: 5px 10px;
    border-radius: 6px;
    display: inline-block;
}

/* 日期显示 */
.date-with-week {
    font-weight: 500;
}

.week-day {
    color: var(--secondary-color);
    margin-left: 5px;
    font-size: 0.9em;
}

/* 更新提示 */
.update-notice {
    background-color: #e8f4ff;
    margin: 0 30px 20px;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    color: #0066cc;
    border-left: 4px solid #0066cc;
}

.update-notice i {
    margin-right: 10px;
}

/* 页脚 */
.footer {
    background-color: #f8f9fa;
    padding: 25px 30px;
    text-align: center;
    color: var(--gray-color);
    border-top: 1px solid #eee;
    margin-top: auto;
}

.footer p {
    margin-bottom: 10px;
}

.admin-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.admin-link a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
    }
}

@media (max-width: 992px) {
    .header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-tabs {
        justify-content: center;
    }
    
    .lottery-info {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        min-height: calc(100vh - 20px);
    }
    
    .header, .content, .footer {
        padding: 20px;
    }
    
    .nav-tabs {
        padding: 0;
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        min-width: 120px;
        padding: 15px;
        text-align: center;
    }
    
    .history-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .ball, .special-ball {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .lottery-header h2 {
        font-size: 1.5rem;
    }
    
    .ball, .special-ball {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    th, td {
        padding: 12px 10px;
        font-size: 0.9rem;
    }
    
    td .ball, td .special-ball {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* 每4行加粗下划线样式 */
tbody tr:nth-child(4n) {
    border-bottom: 3px solid #ccc;
    position: relative;
}

/* 添加视觉分隔线效果 */
tbody tr:nth-child(4n):after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #999, transparent);
}

/* 高亮搜索到的行 */
tbody tr.search-match {
    background-color: #fff9e6 !important;
    box-shadow: inset 0 0 0 2px #ff9800;
}

/* 表格行悬停效果增强 */
tbody tr:hover {
    background-color: #f8faff !important;
    transform: translateX(5px);
    transition: transform 0.2s ease;
}

/* 为特殊行添加不同背景色 */
tbody tr:nth-child(odd) {
    background-color: #fcfcfc;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 福彩3D特殊样式 */
#fc3d .lottery-header {
    border-left: 5px solid #9C27B0;
    padding-left: 15px;
}

#fc3d .lottery-numbers {
    /*background: linear-gradient(135deg, #f3e5f5, #e1bee7);*/
}

#fc3d .sum-value {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
}

#fc3d .tab.active {
    border-bottom-color: #9C27B0;
}

/* 彩票图标颜色 */
#fc3d .lottery-header h2 i {
    color: #9C27B0;
}

/* 导航标签悬停颜色 */
.tab[data-tab="fc3d"]:hover {
    color: #9C27B0;
}

.tab[data-tab="fc3d"].active {
    color: #9C27B0;
    border-bottom-color: #9C27B0;
}