:root {
    --secondary-color: #1a237e;
    --accent-gold: #d4af37;
    --dark-bg: #0a0e2a;
    --light-bg: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --success-color: #2e7d32;
    --danger-color: #c62828;
    --border-radius: 8px;
    --primary-color: #b8860b;
    --primary-dark: #8b6914;
    --primary-light: #e6c87c;
    --bg-color: #f9f6f0;
    --card-bg: #fffef9;
    --border-color: #e0d6c2;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --radius: 10px;
    --warning-color: #f39c12;
}

#back-to-top {
    display: none !important;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.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;
}

/* 主要内容区 */
.m-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
}

/* 页面标题 */
.page-titl {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-titl::before {
    content: "💰";
    position: absolute;
    font-size: 180px;
    opacity: 0.1;
    right: -30px;
    top: -30px;
    transform: rotate(15deg);
}

.page-titl::after {
    content: "💰";
    position: absolute;
    font-size: 150px;
    opacity: 0.1;
    left: -20px;
    bottom: -20px;
    transform: rotate(-15deg);
}

.page-titl h1 {
    font-size: 28px;
    margin-bottom: 10px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.page-titl .subtitle {
    font-size: 16px;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-tit {
    text-align: center;
}

.title-decoration {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 20px auto;
}

.insight-box {
    background: #fefcf7;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0d6c2;

}

.insight-box h4 {
    margin-bottom: 12px;
}

.insight-box.warning {
    border-left-color: var(--warning-color);
    background: #fff8e1;
}

.insight-box.success {
    border-left-color: var(--success-color);
    background: #f1f8e9;
}

/* 表单样式 */
#calculation-page {
    background: #f9f6f0;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

.form-container {
    padding: 30px;
}

.form-section {
    background-color: #fffef9;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.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;
}

.calculate-btn {
    background: linear-gradient(to right, var(--primary-dark), var(--primary-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 18px 60px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(139, 105, 20, 0.2);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 105, 20, 0.3);
}

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

.calculate-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.calculate-btn:hover::after {
    left: 100%;
}

.info-section {
    background-color: #fefcf7;
    border-radius: var(--radius);
    padding: 25px;
    margin-top: 30px;
}

.info-title {
    font-size: 18px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

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

.info-content {
    color: var(--text-color);
}

.info-content p {
    margin-bottom: 12px;
}

.disclaimer {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* 结果页面样式 */

/* 八字排盘样式 */
.bazi-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    padding: 25px;
    margin: 25px 0;
}

.bazi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.bazi-pillar {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bazi-pillar strong {
    display: block;
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.bazi-pillar .stem {
    font-size: 18px;
    color: var(--danger-color);
}

.bazi-pillar .branch {
    font-size: 18px;
    color: var(--info-color);
}

.result-summary {
    background: linear-gradient(135deg, var(--light-bg) 0%, #e8eaf6 100%);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
}

.result-summary h4 {
    margin-bottom: 12px;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.metric-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.score {
    font-size: 48px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.highlight {
    color: var(--primary-color);
    font-weight: bold;
}

/* 八字排盘表格 */
.bazi-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    box-shadow: var(--shadow);
}

.bazi-table th {
    background: var(--secondary-color);
    color: white;
    padding: 15px;
    text-align: center;
}

.bazi-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
}

.bazi-table tr:nth-child(even) {
    background: var(--light-bg);
}

/* 每月财运网格 */
.monthly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.month-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-top: 4px solid;
    transition: transform 0.3s;
}

.month-card:hover {
    transform: translateY(-5px);
}

.month-card.good {
    border-color: var(--success-color);
}

.month-card.average {
    border-color: var(--warning-color);
}

.month-card.poor {
    border-color: var(--danger-color);
}

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

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

.month-tag {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.good .month-tag {
    background: #e8f5e9;
    color: var(--success-color);
}

.average .month-tag {
    background: #fff3e0;
    color: var(--warning-color);
}

.poor .month-tag {
    background: #ffebee;
    color: var(--danger-color);
}

.analysis-section {
    margin: 40px 0;
    padding: 20px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

/* 定价区域 */
.pricing {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px auto;
    max-width: 500px;
    box-shadow: var(--shadow);
}

.original-price {
    text-decoration: line-through;
    color: var(--text-light);
    font-size: 18px;
}

.current-price {
    margin: 20px 0;
}

.price {
    font-size: 48px;
    font-weight: bold;
    color: var(--danger-color);
}

.discount {
    background: var(--danger-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

/* 倒计时 */
.countdown-banner {
    background: linear-gradient(135deg, var(--danger-color) 0%, #e53935 100%);
    color: white;
    padding: 15px;
    text-align: center;
    border-radius: var(--border-radius);
    margin: 20px 0;
    animation: pulse 2s infinite;
    font-weight: bold;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

/* 八字排盘样式 */

.bazi-pillar {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bazi-pillar strong {
    display: block;
    font-size: 20px;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.bazi-pillar .stem {
    font-size: 18px;
    color: var(--danger-color);
}

.bazi-pillar .branch {
    font-size: 18px;
    color: var(--info-color);
}


/* 移动端适配 */
@media (max-width: 768px) {
    .m-content {
        padding: 20px;
    }

    .form-container {
        padding: 12px;
    }

    .form-container .info-section {
        display: none;
    }

    .date-input {
        flex-direction: column;
        align-items: flex-start;
    }

    .key-metrics {
        grid-template-columns: 1fr;
    }

    .btn-large {
        padding: 15px 30px;
        font-size: 18px;
    }

    .monthly-analysis {
        grid-template-columns: 1fr;
    }

    .bazi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .key-metrics {
        grid-template-columns: 1fr;
    }

    .monthly-grid {
        grid-template-columns: 1fr;
    }

    .premium-lock {
        padding: 20px;
    }

    .price {
        font-size: 36px;
    }

    .analysis-section {
        margin: 20px 0;
        padding: 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;
    }

    .calculate-btn {
        font-size: 16px;
        width: 100%;
    }

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

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

    .form-section {
        padding: 16px;
    }
    html, body {
        font-size: 14px;
    }
    .note {
        font-size: 12px;
    }
    main.container {
       padding-bottom: 120px;
    }
}