:root {
    --accent-gold: #d4af37;
    --text-color: #333;
    --text-light: #666;
    --success-color: #2e7d32;
    --danger-color: #c62828;
    --border-radius: 8px;
    --primary-dark: #8b6914;
    --primary-light: #e6c87c;
    --bg-color: #f9f6f0;
    --card-bg: #fffef9;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --warning-color: #f39c12;
    /* --primary-color: #8b4513; */
    /* --secondary-color: #d2691e; */
    /* --accent-color: #c19a6b;
    --light-bg: #f9f5f0;
    --dark-bg: #5d4037;
    --male-color: #4a86e8;
    --female-color: #e06666;
    --score-high: #4caf50;
    --score-medium: #ff9800;
    --score-low: #f44336; */
    --border-color: #d7ccc8;
    /* 边框色：金黄色 */
}

:root {
    --primary-color: #c53030;
    /* 主色调：朱红色，象征喜庆吉祥 */
    --secondary-color: #d97706;
    /* 辅色：琥珀色，象征富贵 */
    --accent-color: #b45309;
    /* 强调色：深琥珀色 */
    --light-bg: #fef3c7;
    /* 浅背景：淡黄色，象征温馨和谐 */
    --dark-bg: #991b1b;
    /* 深背景：深红色 */
    --male-color: #2563eb;
    /* 男方颜色：传统蓝色，象征阳刚 */
    --female-color: #db2777;
    /* 女方颜色：桃红色，象征柔美 */
    --score-high: #059669;
    /* 高分：翡翠绿，象征吉祥如意 */
    --score-medium: #d97706;
    /* 中分：琥珀色 */
    --score-low: #dc2626;
    /* 低分：红色提醒 */
    --gold-color: #f59e0b;
    /* 金色：用于装饰和重要元素 */
    --pink-color: #f472b6;
    /* 粉红色：浪漫氛围 */
}

/* 头部样式 */
#back-to-top {
    display: none !important;
}

.header_content {
    text-align: center;
    padding: 30px 30px 40px;
    position: relative;
    background: linear-gradient(135deg, #c53030 0%, #9b2c2c 100%);
    margin-top: 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    color: #fff;
}

.header_content::before {
    content: "囍";
    position: absolute;
    font-size: 120px;
    opacity: 0.1;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Ma Shan Zheng', cursive;
}

.title {
    font-size: 3.2rem;
    text-shadow: 2px 2px 4px rgba(183, 28, 28, 0.1);
    margin-bottom: 10px;
    letter-spacing: 5px;
}

.header_content i {
    color: #f6e05e;
    font-size: 28px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    text-align: center;
}

.note {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 10px;
    padding: 12px 16px;
    background: rgba(184, 134, 11, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.note i {
    color: var(--primary-dark);
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 表单区域 */

.form-container {
    padding: 30px;
    background: #f9f6f0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.couple-forms {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.form-section {
    flex: 1;
    min-width: 300px;
    background: #fffef9;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #e8e0d5;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.section-title {
    font-size: 20px;
    color: #c53030;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8d0b3;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #c53030;
}

.free-result .section-title {
    color: #8b5a2b;
}

free-result .section-title i {
    color: #8b5a2b;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.input-item {
    flex: 1;
    min-width: 150px;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.radio-options {
    display: flex;
    background: #fef8f0;
    border-radius: 8px;
    padding: 4px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-option input {
    display: none;
}

.radio-label {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
    margin-bottom: 0 !important;
    cursor: pointer;
}

.radio-option input:checked+.radio-label {
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    color: var(--primary);
    margin-bottom: 0 !important;
    cursor: pointer;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23b8860b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
    padding-left: 20px;
}

.time-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.time-select {
    flex: 1;
    min-width: 200px;
}

.time-input {
    flex: 0.5;
    min-width: 100px;
}

.school-select {
    margin-top: 15px;
}

.year-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.year-input {
    width: 150px;
}

.year-container {
    text-align: center;
}

.year-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.year-input-container input {
    width: 150px;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    background: white;
}

.calculate-btn-container {
    text-align: center;
    margin: 20px auto;
}

.submit-btn {
    display: block;
    background: linear-gradient(to right, #d32f2f, #f44336);
    color: white;
    border: none;
    padding: 16px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 30px auto 0;
    letter-spacing: 2px;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(to right, #b71c1c, #d32f2f);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.4);
}

.submit-btn:active {
    transform: translateY(1px);
}

.cesuan-info-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.cesuan-info-title {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.cesuan-disclaimer {
    margin-top: 10px;
    color: #999;
    font-size: 14px;
    font-style: italic;
}

.cesuan-info-content {
    color: #333;
    font-size: 14px;
}

/* 测算结果 */
.free-result {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: 20px;
    position: relative;
}


/* 容器：深红色渐变背景，带暗纹 */
.result-head-modern {
    background: linear-gradient(135deg, #a71d1d 0%, #7a1515 100%);
    padding: 50px 20px;
    position: relative;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

/* 囍字水印优化：居中且更轻盈 */
.result-head-modern::after {
    content: "囍";
    position: absolute;
    font-size: 180px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    font-family: serif;
    pointer-events: none;
}

/* 标题样式 */
.title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 5px;
}
.title-section h1 {
    font-size: 28px;
    letter-spacing: 6px;
    margin: 0;
    color: #f6e05e;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.subtitle-eng {
    font-size: 10px;
    letter-spacing: 3px;
    opacity: 0.6;
    margin-bottom: 5px;
}
.subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 300;
}

/* 两人信息卡片区域 */
.couple-display {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: relative;
    z-index: 1;
}

.person-tile {
    flex: 0 1 42%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px 10px;
    position: relative;
}

/* 乾坤标签 */
.tile-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f6e05e;
    color: #7a1515;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.name-row .name {
    font-size: 22px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.birth-row {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 8px;
    line-height: 1.4;
}

.meta-row {
    background: rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 11px;
}
.meta-sep { margin: 0 5px; opacity: 0.5; }

/* 中间连心效果 */
.fate-connector {
    flex: 0 0 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pulse-heart {
    width: 44px;
    height: 44px;
    background: #f6e05e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulse-gold 2s infinite;
}

.xi-char {
    color: #a71d1d;
    font-size: 20px;
    font-weight: bold;
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(246, 224, 94, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(246, 224, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(246, 224, 94, 0); }
}

.notice {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 30px;
    font-size: 14px;
}

.total-score {
    text-align: center;
    padding: 25px;
    background: linear-gradient(to right, #f5f5f5, #e8e8e8);
    margin: 0 30px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.score-value {
    font-size: 72px;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-label {
    font-size: 20px;
    color: #666;
    margin-bottom: 15px;
}

.score-bar {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    width: 80%;
    margin: 0 auto;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(to right, var(--score-low), var(--score-medium), var(--score-high));
    width: 100%;
    border-radius: 10px;
}

.content-section {
    padding: 0 30px 30px;
}

.section-score {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
}

.bazi-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.bazi-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.bazi-header {
    background-color: #f5f5f5;
    padding: 15px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.male-header {
    border-left: 4px solid var(--male-color);
}

.female-header {
    border-left: 4px solid var(--female-color);
}

.bazi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    padding: 15px;
}

.bazi-item {
    padding: 10px 5px;
    border-right: 1px dashed var(--border-color);
}

.bazi-item:last-child {
    border-right: none;
}

.bazi-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.bazi-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--dark-bg);
}

.hehun-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.hehun-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hehun-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.hehun-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hehun-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.hehun-score {
    font-size: 18px;
    font-weight: bold;
    padding: 5px 15px;
    border-radius: 20px;
    background-color: #f5f5f5;
}

.hehun-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.hehun-detail {
    background-color: #f9f9f9;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    border-left: 3px solid var(--accent-color);
}

.detail-toggle {
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
}

.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.info-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.info-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.info-content {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    flex: 1;
    min-width: 100px;
}

.info-label {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    font-weight: bold;
    color: var(--dark-bg);
}


.yunshi-footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.85rem;
    color: #999;
}

.footer-note {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3e0;
    border-radius: 8px;
    color: #e65100;
    font-weight: bold;
    text-align: center;
}

/* 付费解锁 */
/* 虚化遮罩效果 */
/* 当锁定层显示时，给 body 动态添加这个类 */
body.modal-open {
    overflow: hidden !important;
    height: 100vh !important;
    width: 100vw !important;
    position: fixed; /* 这一行在 iOS Safari 上非常关键 */
}

.locked-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
     width: 100%;
    height: 100%;
    z-index: 99;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 关键改动：如果内容过长，允许遮罩层内部滚动，而不是滚动背景 */
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; /* 保证手机端滚动顺滑 */
    backdrop-filter: blur(8px); /* 现代浏览器高阶模糊 */
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.4); /* 浅色半透明，显得更高级 */
}
.pay-card {
    position: relative;
    z-index: 2;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    background: #fff;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(227, 44, 44, 0.15);
    border: 1px solid #f9e1e1;
}

.pay-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #e32c2c;
    color: #fff;
    padding: 2px 15px;
    border-radius: 20px;
    font-size: 12px;
}

.pay-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
        display: flex;
    align-items: center;
    justify-content: center;
}

.pay-title i {
    color: #e32c2c;
    vertical-align: middle;
}

.pay-benefits {
    text-align: left;
    background: #fffcf5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pay-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pay-benefits li {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.pay-benefits li i {
    color: #52c41a;
    margin-right: 5px;
}

.price-box {
    margin-bottom: 20px;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.current-price {
    color: #e32c2c;
    font-weight: bold;
}

.current-price .symbol {
    font-size: 20px;
}

.current-price .number {
    font-size: 36px;
}

.pay-btn {
    width: 100%;
    background: linear-gradient(90deg, #ff4d4f 0%, #e32c2c 100%);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(227, 44, 44, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

.pay-footer {
    margin-top: 20px;
}

.secure-tip {
    font-size: 12px;
    color: #999;
    display: block;
    margin-bottom: 10px;
}

.pay-icons {
    color: #b71c1c;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    margin: 0 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .header_content {
        padding: 25px 30px 40px;
    }

    .form-container,
    .free-result,
    .premium-section {
        padding: 10px;
    }

    .couple-forms {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }

    .form-section {
        width: 100%;
        padding: 14px;
    }

    .date-time-container {
        flex-direction: column;
    }

    .date-input {
        width: 100%;
    }

    .yin-yang-symbol {
        display: none;
    }

    h1 {
        font-size: 24px;
    }

    .score-value {
        font-size: 4rem;
    }

    .premium-section:before {
        right: -60px;
        font-size: 0.9rem;
    }

    input[type="text"],
    input[type="number"],
    select {
        font-size: 13px;
    }

    .input-group label {
        font-size: 13px;
    }

    .input-row {
        gap: 10px;
    }

    .input-item {
        min-width: 30%;
    }

    .note {
        font-size: 12px;
    }

    .calculate-btn-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 20px;
        background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 70%, transparent);
        z-index: 100;
        backdrop-filter: blur(10px);
        margin: 0;
    }

    .submit-btn {
        width: 100%;
        margin: 0 auto;
    }

    .cesuan-disclaimer {
        font-size: 12px;
    }

    .cesuan-info-content {
        font-size: 12px;
    }

    .couple-info {
        flex-direction: column;
        gap: 16px;
    }

    .notice {
        margin: 20px 0;
        font-size: 12px;
    }

    .total-score {
        margin: 0 0 30px;
        padding: 24px 14px;
    }

    .content-section {
        padding: 0;
    }

    .bazi-section {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bazi-grid {
        padding: 10px;
    }

    .bazi-value {
        font-size: 16px;
    }

    .info-value {
        font-size: 14px;
    }

    .bazi-section {
        margin-bottom: 16px;
    }

    .additional-info {
        gap: 12px;
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .hehun-card {
        padding: 16px;
    }

    .hehun-score {
        font-size: 14px;
    }

    .hehun-items {
        gap: 16px;
        margin-bottom: 16px;
    }

    main.container {
        padding-bottom: 100px;
    }

    .yunshi-footer {
        padding: 20px 8px;
        font-size: 12px;
    }

    .disclaimer {
        font-size: 12px;
    }
}

/* 适配移动端：在极小屏幕下缩小字体 */
@media (max-width: 400px) {
    .name-row .name { font-size: 18px; }
    .birth-row { font-size: 11px; }
    .person-tile { padding: 15px 5px; }
}
