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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%);
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0;
        width: 100%;
    }
    
    body {
        font-size: 14px;
    }
}

/* 数据源切换头部 */
.data-source-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.data-source-header .container {
    display: flex;
    justify-content: center;
    padding: 15px 0;
}

.data-switch {
    display: flex;
    gap: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 120px;
    justify-content: center;
}

.switch-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: translateY(-2px);
}

.switch-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-text {
    font-weight: 600;
}

/* 头部样式 - 简化版，移除开盘封盘，无间距 */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    padding: 30px 40px;
    margin: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    border: none;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #9b59b6, #e74c3c);
    border-radius: 0;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #3498db, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo p {
    font-size: 1.3rem;
    color: #7f8c8d;
    font-weight: 400;
    letter-spacing: 1px;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.5rem;
        margin-bottom: 3px;
        text-align: center;
        width: 100%;
    }
    
    .logo p {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
}

.status-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status {
    font-size: 1.6rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.status.open {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.status.close {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.status.drawing {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.status.rest {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.current-period, .current-time, .next-period, .countdown {
    font-size: 1.2rem;
    color: #5d6d7e;
    font-weight: 500;
}

.countdown {
    font-weight: 800;
    color: #fff;
    animation: countdownPulse 1.5s infinite;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    padding: 12px 24px;
    border-radius: 50px;
    display: inline-block;
    font-size: 1.4rem;
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.countdown::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .status-info {
        text-align: center;
        gap: 5px;
        width: 100%;
    }
    
    .status {
        font-size: 1rem;
        padding: 6px 10px;
        border-radius: 20px;
        width: 100%;
        text-align: center;
    }
    
    .current-period, .current-time, .next-period, .countdown {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
    }
    
    .countdown {
        padding: 8px 16px;
        font-size: 1rem;
        width: auto;
        max-width: 90%;
        margin: 0 auto;
        display: block;
    }
}

/* 移除市场信息样式 */
.market-info {
    display: none;
}

@keyframes countdownPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(231, 76, 60, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
    }
}

/* 开奖动画 */
@keyframes drawAnimation {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(238, 90, 36, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 15px 35px rgba(238, 90, 36, 0.6);
    }
}

@keyframes shine {
    0% {
        transform: rotate(45deg) translateX(-100%);
    }
    100% {
        transform: rotate(45deg) translateX(100%);
    }
}

@keyframes placeholderPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.draw-animation .number-ball {
    animation: drawAnimation 1s ease-out forwards;
}

.draw-animation .number-ball:nth-child(1) {
    animation-delay: 0.1s;
}

.draw-animation .number-ball:nth-child(2) {
    animation-delay: 0.3s;
}

.draw-animation .number-ball:nth-child(3) {
    animation-delay: 0.5s;
}

/* 开奖区域 - 完全无间距 */
.lottery-section {
    margin: 0;
    padding: 0;
}

.lottery-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    padding: 40px;
    text-align: center;
    box-shadow: none;
    backdrop-filter: blur(20px);
    border: none;
    position: relative;
    overflow: hidden;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lottery-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ee5a24, #feca57);
    border-radius: 0;
}

.lottery-card h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 40px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.numbers-display {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    perspective: 1000px;
}

.number-ball {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 15px 35px rgba(238, 90, 36, 0.4);
    animation: pulse 3s infinite;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.number-ball::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.number-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    color: #95a5a6;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    animation: placeholderPulse 2s infinite;
}

.draw-info {
    display: flex;
    justify-content: center;
    gap: 60px;
    font-size: 1.3rem;
    color: #5d6d7e;
    font-weight: 500;
}

.period, .draw-time {
    background: rgba(52, 152, 219, 0.1);
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .lottery-card {
        padding: 15px 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .lottery-card h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
        width: 100%;
        padding: 0 5px;
    }
    
    .numbers-display {
        gap: 8px;
        margin-bottom: 15px;
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-around;
        padding: 0 5px;
    }
    
    .number-ball, .number-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }
    
    .draw-info {
        gap: 5px;
        font-size: 0.8rem;
        flex-wrap: wrap;
        width: 100%;
        padding: 0 5px;
    }
    
    .period, .draw-time {
        padding: 6px 8px;
        border-radius: 10px;
        min-width: 45%;
        text-align: center;
        flex: 1;
        margin: 2px;
    }
}

/* 历史记录 - 完全无间距，贴合上面 */
.history-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0;
    padding: 40px;
    box-shadow: none;
    backdrop-filter: blur(20px);
    border: none;
    position: relative;
    overflow: hidden;
    margin: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
}

.history-header h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .history-section {
        padding: 15px 0;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .history-header {
        margin-bottom: 15px;
        gap: 8px;
        width: 100%;
        padding: 0 5px;
    }
    
    .history-header h2 {
        font-size: 1.2rem;
        text-align: center;
        width: 100%;
    }
}

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

.date-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.date-filter label {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.date-filter input {
    padding: 8px 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
}

.date-filter input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.reset-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.history-table {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 15px;
    overflow: hidden;
}

th, td {
    padding: 15px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 手机端优化 */
@media (max-width: 768px) {
    .history-table {
        margin-bottom: 10px;
        border-radius: 5px;
        width: 100%;
    }
    
    th, td {
        padding: 8px 3px;
        font-size: 0.8rem;
    }
}

th {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    color: #2c3e50;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

tr:hover td {
    background: rgba(26, 41, 128, 0.05);
    transform: translateY(-1px);
}

.history-numbers {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.history-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

    .history-number .number {
        width: 35px;
        height: 35px;
        border-radius: 50%;
        background: linear-gradient(135deg, #1a2980, #26d0ce);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: 700;
        font-size: 1rem;
        box-shadow: 0 4px 12px rgba(26, 41, 128, 0.3);
        transition: all 0.3s ease;
    }

/* 手机端优化 */
@media (max-width: 768px) {
    .history-number .number {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
}

.history-number:hover .number {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 41, 128, 0.6);
}

.history-number .odd-even {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    color: white;
}

.history-number .odd-even.odd {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
}

.history-number .odd-even.even {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.2);
}

.group-type {
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.group-type.group3 {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    color: #e17055;
}

.group-type.group6 {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

.loading {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    font-size: 1.1rem;
    padding: 40px;
}

/* 分页 - 手机优化 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.page-btn {
    padding: 8px 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    flex: 1;
    min-width: 80px;
    text-align: center;
}

.page-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.page-btn:disabled {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info {
    font-size: 0.9rem;
    color: #5d6d7e;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 15px;
    text-align: center;
    flex: 2;
    min-width: 150px;
}

/* 手机端优化 */
@media (max-width: 768px) {
    .pagination {
        gap: 8px;
        margin-top: 15px;
    }
    
    .page-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .page-info {
        font-size: 0.8rem;
        padding: 6px 10px;
        min-width: 120px;
    }
}

/* 底部 - 无间距 */
.footer {
    text-align: center;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
