* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    font-size: 14px;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
}

header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.latest-lottery {
    border-top: 1px solid #eee;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    color: #d32f2f;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 16px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    padding: 8px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

nav a:active {
    color: #d32f2f;
    background-color: #f5f5f5;
    border-radius: 4px;
}

main {
    min-height: calc(100vh - 180px);
    padding: 24px 0;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 24px 0;
    margin-top: 24px;
}

footer p {
    margin: 0;
    font-size: 13px;
}

.anchor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.anchor-item {
    background-color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
    text-align: center;
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
}

.anchor-item:active {
    background-color: #f5f5f5;
    color: #d32f2f;
}

.anchor-section {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.anchor-section h2 {
    font-size: 20px;
    color: #d32f2f;
    margin-bottom: 16px;
    font-weight: 600;
}

.section-content {
    margin-top: 16px;
}

.data-list {
    list-style: none;
    padding: 0;
}

.data-list li {
    padding: 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 12px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

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

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.data-item {
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.content-text {
    line-height: 1.8;
    word-break: break-word;
}

.content-text p {
    margin: 8px 0;
}

.content-text strong {
    font-weight: 600;
}

/* 最新开奖数据样式 */
.latest-draw-result {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 12px;
    color: white;
}

.draw-info {
    width: 100%;
}

.draw-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.draw-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.period-info {
    font-size: 13px;
    font-weight: 600;
    color: #ffd700;
}

.draw-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: auto;
}

.draw-numbers {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.number-ball-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.number-ball {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ball-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ball-number {
    position: relative;
    font-weight: 900;
    font-size: 16px;
    font-family: 'Arial Black', 'Microsoft YaHei', sans-serif;
    color: black;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.number-ball.special {
    transform: scale(1.1);
}

.special-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    font-size: 8px;
    background: red;
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
    white-space: nowrap;
    font-weight: bold;
}

.replay-button-wrapper {
    display: flex;
    align-items: center;
    align-self: center;
    margin-left: 8px;
}

.replay-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 28px;
}

.replay-button:active {
    opacity: 0.8;
}

.replay-button svg {
    width: 12px;
    height: 12px;
}

/* 移动端优化 */
@media (max-width: 640px) {
    .draw-header {
        font-size: 13px;
    }
    
    .number-ball {
        width: 35px;
        height: 35px;
    }
    
    .ball-number {
        font-size: 14px;
    }
    
    .draw-numbers {
        gap: 6px;
    }
    
    .number-ball-wrapper {
        gap: 6px;
    }
    
    .ball-zodiac {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.95);
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
        line-height: 1;
    }
}
