:root {
    --hehun-gold: #d4af37;
    --hehun-coral: #e8636f;
    --hehun-bg: #0d0d1a;
    --hehun-bg-secondary: #1a1a2e;
    --hehun-text: rgba(212,175,55,1);
    --hehun-text-secondary: rgba(212,175,55,0.7);
    --hehun-text-light: rgba(212,175,55,0.5);
    --hehun-border: rgba(212,175,55,0.22);
    --hehun-card: rgba(26,26,46,0.85);
    --font-sans: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-display: 'KaiTi', 'STKaiti', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--hehun-text);
    background: var(--hehun-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── 星空背景 ─── */
.stars-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.star {
    position: absolute;
    border-radius: 50%;
    background: var(--hehun-gold);
    opacity: 0;
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.7; }
}

/* ─── Hero 首屏 ─── */
.hero-section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px 40px;
}

.hero-top-actions {
    position: absolute;
    top: 20px;
    right: 24px;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 10;
}

.hero-action-btn {
    font-size: 12px;
    color: rgba(212,175,55,0.6);
    padding: 5px 14px;
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-display);
    transition: all 0.2s ease;
}
.hero-action-btn:hover {
    color: var(--hehun-gold);
    border-color: rgba(212,175,55,0.4);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-title-top {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--hehun-text-secondary);
    letter-spacing: 8px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.3s;
}

.hero-title-main {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--hehun-gold);
    text-shadow: 0 0 30px rgba(212,175,55,0.3);
    letter-spacing: 6px;
    margin: 0;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.6s;
}

.hero-icon-area {
    margin: 16px 0;
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 0.9s;
}
.hero-icon-area:hover {
    transform: scale(1.05);
    transition: transform 0.3s;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--hehun-text-light);
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards 1.2s;
}

/* SVG 动画 */
.hero-svg-glow {
    animation: svgPulse 3s ease-in-out infinite;
}
.hero-svg-ring-left {
    animation: ringPulse 2.5s ease-in-out infinite;
}
.hero-svg-ring-right {
    animation: ringPulse 2.5s ease-in-out infinite 1.2s;
}
.hero-svg-center {
    animation: centerGlow 2s ease-in-out infinite;
}

@keyframes svgPulse {
    0%, 100% { stroke: rgba(212,175,55,0.15); }
    50% { stroke: rgba(212,175,55,0.35); }
}
@keyframes ringPulse {
    0%, 100% { stroke-width: 2; opacity: 0.7; }
    50% { stroke-width: 3; opacity: 1; }
}
@keyframes centerGlow {
    0%, 100% { fill: #d4af37; opacity: 0.8; }
    50% { fill: #e8c547; opacity: 1; }
}

.hero-footer-text {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 11px;
    color: rgba(212,175,55,0.2);
    letter-spacing: 8px;
    font-family: var(--font-display);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Result Header 工具栏 ─── */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(212,175,55,0.1);
    background: rgba(20,20,34,0.95);
    position: sticky;
    top: 0;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.result-brand {
    font-size: 14px;
    color: var(--hehun-gold);
    letter-spacing: 2px;
    font-family: var(--font-display);
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.result-header-btn {
    font-size: 11px;
    color: rgba(212,175,55,0.6);
    padding: 4px 10px;
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-family: var(--font-display);
    transition: all 0.2s ease;
}
.result-header-btn:hover {
    color: var(--hehun-gold);
    border-color: rgba(212,175,55,0.4);
}

/* ─── 设置下拉菜单 ─── */
.settings-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(20,16,28,0.95);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 10px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 16px;
    z-index: 100;
}

.settings-account-label {
    font-size: 10px;
    color: rgba(212,175,55,0.4);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.settings-phone-display {
    font-size: 14px;
    color: rgba(212,175,55,0.8);
    font-family: var(--font-display);
}

.settings-depth-row {
    display: flex;
    align-items: center;
    margin-top: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-depth-row:hover {
    background: rgba(212,175,55,0.08);
}

.settings-depth-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.settings-depth-count {
    font-size: 12px;
    color: rgba(212,175,55,0.8);
    margin-left: 8px;
}

.settings-depth-arrow {
    margin-left: auto;
    font-size: 14px;
    color: rgba(212,175,55,0.4);
}

.settings-divider {
    height: 1px;
    background: rgba(212,175,55,0.15);
    margin: 12px 0;
}

.settings-changepwd-btn {
    width: 100%;
    padding: 8px 0;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 6px;
    color: rgba(212,175,55,0.7);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-display);
    transition: all 0.2s ease;
}
.settings-changepwd-btn:hover {
    background: rgba(212,175,55,0.15);
    color: var(--hehun-gold);
}

.settings-logout-btn {
    width: 100%;
    padding: 8px 0;
    background: rgba(220,60,80,0.12);
    border: 1px solid rgba(220,60,80,0.35);
    border-radius: 6px;
    color: #e05565;
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-display);
    transition: all 0.2s ease;
}
.settings-logout-btn:hover {
    background: rgba(220,60,80,0.22);
    color: #e8606f;
}

/* ─── 侧边栏 ─── */
.sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #1e1e36 0%, #151528 100%);
    border-right: 1px solid rgba(212,175,55,0.1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    z-index: 300;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}
.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(212,175,55,0.1);
}
.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--hehun-gold);
    font-family: var(--font-display);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(212,175,55,0.6);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.sidebar-close:hover {
    color: var(--hehun-gold);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.history-empty {
    text-align: center;
    color: rgba(212,175,55,0.5);
    padding: 40px 20px;
    font-size: 0.9rem;
}

.history-item {
    position: relative;
    padding: 12px 16px;
    background: rgba(212,175,55,0.03);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.history-item:hover {
    background: rgba(212,175,55,0.06);
    border-color: rgba(212,175,55,0.25);
}
.history-item.active {
    border-color: rgba(212,175,55,0.3);
    background: rgba(212,175,55,0.08);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.history-item-date {
    font-size: 0.75rem;
    color: rgba(212,175,55,0.85);
}

.history-item-menu {
    position: relative;
}

.history-menu-btn {
    background: none;
    border: none;
    color: rgba(212,175,55,0.4);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 6px;
    line-height: 1;
}
.history-menu-btn:hover {
    color: var(--hehun-gold);
}

.history-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1e1e36;
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    z-index: 10;
    min-width: 100px;
}
.history-dropdown.active {
    display: block;
}

.history-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    color: rgba(212,175,55,0.75);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}
.history-dropdown-item:hover {
    background: rgba(212,175,55,0.08);
}
.history-dropdown-item.delete-btn {
    color: #e05565;
}
.history-dropdown-item.delete-btn:hover {
    background: rgba(244,67,54,0.1);
}

.history-item-meta {
    font-size: 0.8rem;
    color: rgba(212,175,55,0.6);
    line-height: 1.5;
}

.history-score-high { color: #d4af37; font-weight: bold; }
.history-score-mid { color: #93c47d; font-weight: bold; }
.history-score-low { color: #e06666; font-weight: bold; }

body.sidebar-open {
    overflow: hidden;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 299;
}
body.sidebar-open .sidebar-overlay {
    display: block;
}

/* ─── 交叉引导卡片 ─── */
.cross-guide-card {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 32px auto;
    padding: 12px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cross-guide-title {
    font-size: 0.85rem;
    color: rgba(212,175,55,0.4);
    margin-bottom: 4px;
}

.cross-guide-desc {
    font-size: 0.8rem;
    color: rgba(212,175,55,0.3);
    margin-bottom: 8px;
}

.cross-guide-link {
    color: rgba(212,175,55,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.cross-guide-link:hover {
    color: rgba(212,175,55,0.7);
}

/* ─── 修改密码弹窗 ─── */
.changepwd-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.changepwd-modal-overlay.active {
    display: flex;
}

.changepwd-modal {
    background: rgba(20,16,28,0.97);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 380px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.changepwd-modal h3 {
    color: rgba(212,175,55,0.85);
    font-size: 16px;
    font-family: var(--font-display);
    margin: 0 0 20px;
    text-align: center;
}

.changepwd-field {
    margin-bottom: 14px;
}
.changepwd-field label {
    display: block;
    font-size: 11px;
    color: rgba(212,175,55,0.5);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}
.changepwd-field input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.changepwd-field input:focus {
    border-color: rgba(212,175,55,0.5);
}

.changepwd-error {
    font-size: 11px;
    color: #e05565;
    margin-top: 4px;
    min-height: 16px;
}

.changepwd-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.changepwd-buttons button {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-display);
    transition: all 0.2s ease;
}

.changepwd-cancel-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
}
.changepwd-cancel-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
}

.changepwd-submit-btn {
    background: rgba(212,175,55,0.15);
    border: 1px solid rgba(212,175,55,0.35);
    color: var(--hehun-gold);
}
.changepwd-submit-btn:hover {
    background: rgba(212,175,55,0.25);
}

/* ─── Modal 弹窗 ─── */
.form-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(20,20,34,0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}
.form-modal-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}
.form-modal-overlay.hidden {
    display: none;
}
.form-modal {
    background: linear-gradient(145deg, rgba(30,30,54,0.97) 0%, rgba(20,20,40,0.98) 100%);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 16px;
    padding: 32px;
    width: 400px;
    max-width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 60px rgba(212,175,55,0.08);
}
.modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: 50%;
    background: transparent;
    color: rgba(212,175,55,0.6);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}
.modal-close-btn:hover {
    background: rgba(212,175,55,0.1);
    color: var(--hehun-gold);
    border-color: rgba(212,175,55,0.4);
}
.modal-close-btn.hidden {
    display: none;
}
/* ─── Modal 主题色 ─── */
.form-modal.theme-male {
    border-color: rgba(122,184,224,0.35);
    box-shadow: 0 0 60px rgba(122,184,224,0.08);
}
.form-modal.theme-male .calendar-toggle-btn.active {
    background: #7ab8e0;
    border-color: #7ab8e0;
}
.form-modal.theme-male .step-btn-next {
    background: linear-gradient(135deg, #7ab8e0, #5a9bc0);
}
.form-modal.theme-male .decor-line,
.form-modal.theme-male .decor-line-bottom {
    background: linear-gradient(90deg, transparent, #7ab8e0, transparent);
}
.form-modal.theme-female {
    border-color: rgba(224,145,171,0.35);
    box-shadow: 0 0 60px rgba(224,145,171,0.08);
}
.form-modal.theme-female .calendar-toggle-btn.active {
    background: #e091ab;
    border-color: #e091ab;
}
.form-modal.theme-female .step-btn-submit {
    background: linear-gradient(135deg, #e091ab, #c07090);
}
.form-modal.theme-female .decor-line,
.form-modal.theme-female .decor-line-bottom {
    background: linear-gradient(90deg, transparent, #e091ab, transparent);
}
.gender-icon.male { color: #7ab8e0; }
.gender-icon.female { color: #e091ab; }

/* ─── 性别顺序切换 ─── */
.gender-order-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    gap: 0;
}
.gender-order-btn {
    background: rgba(212,175,55,0.06);
    color: rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 4px 16px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}
.gender-order-btn:first-child { border-radius: 4px 0 0 4px; }
.gender-order-btn:last-child { border-radius: 0 4px 4px 0; border-left: none; }
.gender-order-btn.active {
    background: rgba(212,175,55,0.15);
    color: var(--hehun-gold);
    border-color: rgba(212,175,55,0.3);
}

/* ─── Modal Header 装饰 ─── */
.form-modal-header {
    text-align: center;
    margin-bottom: 24px;
}
.form-modal-header .decor-line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hehun-gold), transparent);
    margin: 0 auto 12px;
}
.form-modal-header .step-title {
    font-size: 18px;
    color: var(--hehun-gold);
    letter-spacing: 3px;
    font-weight: 600;
    margin: 0;
}
.form-modal-header .form-subtitle {
    font-size: 11px;
    color: rgba(212,175,55,0.6);
    margin-top: 6px;
    letter-spacing: 1px;
}
.form-modal-header .decor-line-bottom {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hehun-gold), transparent);
    margin: 12px auto 0;
}
.form-modal-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 11px;
    color: rgba(212,175,55,0.25);
    letter-spacing: 6px;
    font-family: var(--font-display);
}

/* ─── 公历/农历 Toggle ─── */
.calendar-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.calendar-toggle-btn {
    background: rgba(212,175,55,0.08);
    color: rgba(212,175,55,0.5);
    border: 1px solid var(--hehun-border);
    padding: 6px 24px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.calendar-toggle-btn:first-child {
    border-radius: 6px 0 0 6px;
}
.calendar-toggle-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}
.calendar-toggle-btn.active {
    background: var(--hehun-gold);
    color: var(--hehun-bg);
    border-color: var(--hehun-gold);
    font-weight: 600;
}

/* ─── 表单 2x2 Grid ─── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--hehun-text-secondary);
    margin-bottom: 4px;
}
.form-group select {
    width: 100%;
    height: 40px;
    background: rgba(13,13,26,0.8);
    border: 1px solid var(--hehun-border);
    border-radius: 6px;
    color: var(--hehun-text);
    padding: 0 10px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d4af37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.form-group select:focus {
    outline: none;
    border-color: var(--hehun-gold);
    box-shadow: 0 0 8px rgba(212,175,55,0.15);
}
.form-group select.invalid {
    border-color: #e8636f;
    animation: shake 0.3s;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ─── 步骤切换 ─── */
.step-content {
    opacity: 1;
    transition: opacity 0.2s;
}
.step-content.hidden {
    display: none;
}

/* ─── 按钮 ─── */
.step-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.step-btn-next, .step-btn-submit {
    background: linear-gradient(135deg, var(--hehun-gold), #b8860b);
    color: var(--hehun-bg);
}
.step-btn-next:hover, .step-btn-submit:hover {
    box-shadow: 0 4px 16px rgba(212,175,55,0.3);
}
.step-btn-back {
    background: transparent;
    border: 1px solid var(--hehun-border);
    color: var(--hehun-text-secondary);
}
.step-btn-back:hover {
    border-color: var(--hehun-gold);
    color: var(--hehun-gold);
}
.step-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.step-actions {
    display: flex;
    gap: 10px;
}
.step-actions .step-btn {
    flex: 1;
}
.step-actions .step-btn-back {
    flex: 0 0 auto;
    width: auto;
    padding: 12px 20px;
}

/* ─── 摘要栏 ─── */
.summary-bar {
    position: relative;
    z-index: 1;
    background: rgba(212,175,55,0.06);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(212,175,55,0.1);
}
.summary-bar.hidden {
    display: none;
}
.summary-bar-info {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.5;
}
.summary-bar-info .male-info {
    color: #7ab8e0;
}
.summary-bar-info .female-info {
    color: #e091ab;
}
.summary-bar-heart {
    display: inline-block;
    margin: 0 10px;
    color: #e06688;
    font-size: 0.75rem;
}

/* ─── 合盘图 ─── */
.hepan-section {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 20px;
}
.hepan-canvas {
    max-width: 360px;
    margin: 0 auto;
}

/* ─── 维度评分 ─── */
.dimensions-section {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 32px;
    padding: 0 20px;
}
.dim-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.dim-name {
    width: 90px;
    font-size: 0.85rem;
    color: var(--hehun-text-secondary);
    flex-shrink: 0;
}
.dim-bar {
    flex: 1;
    height: 8px;
    background: rgba(212,175,55,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 12px;
}
.dim-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--hehun-gold), #e8c547);
    transition: width 1s ease-out;
    width: 0;
    box-shadow: 0 0 6px rgba(212,175,55,0.3);
}
.dim-score {
    width: 40px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--hehun-gold);
}

/* ─── 总结卡片 ─── */
.summary-card {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 24px;
    background: var(--hehun-card);
    border: 1px solid var(--hehun-border);
    border-radius: 12px;
}
.summary-card-title {
    color: var(--hehun-gold);
    font-size: 1rem;
    margin-bottom: 12px;
}
.summary-card p {
    color: var(--hehun-text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ─── 分享 ─── */
.share-section {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}
.share-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--hehun-border);
    border-radius: 6px;
    color: var(--hehun-text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}
.share-btn:hover { border-color: var(--hehun-gold); color: var(--hehun-gold); box-shadow: 0 0 12px rgba(212,175,55,0.15); }

/* ─── 深度预览（半遮半露） ─── */
.deep-preview {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 32px;
    padding: 24px;
    background: var(--hehun-card);
    border: 1px solid var(--hehun-border);
    border-radius: 12px;
}
.deep-preview-item { margin-bottom: 16px; }
.deep-preview-item h4 { font-size: 0.9rem; color: var(--hehun-gold); margin-bottom: 4px; }
.deep-preview-item p {
    font-size: 0.85rem;
    color: var(--hehun-text-secondary);
    background: linear-gradient(90deg, var(--hehun-text-secondary) 40%, transparent 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.unlock-btn {
    display: block;
    width: 100%;
    max-width: 240px;
    margin: 16px auto 0;
    padding: 12px;
    background: linear-gradient(135deg, var(--hehun-coral), #c4506a);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.unlock-btn:hover { box-shadow: 0 6px 24px rgba(232,99,111,0.35); transform: translateY(-1px); }

/* ─── 基础分析模块 ─── */
.basic-modules {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 32px;
}

/* ─── 深度报告 ─── */
.deep-report {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 32px;
}
.deep-module {
    background: var(--hehun-card);
    border: 1px solid var(--hehun-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}
.deep-module h3 { color: var(--hehun-gold); font-size: 1rem; margin-bottom: 12px; }
.deep-module .summary { color: var(--hehun-coral); font-size: 0.9rem; margin-bottom: 12px; }
.deep-module .content { color: var(--hehun-text-secondary); font-size: 0.9rem; line-height: 1.8; }
.hepan-explanation {
    margin-top: 16px;
    padding: 14px 18px;
    background: rgba(212,175,55,0.05);
    border-left: 3px solid rgba(212,175,55,0.45);
    border-radius: 0 8px 8px 0;
    color: var(--hehun-text-secondary);
    font-size: 0.88rem;
    line-height: 1.85;
}

/* ─── 通用 ─── */
.hidden { display: none !important; }

.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    background: var(--hehun-card);
    border: 1px solid var(--hehun-gold);
    border-radius: 8px;
    color: var(--hehun-gold);
    font-size: 0.9rem;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(8px);
}
.toast.visible { opacity: 1; pointer-events: auto; }

/* ─── 自定义弹窗（modal.js 共用） ─── */
.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-modal-box {
    background: rgba(20,16,28,0.97);
    border: 1px solid rgba(212,175,55,0.25);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.custom-modal-title {
    font-size: 16px;
    color: var(--hehun-gold);
    font-family: var(--font-display);
    margin-bottom: 12px;
}
.custom-modal-message {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
    line-height: 1.6;
}
.custom-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.custom-modal-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
}
.custom-modal-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
}
.custom-modal-btn-primary {
    background: rgba(212,175,55,0.15);
    border-color: rgba(212,175,55,0.35);
    color: var(--hehun-gold);
}
.custom-modal-btn-primary:hover {
    background: rgba(212,175,55,0.25);
}
.custom-modal-btn-danger {
    background: rgba(220,60,80,0.12);
    border-color: rgba(220,60,80,0.35);
    color: #e05565;
}
.custom-modal-btn-danger:hover {
    background: rgba(220,60,80,0.22);
}

/* ─── 关系一览表 ─── */
.compatibility-table {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 32px;
    padding: 20px 24px;
    background: var(--hehun-card);
    border: 1px solid var(--hehun-border);
    border-radius: 12px;
}

.compatibility-title {
    text-align: center;
    font-size: 1rem;
    color: var(--hehun-gold);
    font-family: var(--font-display);
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.compatibility-row {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(212,175,55,0.08);
    border-radius: 6px;
    cursor: default;
}
.compatibility-row:last-child {
    border-bottom: none;
}

.compatibility-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 4px;
}

.compatibility-label {
    font-size: 0.85rem;
    color: var(--hehun-text-secondary);
    font-family: var(--font-display);
}

.compatibility-score {
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-display);
}
.compatibility-score.high {
    color: #4caf50;
}
.compatibility-score.medium {
    color: #e0a030;
}
.compatibility-score.low {
    color: #e05565;
}
.compatibility-unit {
    font-size: 0.7em;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 1px;
}

.compatibility-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.compatibility-bar {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.8s ease-out;
}
.compatibility-bar.high {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}
.compatibility-bar.medium {
    background: linear-gradient(90deg, #e0a030, #f0c060);
}
.compatibility-bar.low {
    background: linear-gradient(90deg, #e05565, #ef7080);
}

.compatibility-summary {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}

/* ─── 移动端适配 ─── */
@media (max-width: 768px) {
    .result-header {
        padding: 10px 12px;
    }
    .result-brand {
        font-size: 12px;
    }
    .result-header-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    .result-header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .sidebar {
        width: 280px;
        left: -280px;
    }
    body.sidebar-open {
        overflow: hidden;
    }
    .compatibility-table {
        margin-left: 12px;
        margin-right: 12px;
        padding: 16px;
    }
    .compatibility-label {
        width: 68px;
        font-size: 0.8rem;
    }
    .compatibility-summary {
        font-size: 0.78rem;
        padding: 0 8px;
    }
    .summary-card {
        margin-left: 12px;
        margin-right: 12px;
        padding: 16px;
    }
    .deep-preview,
    .basic-modules,
    .deep-report {
        margin-left: 12px;
        margin-right: 12px;
    }
    .share-section {
        padding: 0 12px;
    }
}

@media (max-width: 640px) {
    .form-modal {
        width: 100vw;
        max-width: 100vw;
        border-radius: 16px 16px 0 0;
        max-height: 90vh;
        position: fixed;
        bottom: 0;
        margin: 0;
    }
    .form-modal-overlay {
        align-items: flex-end;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group select {
        height: 44px;
    }
    .calendar-toggle-btn {
        flex: 1;
    }
    .summary-bar-info {
        font-size: 0.72rem;
    }
    .summary-bar-heart {
        margin: 0 6px;
    }
    .hero-section {
        padding: 40px 16px 30px;
    }
    .hero-title-main {
        font-size: 1.6rem;
    }
    .hero-title-top {
        font-size: 0.85rem;
    }
}

/* ─── 命盘档案卡片 ─── */
.bazi-profile-card {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto 24px;
    border: 1px solid var(--hehun-border);
    border-radius: 12px;
    overflow: hidden;
}

.bazi-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(212,175,55,0.06);
    cursor: pointer;
    user-select: none;
}

.bazi-profile-title {
    font-size: 0.85rem;
    color: rgba(212,175,55,0.7);
    letter-spacing: 2px;
    font-family: var(--font-display);
}

.bazi-profile-toggle {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.bazi-profile-toggle.expanded {
    transform: rotate(180deg);
}

.bazi-profile-body {
    display: flex;
    gap: 0;
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.4s ease;
    position: relative;
}

.bazi-profile-body.expanded {
    max-height: 1200px;
}

/* 底部渐变遮罩，展开后消失 */
.bazi-profile-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(transparent, var(--hehun-bg, #0d0d1a));
    pointer-events: none;
    transition: opacity 0.3s;
    border-radius: 0 0 12px 12px;
}

.bazi-profile-card.expanded::after {
    opacity: 0;
}

.bazi-profile-male,
.bazi-profile-female {
    flex: 1;
    padding: 16px 20px;
}

.bazi-profile-male {
    border-right: 1px solid var(--hehun-border);
}

.bazi-profile-gender-label {
    font-size: 0.8rem;
    margin-bottom: 12px;
    font-family: var(--font-display);
}

/* 四柱横排容器 */
.bazi-pillars-grid {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.bazi-pillar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bazi-pillar-label {
    font-size: 0.65rem;
    color: var(--hehun-text-light);
    text-align: center;
}

.bazi-pillar-char {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--hehun-text-secondary);
    background: rgba(212,175,55,0.05);
    border: 1px solid var(--hehun-border);
}

.bazi-wuxing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: 2px;
    vertical-align: middle;
    flex-shrink: 0;
}

.bazi-profile-divider {
    height: 1px;
    background: var(--hehun-border);
    margin: 10px 0;
}

.bazi-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.bazi-meta-label {
    width: 32px;
    color: var(--hehun-text-light);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.bazi-meta-value {
    color: var(--hehun-text-secondary);
}

.bazi-meta-method {
    color: var(--hehun-text-light);
    font-size: 0.72rem;
}

@media (max-width: 768px) {
    .bazi-profile-card {
        margin-left: 12px;
        margin-right: 12px;
    }
    .bazi-profile-male,
    .bazi-profile-female {
        padding: 10px 8px;
    }
    .bazi-profile-gender-label {
        font-size: 0.72rem;
        margin-bottom: 8px;
    }
    .bazi-pillar-char {
        width: 22px;
        height: 22px;
        font-size: 0.78rem;
    }
    .bazi-pillars-grid {
        gap: 4px;
    }
    .bazi-meta-label {
        width: 26px;
        font-size: 0.65rem;
    }
    .bazi-meta-row {
        gap: 4px;
    }
}
