/* 全局样式 */
:root {
    --primary-color: #d81e06;
    --secondary-color: #f8c988;
    --third-color: #8a0000;
    --text-color: #333;
    --light-color: #fff;
    --bg-color: #fff7e6;
    --border-color: #ffcca5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "SimSun", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="%23ffefd5" fill-opacity="0.3" d="M50 50 L100 0 L100 100 Z" /><path fill="%23fff0d1" fill-opacity="0.3" d="M0 0 L50 50 L0 100 Z" /></svg>');
    background-size: 100px 100px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题和Banner样式 */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: var(--third-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

header h1:before,
header h1:after {
    content: "♥";
    color: var(--primary-color);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

header h1:before {
    left: -30px;
}

header h1:after {
    right: -30px;
}

/* Banner移到中间位置 */
.banner {
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #fff1d0, #ffe6b3);
    padding: 10px;
}

.banner img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

/* 介绍文字样式 */
.intro {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.intro p {
    text-align: center;
    color: var(--third-color);
    font-size: 1.1rem;
}

/* 新增文章部分样式 */
.article-section {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.article-section h2 {
    color: var(--third-color);
    font-size: 1.5rem;
    margin: 15px 0 10px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

.article-section h2:first-child {
    margin-top: 0;
}

.article-section p {
    margin-bottom: 15px;
    text-align: justify;
}

.article-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.article-section li {
    margin-bottom: 8px;
}

/* 自动更新部分样式 */
.auto-update-section {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 10px;
    margin: 30px 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.auto-update-section h2 {
    color: var(--third-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.auto-update-section h2:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
}

.today-info {
    background-color: rgba(255, 250, 240, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px dashed var(--border-color);
}

.today-info p {
    margin-bottom: 8px;
}

.marriage-days {
    background-color: rgba(255, 250, 240, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px dashed var(--border-color);
}

.marriage-days h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.marriage-days ul {
    list-style-type: none;
    margin-left: 0;
}

.marriage-days li {
    display: inline-block;
    margin: 5px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.marriage-days .small-note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 10px;
    text-align: right;
}

.marriage-tips {
    background-color: rgba(255, 250, 240, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.marriage-tips h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.marriage-tips p {
    font-style: italic;
    line-height: 1.7;
}

/* 更多信息部分样式 */
.more-info-section {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.more-info-section h2 {
    color: var(--third-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
}

.more-info-section h2:after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 15px;
}

.more-info-section>p {
    margin-bottom: 20px;
    text-align: justify;
}

.info-block {
    background-color: rgba(255, 250, 240, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px dashed var(--border-color);
}

.info-block h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.info-block p {
    text-align: justify;
}

/* 表单样式 */
form {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="1" fill="%23ffcca5" /></svg>');
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px dashed var(--border-color);
}

.form-section h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.form-section h2:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 8px auto 0;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.form-group label {
    width: 30%;
    font-weight: bold;
    color: var(--third-color);
    padding-right: 10px;
    text-align: right;
}

.form-group input,
.form-group select {
    width: 65%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    background-color: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(216, 30, 6, 0.3);
}

.form-submit {
    text-align: center;
    margin-top: 20px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 12px 30px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    background-color: var(--third-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: var(--third-color);
    font-size: 0.9rem;
}

.update-time {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #777;
}

/* 结果页样式 */
.result-container {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.result-header {
    text-align: center;
    margin-bottom: 20px;
}

.result-header h2 {
    color: var(--third-color);
    font-size: 1.8rem;
}

.profiles {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.profile {
    flex: 0 0 48%;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.profile h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.bazi-info {
    margin-top: 10px;
}

.bazi-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.bazi-cell {
    flex: 0 0 22%;
    text-align: center;
    padding: 8px 0;
    background-color: rgba(255, 250, 237, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-weight: bold;
}

.match-result {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.match-result h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.score-container {
    text-align: center;
    margin: 30px 0;
}

.score {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: bold;
}

.score-desc {
    font-size: 1.2rem;
    color: var(--third-color);
    margin-top: 10px;
}

.detail-item {
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}

.detail-item h4 {
    color: var(--third-color);
    margin-bottom: 8px;
}

.back-btn {
    display: block;
    width: 200px;
    margin: 30px auto 0;
    background-color: var(--secondary-color);
    color: var(--third-color);
    text-align: center;
    padding: 10px 0;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background-color: var(--third-color);
    color: var(--light-color);
}

/* 结果页的婚姻建议样式 */
.marriage-advice {
    background-color: rgba(255, 250, 240, 0.8);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px dashed var(--border-color);
}

.marriage-advice h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.marriage-advice p {
    line-height: 1.8;
    text-align: justify;
}

/* 结果页的今日关系信息 */
.today-relationship {
    padding: 15px;
    background-color: rgba(255, 250, 240, 0.8);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

.today-relationship p {
    margin-bottom: 10px;
    line-height: 1.7;
}

.date-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px dotted var(--border-color);
    padding-top: 10px;
}

.date-info p {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .form-group label {
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select {
        width: 100%;
    }

    .profiles {
        flex-direction: column;
    }

    .profile {
        flex: 0 0 100%;
        margin-bottom: 20px;
    }

    .article-section,
    .auto-update-section,
    .more-info-section {
        padding: 15px;
    }

    .marriage-days li {
        display: block;
        margin: 5px 0;
    }

    .marriage-advice,
    .today-relationship {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.7rem;
    }

    header h1:before,
    header h1:after {
        display: none;
    }

    .form-section,
    form {
        padding: 15px;
    }

    .submit-btn {
        width: 100%;
    }

    .article-section h2,
    .auto-update-section h2,
    .more-info-section h2 {
        font-size: 1.3rem;
    }

    .marriage-advice h3,
    .auto-update-section h3 {
        font-size: 1.1rem;
    }
}