/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #fff1f0; /* 喜庆的浅红色背景 */
    color: #333;
    background-image: url('/assets/img/spring-bg.png'); /* 添加春节背景图案 */
}

/* 首页容器样式 */
.home-container {
    width: 100vw;
    margin: 0;
    padding: 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* 开奖区域样式 */
.lottery-section {
    background: #fff;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.1);
    border-radius: 12px;
    width: 100vw;
    margin-bottom: 8px;
    overflow: hidden;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.lottery-section:first-child {
    margin-bottom: 1px;
}

.lottery-section.amkj-section {
    margin-bottom: 0;
}

.lottery-header {
    background: linear-gradient(135deg, #e60012, #c7000b);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    margin-bottom: 0;
    border-bottom: 2px solid #ffd700;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lottery-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.lottery-issue {
    font-size: 16px;
    color: #fff;
}

.lottery-issue .issue-number,
.lottery-issue .amkj-issue-number {
    font-weight: bold;
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refresh-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    color: #ffd700;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.refresh-btn:hover {
    background: rgba(255, 215, 0, 0.3);
}

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

.countdown-label {
    font-size: 16px;
}

.countdown-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-block {
    background: rgba(255, 255, 255, 0.95);
    color: #4285f4;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 18px;
    min-width: 32px;
    text-align: center;
}

.time-separator {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
}

.lottery-numbers, .amkj-lottery-numbers {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: #fff;
    gap: 8px;
}

/* 号码球基础样式 */
.number-ball {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc((100% - 48px) / 7);
    max-width: 65px;
    min-width: 40px;
    aspect-ratio: 1 / 1.2;
    flex-shrink: 0;
}

.number-ball .ball-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    position: relative;
    margin-bottom: 4px;
}

.ball-container .ball-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
}

.ball-container .number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(14px, 3.5vw, 24px);
    font-weight: bold;
    color: #333;
    z-index: 1;
}

.number-ball .number-zodiac {
    font-size: clamp(10px, 2.5vw, 14px);
    color: #666;
}

/* 加号样式 */
.plus-sign {
    font-size: clamp(14px, 3vw, 20px);
    color: #999;
    font-weight: normal;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 特别号样式 */
.number-ball.special,
.amkj-lottery-numbers .number-ball.special {
    position: relative;
}

/* 待开奖状态样式 */
.number-ball.pending .number,
.amkj-lottery-numbers .number-ball.pending .number {
    color: #666;
}

.number-ball.pending .number-zodiac,
.amkj-lottery-numbers .number-ball.pending .number-zodiac {
    color: #666;
}

/* 动画效果 */
@keyframes revealNumber {
    0% {
        transform: rotateY(180deg);
        opacity: 0;
    }
    100% {
        transform: rotateY(0);
        opacity: 1;
    }
}

.number-ball,
.amkj-lottery-numbers .number-ball {
    animation: revealNumber 0.5s ease-out forwards;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .home-container {
        padding: 0;
    }
    
    .lottery-section {
        border-radius: 10px;
    }

    .lottery-numbers, .amkj-lottery-numbers {
        padding: 12px;
        gap: 6px;
    }
}

@media screen and (max-width: 480px) {
    .home-container {
        padding: 0;
    }
    
    .lottery-section {
        border-radius: 8px;
    }

    .lottery-numbers, .amkj-lottery-numbers {
        padding: 10px;
        gap: 5px;
    }

    .lottery-header {
        padding: 10px 12px;
    }

    .lottery-title {
        font-size: 18px;
    }

    .lottery-issue {
        font-size: 14px;
    }
}

@media screen and (max-width: 375px) {
    .home-container {
        padding: 0;
    }
    
    .lottery-numbers, .amkj-lottery-numbers {
        padding: 8px;
        gap: 4px;
    }
}

/* 资料区域样式 */
.resources-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resources-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.resource-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 0;
    border: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.resource-item img {
    max-width: 100%;
    height: auto;
}

.resource-item table {
    width: 100%;
    border-collapse: collapse;
}

.resource-item table th,
.resource-item table td {
    padding: 8px;
    border: 1px solid #e60012;
    text-align: left;
}

.resource-item table th {
    background: #e60012;
    color: #ffd700;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .lottery-header {
        padding: 10px 15px;
    }

    .header-left {
        flex: 1;
        white-space: nowrap;
        min-width: 0;
    }

    .lottery-title {
        font-size: 18px;
        margin-right: 10px;
    }

    .lottery-issue {
        font-size: 16px;
    }

    .header-right {
        flex-shrink: 0;
    }

    .countdown-label {
        display: none;
    }

    .refresh-btn {
        padding: 6px 10px;
    }

    .countdown-time {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .lottery-header {
        padding: 10px;
    }

    .lottery-title {
        font-size: 16px;
        margin-right: 8px;
    }

    .lottery-issue {
        font-size: 14px;
    }

    .refresh-btn {
        padding: 4px 8px;
    }

    .time-block {
        padding: 2px 4px;
    }
}

/* 动态内容区域样式优化 */
.dynamic-content {
    background: #fff;
    border: 2px solid #ffd700;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(230, 0, 18, 0.1);
    margin: 15px auto;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 动态内容装饰元素 */
.dynamic-content::before,
.dynamic-content::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background-image: linear-gradient(45deg, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.dynamic-content::before {
    top: -60px;
    left: -60px;
    transform: rotate(45deg);
}

.dynamic-content::after {
    bottom: -60px;
    right: -60px;
    transform: rotate(225deg);
}

/* 动态内容标题样式 */
.dynamic-content h2,
.dynamic-content h3 {
    color: #e60012;
    border-bottom: 2px solid rgba(230, 0, 18, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

/* 动态内容链接样式 */
.dynamic-content a {
    color: #e60012;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.dynamic-content a:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(230, 0, 18, 0.2);
}

/* 动态内容列表样式 */
.dynamic-content ul,
.dynamic-content ol {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.dynamic-content li {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(230, 0, 18, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dynamic-content li:last-child {
    border-bottom: none;
}

.dynamic-content li:hover {
    background: rgba(255, 215, 0, 0.05);
    transform: translateX(5px);
}

/* 动态内容图标样式 */
.dynamic-content .icon {
    color: #e60012;
    font-size: 16px;
    opacity: 0.8;
}

/* 动态内容标签样式 */
.dynamic-content .tag {
    background: linear-gradient(135deg, #e60012, #c7000b);
    color: #fff;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 8px;
    border: 1px solid #ffd700;
}

/* 动态内容时间样式 */
.dynamic-content .time {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

/* 动态内容分页样式 */
.dynamic-content .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(230, 0, 18, 0.1);
    position: relative;
    z-index: 1;
}

.dynamic-content .page-link {
    background: linear-gradient(135deg, #e60012, #c7000b);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #ffd700;
    transition: all 0.3s ease;
}

.dynamic-content .page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 0, 18, 0.2);
    background: linear-gradient(135deg, #ff1a1a, #e60012);
}

.dynamic-content .page-link.active {
    background: #ffd700;
    color: #e60012;
    font-weight: bold;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .dynamic-content {
        padding: 15px;
        margin: 10px auto;
    }

    .dynamic-content li {
        padding: 10px;
    }

    .dynamic-content .tag {
        font-size: 11px;
        padding: 2px 6px;
    }
}

@media screen and (max-width: 480px) {
    .dynamic-content {
        padding: 12px;
        margin: 8px auto;
    }

    .dynamic-content h2,
    .dynamic-content h3 {
        font-size: 16px;
    }

    .dynamic-content li {
        padding: 8px;
        font-size: 14px;
    }
}

/* 表格横向滚动容器 */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* 图片内容区域样式 */
.image-section .image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-item {
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

/* 表格内容区域样式 */
.table-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

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

.table-section th {
    background: #e60012;
    color: #ffd700;
}

/* HTML内容区域样式 */
.html-section .html-content {
    margin-top: 15px;
    line-height: 1.6;
}

.html-section img {
    max-width: 100%;
    height: auto;
}

.html-section p {
    margin-bottom: 1em;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
    .container {
        padding: 15px;
        padding-top: 240px;
    }
    
    .lottery-section {
        width: calc(100% - 30px);
    }
    
    .dynamic-content {
        margin: 20px 0;
    }
    
    .image-section .image-container {
        grid-template-columns: 1fr;
    }
    
    .table-section {
        overflow-x: auto;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
        padding-top: 220px;
    }
    
    .lottery-section {
        width: calc(100% - 20px);
    }
    
    .dynamic-content {
        margin: 20px 0;
    }
}

/* 历史开奖按钮样式优化 */
.history-button-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.history-button {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #e60012, #c7000b);
    color: #ffd700;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid #ffd700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.2);
    position: relative;
    overflow: hidden;
}

/* 添加闪光效果 */
.history-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 215, 0, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* 历史图标样式 */
.history-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    font-size: 20px;
}

/* 按钮文字 */
.history-text {
    font-weight: 600;
    letter-spacing: 1px;
    position: relative;
}

/* 添加小标记 */
.history-text::after {
    content: '查看';
    position: absolute;
    top: -12px;
    right: -15px;
    font-size: 12px;
    background: #ffd700;
    color: #e60012;
    padding: 2px 6px;
    border-radius: 10px;
    transform: rotate(15deg);
}

/* 悬浮效果 */
.history-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.3);
    background: linear-gradient(135deg, #ff1a1a, #e60012);
}

.history-button:hover .history-icon {
    background: rgba(255, 215, 0, 0.3);
    transform: rotate(360deg);
    transition: transform 0.5s ease;
}

/* 点击效果 */
.history-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(230, 0, 18, 0.2);
}

/* 闪光动画 */
@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .history-button {
        padding: 12px 25px;
        font-size: 16px;
    }
    
    .history-icon {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    .history-text::after {
        font-size: 10px;
        top: -10px;
        right: -12px;
    }
}

@media screen and (max-width: 480px) {
    .history-button {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    .history-icon {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

/* 历史开奖页面样式 */
.history-section {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(230, 0, 18, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid #ffd700;
}

.history-header {
    background: linear-gradient(135deg, #e60012, #c7000b);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title {
    color: #fff;
    font-size: 20px;
    margin: 0;
}

.back-btn {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    backdrop-filter: blur(4px);
    color: #ffd700;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 0, 18, 0.2);
}

.history-list {
    padding: 15px;
}

.history-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 10px 0;
    padding: 15px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-item-header {
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(230, 0, 18, 0.2);
}

.issue-number {
    color: #e60012;
    font-weight: 600;
}

.open-time {
    font-size: 14px;
    color: #666;
}

.history-list .lottery-numbers {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1%;
    padding: 10px 2%;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
}

.history-list .number-ball {
    width: 12%;  /* 基于容器宽度的百分比 */
    max-width: 70px;
    min-width: 35px;
    height: auto;
    aspect-ratio: 1 / 1.3;  /* 保持宽高比 */
    margin: 0;
    padding: 0;
}

.history-list .number-ball .ball-container {
    width: 100%;
    height: auto;
    aspect-ratio: 1;  /* 保持正方形 */
    margin-bottom: 5%;
}

.history-list .ball-container .number {
    font-size: clamp(12px, 3vw, 24px);  /* 自适应字体大小 */
}

.history-list .number-ball .number-zodiac {
    font-size: clamp(9px, 2vw, 14px);  /* 自适应字体大小 */
    margin-top: 2px;
}

.history-list .plus-sign {
    font-size: clamp(12px, 3vw, 24px);
    padding: 0 2px;
    height: auto;
    display: flex;
    align-items: center;
    margin: 0 1%;
}

/* 响应式调整 */
@media screen and (max-width: 480px) {
    .history-container {
        padding: 10px;
    }
    
    .history-list {
        padding: 10px;
    }
    
    .history-item {
        padding: 10px 0;
    }
    
    .history-list .lottery-numbers {
        gap: 0.5%;
        padding: 8px 1%;
    }
    
    .history-list .number-ball {
        width: 13%;  /* 稍微增加一点宽度 */
    }
}

@media screen and (max-width: 375px) {
    .history-list .lottery-numbers {
        gap: 0.3%;
        padding: 5px 0.5%;
    }
    
    .history-list .number-ball {
        width: 13.5%;  /* 进一步增加宽度 */
        min-width: 32px;
    }
}

/* 澳门旧彩区域样式 */
.amkj-section {
    margin-top: 0;
}

.amkj-refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
}

.amkj-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.amkj-section .next-draw-time {
    color: #fff;
    font-size: 16px;
    margin-left: 15px;
    display: flex;
    align-items: center;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .amkj-refresh-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .amkj-refresh-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
}

@media screen and (max-width: 768px) {
    .amkj-lottery-numbers {
        gap: 5px;
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .amkj-lottery-numbers {
        gap: 3px;
        padding: 10px;
    }
}

/* 公告弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff1f0;
    padding: 20px;
    border: 2px solid #ffd700;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#announcementTitle {
    margin: 0 0 15px 0;
    padding-right: 30px;
    color: #333;
    font-size: 1.5em;
}

#announcementContent {
    line-height: 1.6;
    color: #666;
    padding-bottom: 10px;
}

/* 修复模态框滚动问题 */
body.modal-open {
    overflow: hidden;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 75vh;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        padding: 15px;
        max-height: 70vh;
    }
    
    .close {
        right: 10px;
        top: 8px;
        font-size: 24px;
    }
    
    #announcementTitle {
        font-size: 1.3em;
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 768px) {
    .modal-content {
        top: 280px;
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        top: 260px;
    }
}

/* 当模态框显示时，自动滚动到正确位置 */
.modal.show {
    display: block;
}

.modal.show ~ .container {
    scroll-margin-top: 260px;
}

/* 为了更好的视觉效果，可以添加一些装饰 */
.content-section {
    width: 100vw;
    margin-bottom: 30px;
    background: #fff;
    border: 2px solid #ffd700;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(230, 0, 18, 0.1);
    overflow: hidden;
    padding: 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.content-section h2 {
    margin: 0;
    padding: 15px 0;
    background-color: #dc3545;  /* 恢复红色标题背景 */
    color: #fff;
    font-size: 20px;
    text-align: center;
    width: 100%;
}

/* 修改表格样式，保持原有设计 */
.content-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.content-section th,
.content-section td {
    border: 1px solid #e60012;
    padding: 12px;
    text-align: left;
}

.content-section th {
    background: #e60012;
    color: #ffd700;
}

/* 添加表格容器样式，但保持原有设计 */
.content-section .table-container,
.content-section .html-content {
    padding: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 确保富文本内容中的表格也保持一致的样式 */
.content-section .html-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin: 1rem 0;
}

.content-section .html-content table th,
.content-section .html-content table td {
    border: 1px solid #e60012;
    padding: 12px;
    text-align: left;
}

.content-section .html-content table th {
    background: #e60012;
    color: #ffd700;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .content-section {
        width: 100vw;
    }
    
    .content-section .table-container,
    .content-section .html-content {
        padding: 15px;
    }
    
    .content-section table th,
    .content-section table td,
    .content-section .html-content table th,
    .content-section .html-content table td {
        padding: 8px;
        font-size: 14px;
    }
}

/* 错误消息样式 */
.error-message {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border-radius: 4px;
    margin: 10px 0;
}

/* 无内容提示样式 */
.no-content {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .content-section {
        margin-bottom: 20px;
    }
    
    .content-section h2 {
        font-size: 1.2em;
        padding: 12px 0;
    }
    
    .content-section .image-container,
    .content-section .html-content,
    .content-section table {
        padding: 15px;
    }
    
    .table-section th,
    .table-section td {
        padding: 8px;
        font-size: 14px;
    }
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .home-container {
        padding: 8px;
    }
    
    .lottery-section {
        border-radius: 10px;
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 480px) {
    .home-container {
        padding: 5px;
    }
    
    .lottery-section {
        border-radius: 8px;
        margin-bottom: 10px;
    }
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .lottery-numbers, .amkj-lottery-numbers {
        padding: 8px 10px;
    }
}

@media screen and (max-width: 480px) {
    .lottery-numbers, .amkj-lottery-numbers {
        padding: 6px 8px;
    }
}

@media screen and (max-width: 375px) {
    .lottery-numbers, .amkj-lottery-numbers {
        padding: 4px 6px;
    }
}

@media screen and (max-width: 768px) {
    .modal-content {
        top: 280px;
    }
}

@media screen and (max-width: 480px) {
    .modal-content {
        top: 260px;
    }
}

/* 富文本内容容器 */
.content-html {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* 表格样式 */
.content-html table {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    background-color: transparent;
}

/* 表格单元格样式 */
.content-html table th,
.content-html table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    vertical-align: middle;
    min-width: 60px; /* 设置最小宽度防止内容挤压 */
    word-wrap: break-word; /* 允许长文本换行 */
}

/* 表格头部样式 */
.content-html table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
}

/* 响应式表格容器 */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* 图片自适应 */
.content-html img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

/* 小屏幕优化 */
@media (max-width: 768px) {
    .content-html table {
        font-size: 0.9rem;
    }
    
    .content-html table th,
    .content-html table td {
        padding: 0.5rem;
    }
}

/* 确保内容区域内的所有元素都是响应式的 */
.content-html * {
    max-width: 100%;
}

/* 列表样式优化 */
.content-html ul,
.content-html ol {
    padding-left: 20px;
    margin-bottom: 1rem;
}

/* 段落间距 */
.content-html p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 富文本内容的表格响应式处理 */
.html-content table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

/* 创建表格容器，但保持原有样式 */
.html-content .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    background: transparent;
}

/* 确保表格单元格样式统一 */
.html-content table th,
.html-content table td {
    white-space: normal;
    word-break: break-word;
}

/* 小屏幕优化 */
@media screen and (max-width: 768px) {
    .html-content {
        width: 100%;
        overflow-x: hidden;
    }
    
    .html-content .table-wrapper {
        margin: 0 -10px;
        padding: 0 10px;
    }
}

/* 修改导航菜单样式为九宫格 */
.lottery-nav {
    width: 100vw;
    background: linear-gradient(135deg, #e60012, #c7000b);
    padding: 15px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-top: 2px solid #ffd700;
    border-bottom: 2px solid #ffd700;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.nav-list li {
    margin: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-align: center;
    height: 100%;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #ffd700;
}

.nav-item:hover,
.nav-item:focus {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: #ffd700;
}

/* 响应式调整 */
@media screen and (max-width: 480px) {
    .nav-list {
        gap: 8px;
    }

    .nav-item {
        padding: 12px 8px;
        font-size: 12px;
    }

    .nav-item i {
        font-size: 20px;
        margin-bottom: 6px;
    }
}

/* 广告位样式 */
.ad-container {
    width: 100%;
    max-width: 100vw;
    margin: 0 0 30px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.ad-container img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .ad-container {
        margin: 0 0 25px 0;
    }
}

@media screen and (max-width: 480px) {
    .ad-container {
        margin: 0 0 20px 0;
    }
}

/* Logo 容器样式优化 */
.logo-container {
    background: linear-gradient(135deg, #e60012, #c7000b);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #ffd700;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.2);
}

/* 添加装饰背景 */
.logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255,215,0,0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255,215,0,0.15) 0%, transparent 50%),
        url('/assets/img/chinese-pattern.png');
    background-size: auto, auto, 100px 100px;
    opacity: 0.1;
    animation: patternFloat 20s linear infinite;
}

/* 添加飘带装饰 */
.logo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #ffd700 25%,
        #fff4d6 50%,
        #ffd700 75%,
        transparent 100%
    );
    animation: shimmer 2s linear infinite;
}

.logo-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Logo 文字样式优化 */
.logo-text {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(to right, #fff4d6, #ffd700, #fff4d6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 
        3px 3px 6px rgba(0,0,0,0.3),
        0 0 15px rgba(255,215,0,0.5);
    margin: 0;
    padding: 0;
    letter-spacing: 4px;
    position: relative;
    display: inline-block;
    animation: logoFloat 3s ease-in-out infinite;
}

/* Logo 文字装饰 */
.logo-text::before,
.logo-text::after {
    content: '✦';
    position: absolute;
    top: 50%;
    font-size: 28px;
    background: linear-gradient(to bottom, #ffd700, #ffec99);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(255,215,0,0.5));
}

.logo-text::before {
    left: -35px;
    transform: translateY(-50%) rotate(-15deg);
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.logo-text::after {
    right: -35px;
    transform: translateY(-50%) rotate(15deg);
    animation: starTwinkle 1.5s ease-in-out infinite 0.5s;
}

/* Logo 副标题样式 */
.logo-slogan {
    font-size: 18px;
    color: #fff;
    margin-top: 15px;
    font-weight: 500;
    letter-spacing: 3px;
    text-align: center;
    position: relative;
    padding: 6px 20px;
    background: rgba(255,215,0,0.15);
    border-radius: 25px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,215,0,0.4);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateX(10px);
}

/* Logo 图片容器 */
.logo-image-container {
    position: relative;
    margin-left: 40px;
}

/* Logo 图片样式 */
.logo-image {
    height: 75px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255,215,0,0.4));
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.logo-image:hover {
    transform: scale(1.08) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(255,215,0,0.6));
}

/* 添加光晕效果 */
.logo-image-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,215,0,0.2) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: glowPulse 2s ease-in-out infinite;
}

/* 动画效果 */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes starTwinkle {
    0%, 100% { 
        opacity: 0.3; 
        transform: translateY(-50%) scale(0.8) rotate(-15deg);
    }
    50% { 
        opacity: 1; 
        transform: translateY(-50%) scale(1.2) rotate(-15deg);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes patternFloat {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* 响应式调整 */
@media screen and (max-width: 768px) {
    .logo-container {
        padding: 20px 25px;
    }
    
    .logo-text {
        font-size: 32px;
        letter-spacing: 3px;
    }
    
    .logo-text::before,
    .logo-text::after {
        font-size: 22px;
    }
    
    .logo-slogan {
        font-size: 15px;
        margin-top: 10px;
        padding: 5px 15px;
    }

    .logo-image {
        height: 60px;
        margin-left: 25px;
    }
}

@media screen and (max-width: 480px) {
    .logo-container {
        padding: 15px 20px;
    }
    
    .logo-text {
        font-size: 26px;
        letter-spacing: 2px;
    }
    
    .logo-text::before,
    .logo-text::after {
        font-size: 18px;
        left: -25px;
    }
    
    .logo-text::after {
        right: -25px;
    }
    
    .logo-slogan {
        font-size: 13px;
        margin-top: 8px;
        padding: 4px 12px;
        letter-spacing: 2px;
    }

    .logo-image {
        height: 45px;
        margin-left: 20px;
    }
}

/* 添加新年装饰元素 */
.lottery-section::before,
.lottery-section::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url('/assets/img/lantern.png');
    background-size: contain;
    background-repeat: no-repeat;
}

.lottery-section::before {
    left: -20px;
    top: -20px;
}

.lottery-section::after {
    right: -20px;
    top: -20px;
}

/* 添加节日动画效果 */
@keyframes floating {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

/* 修改表格样式 */
.content-section table th {
    background: #e60012;
    color: #ffd700;
}

.content-section table td {
    border: 1px solid #e60012;
}
