body {
    margin: 0;
    font-family: "Microsoft YaHei", sans-serif;
    background: #f4f7fa;
    color: #222;
}

header {
    background: #1976d2;
    color: white;
    padding: 20px;
    text-align: center;
}

#countdown {
    margin-top: 10px;
    font-size: 16px;
}

nav ul {
    display: flex;
    justify-content: center;
    background: #e3f2fd;
    margin: 0;
    padding: 12px 0;
    list-style: none;
}

nav ul li {
    margin: 0 13px;
}

nav ul li a {
    color: #1565c0;
    font-weight: bold;
    text-decoration: none;
}

/* ✅ 页面主内容统一宽度 */
main {
    max-width: 1200px;
    /* 电脑端页面统一为 1200px 宽度 */
    margin: 30px auto;
    padding: 0 15px;
}

/* ✅ 卡片统一宽度 */
.card {
    max-width: 1160px;
    /* 与 main 保持一致 */
    margin: 0 auto 20px auto;
    /* 居中并保持下边距 */
    background: #fff;
    border-radius: 12px;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ✅ 实时开奖iframe专用样式 - 让其铺满容器 */
.card:has(#kj-iframe),
.card.iframe-card {
    padding: 0 !important;
    /* 强制移除内边距 */
    overflow: hidden;
    /* 确保圆角效果 */
    background: #fff !important;
    /* 设置白色背景避免灰色露出 */
}

#kj-iframe {
    width: 100% !important;
    height: 420px !important;
    /* 强制设置高度 */
    border: none !important;
    border-radius: 12px;
    background: #fff !important;
    /* 设置白色背景 */
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* 如果上面的选择器不生效，使用更具体的选择器 */
section.card #kj-iframe {
    width: 100% !important;
    height: 420px !important;
    border: none !important;
    background: #fff !important;
    border-radius: 12px;
}

/* 手机端iframe高度适配 */
@media (max-width: 768px) {

    #kj-iframe,
    section.card #kj-iframe {
        height: 250px !important;
        border-radius: 12px;
    }
}

.number.blurred {
    filter: blur(4px);
    color: #999;
}

.number {
    display: inline-block;
    width: 62px;
    height: 62px;
    line-height: 62px;
    border-radius: 8%;
    font-size: 42px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    background-color: gray;
}

.red {
    background-color: #d9534f;
}

.blue {
    background-color: #0275d8;
}

.green {
    background-color: #5cb85c;
}

.card h2:not(.main-section-title) {
    text-align: left;
    font-size: 14px;
    color: #000;
}

.code-line,
.zodiac-line,
#recommend-24,
#recommend-5,
#recommend-6 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 10px;
}

.red {
    background: #e53935;
}

.blue {
    background: #1e88e5;
}

.green {
    background: #43a047;
}

.zodiac-label {
    background: #03a9f424;
    border: 1px solid #1976d2;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

#recommend-24 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    justify-items: center;
}

#recommend-6 .zodiac-label {
    font-size: 18px;
    padding: 8px 12px;
    font-weight: bold;
}

#history-records-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.history-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    /*border-left: 4px solid #64b5f6;*/
    /*border-right: 4px solid #64b5f6;*/
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

button {
    background: #1976d2;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    cursor: pointer;
}

.center-title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 14px;
    font-weight: bold;
}

.recommend-title {
    text-align: left;
    font-size: 18px;
    font-weight: bold;
    color: #1e88e5;
    margin: 20px 0 10px 25;
}

.history-card .line.issue-time {
    display: flex;
    justify-content: center;
    align-items: center;
    /*font-weight: bold;*/
    margin-bottom: 8px;
    width: 100%;
    text-align: center;
}

.main-section-title {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin: 24px 0 16px 0;
}

/* 合并了重复的样式，避免冗余 */
#latest-open-issue,
#latest-open-time,
#latest-result,
#latest-zodiac {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.latest-issue-copy,
.latest-time-copy,
.latest-result-copy,
.latest-zodiac-copy {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

/* 📘 最新开奖信息 📘 */
#latest-open-info {
    margin: 8px 0;
    font-size: 1.2rem;
    text-align: center;
}

.issue-title {
    font-weight: bold;
}

.result {
    font-size: 1.5rem;
    margin-top: 10px;
}

#latest-result {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    gap: 20px;
    /* 设置号码之间的间隔 */
}

.number-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.number {
    width: 50px;
    height: 50px;
    font-size: 18px;
    line-height: 50px;
    border-radius: 50%;
    /* 圆形背景 */
    color: white;
    background-color: gray;
    /* 默认背景色 */
    text-align: center;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3), -2px -2px 6px rgba(255, 255, 255, 0.2);
    /* 3D效果 */
}

/* 动态颜色背景：根据号码的颜色分配 */
.red {
    background: linear-gradient(145deg, #d9534f, #b13a35);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3), -2px -2px 10px rgba(255, 255, 255, 0.4);
}

.blue {
    background: linear-gradient(145deg, #0275d8, #0256a1);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3), -2px -2px 10px rgba(255, 255, 255, 0.4);
}

.green {
    background: linear-gradient(145deg, #5cb85c, #4b9e4b);
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3), -2px -2px 10px rgba(255, 255, 255, 0.4);
}

/* 生肖显示区域 */
.zodiac-display {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    gap: 30px;
}

.zodiac-label {
    display: inline-block;
    padding: 6px 10px;
    background-color: #03a9f424;
    color: #000;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {

    main,
    .card {
        max-width: 100%;
        /* 手机端依旧自适应 */
    }

    .number {
        width: 48px;
        height: 48px;
        font-size: 24px;
        line-height: 48px;
    }

    #latest-result {
        gap: 8px;
    }

    .zodiac-display {
        gap: 30px;
    }

    .zodiac-label {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .number {
        width: 48px;
        height: 48px;
        font-size: 28px;
        line-height: 48px;
    }

    #latest-result {
        gap: 5px;
    }

    .zodiac-display {
        gap: 16px;
    }

    .zodiac-label {
        font-size: 1.0rem;
    }
}

/* 加大并加粗倒计时显示 */
#countdown {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    text-align: center;
    margin: 0px 0;
    padding: 0px 0;
    border-radius: 5px;
}

/* 波色球图背景样式 */
.ball {
    width: 42px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.ball.red {
    background-image: url('img/balls/Red_resized.png');
}

.ball.green {
    background-image: url('img/balls/Green_resized.png');
}

.ball.blue {
    background-image: url('img/balls/Blue_resized.png');
}

.ball-text {
    color: black;
    font-size: 22px;
    transform: translateX(-2px) translateY(-2px);
}

/* ✅ 历史开奖记录专用球样式 */
.history-card .ball {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.history-card .ball-text {
    color: black;
    font-size: 16px;
    transform: translateX(-1px) translateY(-2px);
}

/* ✅ 历史开奖记录专用生肖标签样式 */
.history-card .zodiac-label {
    font-size: 14px;
    margin-top: 2px;
    padding: 5px 10px;
    background-color: #fff;
    border-radius: 6px;
    color: #000;
    font-weight: bold;
}

/* ✅ 五不中推荐样式专属控制 */
.recommend-section-5 .ball {
    width: 52px;
    height: 52px;
}

.recommend-section-5 .ball-text {
    font-size: 22px;
    transform: translateX(-1px) translateY(-5px);
}

/* ✅ 六特肖推荐样式专属控制 */
.recommend-section-6 .zodiac-label {
    font-size: 26px;
    padding: 10px 14px;
    background-color: #fff;
    border: 2px solid #1976d2;
    border-radius: 12px;
}