* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    height: 100%;
    overflow-x: hidden;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 28px 28px;
    background-color: #fff;
    border-radius: 0;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 100;
}

#result {
    padding-top: 4px;
}

h1 {
    text-align: center;
    margin: 0 -28px 22px;
    padding: 16px 28px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.15em;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.28);
}

.name-input {
    margin-bottom: 18px;
}

.name-input input {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    background: #fafafa;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.name-input input:focus {
    outline: none;
    border-color: #a78bfa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
}

.radio-group {
    margin-bottom: 18px;
}

.radio-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.radio-btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.radio-btn.active {
    background-color: #9370db;
    color: #fff;
    border-color: #9370db;
}

.radio-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-btn span {
    position: relative;
    z-index: 1;
}

.calendar-buttons {
    margin-top: 10px;
}

#baziForm {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

input[type="number"], select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    background: #fafafa;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: #a78bfa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.btn {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    margin-top: 26px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

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

.footer-info {
    margin-top: 36px;
    text-align: center;
    padding: 20px 0 8px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.footer-info h2 {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

.footer-info p {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.result {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 0;
    background-color: transparent;
    border: none;
}

.bazi-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.bazi-header {
    background-color: #9370db;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #ffffff;
    letter-spacing: 0.3em;
}

.bazi-tabs {
    display: flex;
    justify-content: center;
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #fff;
    padding: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.bazi-tabs .tab {
    flex: 0 0 auto;
    text-align: center;
    padding: 16px 24px;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    border-right: 1px solid rgba(255,255,255,0.2);
    white-space: nowrap;
}

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

.bazi-tabs .active {
    background-color: rgba(0,0,0,0.3);
    color: #fff;
    font-weight: bold;
}

.bazi-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 20px;
    background-color: #fff;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.bazi-info-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
    flex-shrink: 0;
}

.bazi-info-dates {
    flex: 1 1 auto;
    min-width: 0;
}

.bazi-info-dates .bazi-date-line + .bazi-date-line {
    margin-top: 2px;
}

.bazi-info-siling {
    flex-shrink: 0;
    white-space: nowrap;
}

.bazi-info-panel {
    padding: 16px 14px 20px;
    text-align: left;
    color: #333;
    background: #fff;
    font-size: 14px;
    line-height: 1.5;
}

.bazi-info-panel .bazi-info-section {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bazi-info-panel .bazi-info-section.vertical-layout {
    display: block;
}

.bazi-info-panel .bazi-info-section.vertical-layout .bazi-info-label {
    margin-bottom: 6px;
    width: auto;
}

.bazi-info-panel .bazi-info-section.vertical-layout .bazi-info-value,
.bazi-info-panel .bazi-info-section.vertical-layout .bazi-info-bazi-line {
    flex: none;
    white-space: normal;
}

.bazi-info-panel .bazi-info-section:last-child {
    margin-bottom: 0;
}

.bazi-info-panel .bazi-info-label {
    font-size: 13px;
    color: #888;
    width: 100px;
    flex-shrink: 0;
}

.bazi-info-panel .bazi-info-bazi-line {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.02em;
    color: #222;
    flex: 1;
}

.bazi-info-panel .bazi-info-value {
    color: #333;
    white-space: nowrap;
    flex: 1;
}

.bazi-info-panel .bazi-info-sub {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

.bazi-info-panel .bazi-info-note {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
    line-height: 1.45;
}

.bazi-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 18px;
    margin-top: 4px;
}

.bazi-info-grid-item {
    font-size: 14px;
    color: #333;
    line-height: 1.55;
    word-break: break-all;
}

.bazi-name-age {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.bazi-date-line {
    font-size: 13px;
    color: #666;
    line-height: 1.35;
    margin: 0;
}

.bazi-gender-type {
    font-size: 15px;
    font-weight: bold;
    color: #d32f2f;
}

.bazi-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.bazi-table th {
    background-color: #fdfdfd;
    font-weight: normal;
    font-size: 16px;
    color: #888;
    padding: 10px 5px;
    border-bottom: 1px solid #f0f0f0;
}

.bazi-table td {
    padding: 6px 5px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.shishen-row td {
    font-size: 17px;
    color: #555;
    background-color: #fafafa;
}

.wangxiang-row td {
    font-size: 17px;
    font-weight: bold;
    color: #333;
    background-color: #fff;
}

.hidden-row td, .substar-row td {
    font-size: 16px;
    line-height: 1.2;
    padding: 3px 2px;
}

.hidden-cell div, .substar-cell div {
    margin-bottom: 1px;
}

/* 专业盘：藏干行合并副星后仅一字十神，无五行天干色 */
.hidden-cell.pro-hidden-merged div {
    color: #222;
    font-weight: normal;
}

.zhangsheng-row td, .selfsheng-row td {
    font-size: 18px;
    color: #333;
}

.kw-row td {
    font-size: 17px;
    color: #666;
}

.nayin-row td {
    font-size: 15px;
    color: #888;
}

.shensha-row td {
    font-size: 15px;
    line-height: 1.35;
    padding: 6px 2px;
    vertical-align: top;
    min-height: 60px;
}

.shensha-item {
    margin-bottom: 3px;
    white-space: nowrap;
    font-weight: 500;
}

.shensha-good {
    color: #b8860b; /* 金金色/暗金色 */
}

.shensha-bad {
    color: #d32f2f; /* 红色 */
}

.shensha-item:last-child {
    margin-bottom: 0;
}

.shishen-row td:first-child,
.gan-row td:first-child,
.zhi-row td:first-child,
.wangxiang-row td:first-child,
.hidden-row td:first-child,
.zhangsheng-row td:first-child,
.substar-row td:first-child,
.selfsheng-row td:first-child,
.kw-row td:first-child,
.nayin-row td:first-child,
.shensha-row td:first-child {
    color: #999;
    font-size: 15px;
    background-color: #fdfdfd;
}

.gan-rel-row td, .zhi-rel-row td {
    font-size: 12px;
    line-height: 1.3;
    padding: 4px 4px;
    vertical-align: top;
    color: #555;
}

.gan-rel-row td:first-child, .zhi-rel-row td:first-child {
    color: #999;
    font-size: 12px;
    background-color: #fdfdfd;
    width: 16%;
    line-height: 1.3;
}

.gan-rel-row td:last-child, .zhi-rel-row td:last-child {
    width: 84%;
}

.gan-rel-item {
    font-family: "楷体", "STKaiti", serif;
    font-size: 12px;
    color: #444;
    letter-spacing: 0.05em;
}

.zhi-rel-item {
    font-family: "楷体", "STKaiti", serif;
    font-size: 12px;
    color: #444;
    letter-spacing: 0.05em;
}

.gan-row td, .zhi-row td {
    font-family: "楷体", "STKaiti", "Serif";
}

.char-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.char-icon {
    font-size: 18px;
    margin-left: 2px;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.1));
}

.zs-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.zs-icon {
    font-size: 11px;
    opacity: 0.8;
}

.bazi-footer {
    padding: 20px;
    text-align: center;
    background-color: #fdfdfd;
}

.btn-back {
    padding: 10px 30px;
    background-color: #666;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #333;
}

/* 专业排盘 */
.tab-panel {
    background: #fff;
}

.pro-block {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
}

/* 专业排盘：七列表（四柱 + 大运 + 流年） */
.pro-seven-col {
    width: 100%;
    table-layout: fixed;
}

/* 专业排盘：八列表（四柱 + 大运 + 流年 + 流月） */
.pro-eight-col {
    width: 100%;
    table-layout: fixed;
}

.pro-eight-col thead th.pro-luck-th:nth-child(6),
.pro-eight-col tbody td.pro-luck-td:nth-child(6) {
    border-left: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-eight-col thead th.pro-luck-th:nth-child(7),
.pro-eight-col tbody td.pro-luck-td:nth-child(7) {
    border-right: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-eight-col thead th.pro-luck-th:nth-child(8),
.pro-eight-col tbody td.pro-luck-td:nth-child(8) {
    border-right: 2px dashed rgba(26, 26, 26, 0.1);
    border-left: 2px dashed rgba(26, 26, 26, 0.15);
}

.pro-eight-col thead th.pro-luck-th {
    border-top: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-eight-col tbody tr:last-child td.pro-luck-td {
    border-bottom: 2px dashed rgba(26, 26, 26, 0.1);
}

/* 流月列占位符样式 */
.pro-yue-placeholder {
    color: #bbb;
    font-size: 12px;
}

/* 流月列选中样式 */
.pro-luck-td.pro-cell-current {
    background-color: #e8e8e8;
}

.pro-seven-col thead th.pro-luck-th:first-of-type,
.pro-seven-col tbody td.pro-luck-td:nth-child(6) {
    border-left: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-seven-col thead th.pro-luck-th:last-of-type,
.pro-seven-col tbody td.pro-luck-td:nth-child(7) {
    border-right: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-seven-col thead th.pro-luck-th {
    border-top: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-seven-col tbody tr:last-child td.pro-luck-td {
    border-bottom: 2px dashed rgba(26, 26, 26, 0.1);
}

.pro-block.pro-analysis {
    padding: 8px 10px;
}

.pro-analysis {
    background: #fafafa;
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}

.pro-analysis-row1 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 14px;
}

.pro-analysis-qiyun {
    flex: 1 1 auto;
    min-width: min(100%, 12em);
}

.pro-analysis-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 8px 12px;
    flex: 0 1 auto;
}

.pro-analysis-meta span strong {
    font-weight: 600;
}

.pro-analysis-hint {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.35;
    color: #666;
}

.pro-block-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.pro-scroll-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

/* 专业盘：大运 / 流年 两行横滑（默认） */
.pro-luck-strip {
    padding: 6px 8px;
}

.pro-luck-strip-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.pro-luck-side-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 4px 4px 4px 2px;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
}

/* 默认两行：左侧「大运」「流年」标签格同宽同高，与右侧数据区对齐 */
.pro-luck-side-da-yun,
.pro-luck-side-ln-label {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    min-height: 108px;
    box-sizing: border-box;
    padding: 10px 4px 12px;
    flex-direction: column;
    align-items: center;
}

.pro-luck-side-da-yun {
    justify-content: flex-start;
    gap: 8px;
}

.pro-luck-side-ln-label {
    justify-content: center;
}

/* 与数据列天干、地支 .ph-v-char 同档字号 */
.pro-luck-vword {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 17px;
    font-weight: bold;
    color: #111;
    letter-spacing: 0.08em;
    line-height: 1.05;
}

.pro-luck-vword-sub {
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-size: 11px;
    font-weight: normal;
    color: #888;
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.pro-dy-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
    cursor: pointer;
}

.pro-dy-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.pro-dy-switch-track {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 26px;
    transition: background 0.2s;
}

.pro-dy-switch-track::after {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.pro-dy-switch input:checked + .pro-dy-switch-track {
    background: #34c759;
}

.pro-dy-switch input:checked + .pro-dy-switch-track::after {
    transform: translateX(18px);
}

.pro-scroll-row.pro-scroll-row-v {
    flex: 1;
    min-width: 0;
    gap: 0;
    padding: 1px 0 2px 0;
    background: #fafafa;
    border-radius: 0 4px 4px 0;
}

/* 开关向右：大运流年列对齐矩阵 */
.pro-luck-matrix-block {
    padding: 6px 8px;
}

.pro-luck-matrix {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.pro-luck-matrix-side {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 12px 2px;
    border-right: 1px solid #e0e0e0;
    flex-shrink: 0;
    min-height: 160px;
}

.pro-luck-matrix-side-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pro-luck-matrix-side-ln {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 4px;
}

.pro-luck-matrix-cols {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    gap: 0;
    padding: 4px 2px 6px 0;
    background: #fafafa;
    border-radius: 0 4px 4px 0;
    -webkit-overflow-scrolling: touch;
}

.pro-luck-mcol {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 0 0 auto;
    min-width: 48px;
    border-right: 1px solid #e8e8e8;
}

.pro-luck-mcol:last-child {
    border-right: none;
}

.pro-luck-mcol-dy {
    flex-shrink: 0;
}

.pro-luck-mcol-ln {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 4px 2px 6px;
    background: #f3f3f3;
    border-top: 1px solid #e8e8e8;
}

.pro-ln-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.pro-ln-col-cap {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
    text-align: center;
    padding: 2px 0;
    white-space: nowrap;
}

.pro-ln-col-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 2px 0;
}

.pro-ln-gz-line {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #111;
    letter-spacing: 0.1em;
    line-height: 1.35;
    padding: 1px 4px;
    border-radius: 2px;
}

.pro-ln-gz-line span {
    font-size: 18px !important;
}

.pro-ln-gz-line.pro-ln-current {
    background: #d0d0d0;
}

/* 标记属于八字原局的干支字（移除下划线） */
[data-origin="1"] {
    text-decoration: none;
}

.pro-dy-compact .pro-dy-c-year {
    font-weight: bold;
    font-size: 12px;
    color: #222;
    text-align: center;
}

.pro-dy-compact .pro-dy-c-age {
    font-size: 10px;
    color: #666;
    text-align: center;
    margin-bottom: 2px;
}

.pro-dy-compact .pro-dy-c-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.pro-dy-compact .pro-dy-c-gz {
    font-size: 16px;
    font-weight: bold;
    color: #111;
    line-height: 1.1;
}

.pro-hcell {
    flex: 0 0 auto;
    min-width: 72px;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 8px 6px;
    text-align: center;
    font-size: 11px;
    border: 1px solid #e8e8e8;
}

.pro-hcell.pro-hcell-v {
    min-width: 44px;
    max-width: 54px;
    padding: 5px 3px;
    border-radius: 0;
    border: none;
    border-right: 1px solid #e5e5e5;
    background: #fff;
    font-size: 12px;
}

.pro-hcell.pro-hcell-v:last-child {
    border-right: none;
}

.pro-hcell.pro-hcell-v.pro-cell-current {
    background: #e8e8e8;
}

.pro-hcell.pro-cell-current {
    background: #e8e8e8;
    border-color: #999;
}

.ph-v-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-bottom: 3px;
}

.ph-v-year {
    font-weight: bold;
    color: #222;
    font-size: 12px;
    line-height: 1.2;
}

.ph-v-age {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
}

.ph-v-gz {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.ph-v-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.ph-v-char {
    font-size: 17px;
    font-weight: bold;
    color: #111;
    line-height: 1.05;
}

.ph-v-ss {
    font-size: 11px;
    color: #c62828;
    line-height: 1;
    font-weight: normal;
    min-width: 0.8em;
    text-align: center;
}

.ph-v-xiaoyun {
    margin-top: 3px;
    font-size: 10px;
    color: #888;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.ph-v-xiaoyun span {
    font-size: 10px !important;
}

/* 未起运：大运条首列 */
.pro-hcell-pre-luck {
    cursor: pointer;
}

.ph-v-pre-body {
}

.pro-pre-no-da-yun {
    color: #555;
    font-size: 13px;
}

.ph-year {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.ph-gz {
    font-size: 13px;
    margin-bottom: 4px;
}

.ph-sub {
    color: #555;
    margin-bottom: 2px;
}

.ph-zs {
    color: #666;
    margin-bottom: 2px;
}

.ph-ny {
    color: #888;
    font-size: 10px;
    line-height: 1.3;
}

/* 响应式调整：手机端纵向紧缩，专业排盘尽量一屏看全 */
@media (max-width: 600px) {
    .container {
        margin: 0 auto;
        padding: 0;
    }

    /* 流月单元格移动端缩小 */
    .pro-liu-yue-cell {
        width: 30px !important;
        min-width: 30px !important;
        padding: 1px !important;
    }
    
    .pro-liu-yue-cell .ph-v-ganzhi {
        font-size: 10px !important;
    }
    
    .pro-liu-yue-cell .ph-v-jieqi-name {
        font-size: 7px !important;
    }
    
    .pro-liu-yue-cell .ph-v-solar-date {
        font-size: 7px !important;
    }

    #result {
        padding-top: 0;
    }

    .bazi-tabs .tab {
        padding: 12px 13px;
        font-size: 18px;
    }

    .bazi-info-bar {
        gap: 4px 10px;
        padding: 4px 8px;
    }

    .bazi-name-age {
        font-size: 14px;
    }

    .bazi-date-line {
        font-size: 11px;
        line-height: 1.25;
    }

    .bazi-gender-type {
        font-size: 13px;
    }

    .bazi-table th {
        padding: 5px 2px;
        font-size: 12px;
    }

    .bazi-table td {
        padding: 4px 2px;
    }

    .shishen-row td {
        font-size: 15px;
        padding: 2px 2px;
    }

    .wangxiang-row td {
        font-size: 15px;
        padding: 2px 2px;
    }

    .hidden-row td,
    .substar-row td {
        font-size: 14px;
        line-height: 1.1;
        padding: 2px 2px;
    }

    .zhangsheng-row td,
    .selfsheng-row td {
        font-size: 15px;
        padding: 2px 2px;
    }

    .kw-row td {
        font-size: 14px;
        padding: 2px 2px;
    }

    .nayin-row td {
        font-size: 13px;
        padding: 2px 2px;
    }

    .shensha-row td {
        font-size: 13px;
        line-height: 1.25;
        padding: 4px 2px;
        min-height: 36px;
    }

    .gan-rel-row td,
    .zhi-rel-row td {
        font-size: 11px;
        padding: 3px 2px;
    }

    .gan-rel-item,
    .zhi-rel-item {
        font-size: 11px;
    }

    .char-icon {
        font-size: 15px;
    }

    .zs-icon {
        font-size: 9px;
    }

    /* 专业七/八列表：干支内联字号略缩小 */
    .pro-seven-col .char-container span[style*="font-size"],
    .pro-eight-col .char-container span[style*="font-size"] {
        font-size: 32px !important;
    }

    .pro-block {
        padding: 6px 6px;
    }

    .pro-block.pro-analysis {
        padding: 4px 6px;
    }

    .pro-analysis {
        font-size: 12px;
        line-height: 1.28;
    }

    .pro-analysis-row1 {
        gap: 2px 8px;
    }

    .pro-analysis-meta {
        gap: 4px 8px;
    }

    .pro-analysis-hint {
        margin-top: 2px;
        font-size: 11px;
        line-height: 1.3;
    }

    .pro-block-title {
        margin-bottom: 4px;
        font-size: 13px;
    }

    .pro-scroll-row {
        gap: 6px;
        padding-bottom: 2px;
    }

    .pro-luck-strip {
        padding: 3px 4px;
    }

    .pro-luck-side-da-yun,
    .pro-luck-side-ln-label {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        min-height: 84px;
        padding: 6px 3px 8px;
    }

    .pro-luck-side-da-yun {
        gap: 4px;
    }

    .pro-luck-vword {
        font-size: 15px;
    }

    .pro-luck-vword-sub {
        font-size: 10px;
    }

    .pro-hcell {
        min-width: 64px;
        padding: 5px 4px;
        font-size: 10px;
    }

    .pro-hcell.pro-hcell-v {
        min-width: 40px;
        max-width: 50px;
        padding: 3px 2px;
        font-size: 11px;
    }

    .ph-v-top {
        margin-bottom: 1px;
    }

    .ph-v-year {
        font-size: 11px;
    }

    .ph-v-age {
        font-size: 9px;
    }

    .ph-v-char {
        font-size: 15px;
    }

    .ph-v-ss {
        font-size: 10px;
    }

    .ph-v-xiaoyun {
        margin-top: 1px;
        font-size: 9px;
    }

    .ph-v-xiaoyun span {
        font-size: 9px !important;
    }

    .ph-v-pre-body {
        margin-top: 2px;
        font-size: 13px;
    }

    .pro-pre-no-da-yun {
        font-size: 11px;
    }

    .pro-dy-compact .pro-dy-c-gz {
        font-size: 14px;
    }

    .pro-dy-compact .pro-dy-c-year {
        font-size: 11px;
    }

    .pro-dy-compact .pro-dy-c-age {
        font-size: 9px;
        margin-bottom: 1px;
    }

    .pro-ln-gz-line {
        font-size: 12px;
        line-height: 1.2;
        padding: 0 2px;
    }

    .pro-ln-gz-line span {
        font-size: 12px !important;
    }

    .pro-ln-col-mid {
        padding: 1px 0;
    }

    .bazi-footer {
        padding: 8px 10px;
    }

    .btn-back {
        padding: 8px 20px;
        font-size: 14px;
    }

    .pro-luck-matrix-block {
        padding: 3px 4px;
    }

    .pro-luck-matrix-side {
        padding: 4px 3px 8px 2px;
        min-height: 120px;
    }

    .pro-luck-matrix-side-top {
        gap: 4px;
    }

    .pro-luck-matrix-side-ln {
        gap: 3px;
        padding-top: 2px;
    }

    .pro-luck-matrix-cols {
        padding: 2px 2px 4px 0;
    }

    .pro-luck-mcol-ln {
        padding: 2px 2px 4px;
    }

    .pro-scroll-row.pro-scroll-row-v {
        padding: 2px 2px 4px 0;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    min-width: 400px;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 选择器容器 */
.selector-container {
    margin-bottom: 30px;
}

.selector-title {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

/* 天干选择器 */
.tianGan-selector {
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tianGan-selector.hidden {
    display: none;
}

.tianGan-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.tianGan-item {
    display: inline-block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 5px;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tianGan-item:hover {
    border-color: #4CAF50;
    background-color: #f0f0f0;
}

.tianGan-item.active {
    border-color: #4CAF50;
    background-color: #4CAF50;
    color: white;
}

/* 地支选择器 */
.diZhi-selector {
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.diZhi-selector.hidden {
    display: none;
}

.diZhi-row {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    min-height: 50px;
}

.diZhi-item {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0 4px;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.diZhi-item:hover {
    border-color: #2196F3;
    background-color: #f0f0f0;
}

.diZhi-item.active {
    border-color: #2196F3;
    background-color: #2196F3;
    color: white;
}

/* 四柱容器 */
.siZhu-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.zhu-item {
    text-align: center;
    flex: 0 0 80px;
    margin: 0 10px;
    min-height: 180px;
}

.zhu-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.zhu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 140px;
}

.zhu-content .gan,
.zhu-content .zhi {
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #333;
    border-radius: 50%;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zhu-content .gan:hover,
.zhu-content .zhi:hover {
    border-color: #4CAF50;
    background-color: #f0f0f0;
}

.zhu-content .gan {
    background-color: #f8f8f8;
}

.zhu-content .zhi {
    background-color: #f0f0f0;
}

/* 模态框底部按钮 */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel,
.btn-confirm {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-cancel {
    background-color: #ccc;
    color: #333;
}

.btn-cancel:hover {
    background-color: #999;
}

.btn-confirm {
    background-color: #4CAF50;
    color: white;
}

.btn-confirm:hover {
    background-color: #45a049;
}

/* 日期选择模态框样式 */
.date-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.bazi-display {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.bazi-display .zhu {
    display: inline-block;
    margin: 0 10px;
}

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

.date-list-container {
    margin-top: 15px;
}

.date-list-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.date-list {
    max-height: 300px;
    overflow-y: auto;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-item:hover {
    background-color: #e8f5e9;
    border-color: #4CAF50;
    transform: translateX(5px);
}

.date-item:active {
    background-color: #c8e6c9;
}

.date-item .solar-date {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.date-item .lunar-date {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

.date-item .time-info {
    font-size: 14px;
    color: #666;
}

.date-item .bazi-info {
    text-align: right;
}

.date-item .bazi-info .day-ganzhi {
    font-size: 14px;
    font-weight: bold;
    color: #4CAF50;
}

.date-item .bazi-info .hour-ganzhi {
    font-size: 12px;
    color: #888;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 14px;
}

/* 滚动条样式 */
.date-list::-webkit-scrollbar {
    width: 6px;
}

.date-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.date-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.date-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 流月容器样式 */
.pro-liu-yue-row {
    min-height: 90px;
    gap: 0;
    padding: 2px 0 4px 0;
    overflow-x: hidden;
    display: none !important;
}

.pro-liu-yue-row.active {
    display: flex !important;
}

/* 流月区块整体隐藏 */
#liuYueBlock {
    display: none;
}

#liuYueBlock.active {
    display: block;
}

.pro-liu-yue-cell {
    width: 40px;
    min-width: 40px;
    padding: 2px 1px;
    border-radius: 2px;
}

.pro-liu-yue-cell .ph-v-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    gap: 0;
}

.pro-liu-yue-cell .ph-v-jieqi-name {
    font-size: 8px;
    color: #888;
    line-height: 1.0;
}

.pro-liu-yue-cell .ph-v-solar-date {
    font-size: 8px;
    color: #666;
    line-height: 1.0;
}

.pro-liu-yue-cell .ph-v-year {
    font-size: 10px;
    font-weight: bold;
    color: #333;
    line-height: 1.0;
    margin-top: 1px;
}

.pro-liu-yue-cell .ph-v-char {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.pro-liu-yue-cell .ph-v-gan,
.pro-liu-yue-cell .ph-v-zhi {
    font-size: 17px;
    font-weight: bold;
    color: #111;
    line-height: 1.05;
    letter-spacing: 0.08em;
}

.pro-liu-yue-cell .ph-v-ss {
    text-align: center;
    font-size: 9px;
    font-weight: normal;
    color: #c62828;
    padding: 0;
    margin-top: 3px;
}

.liu-yue-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 13px;
    padding: 20px;
}

/* 流月行标签 */
.pro-luck-side-ly-label {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    min-height: 108px;
    box-sizing: border-box;
    padding: 10px 4px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 八字分析折叠面板样式 */
.fx-analysis-container {
    padding: 12px;
}

.fx-section {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.fx-section:last-child {
    margin-bottom: 0;
}

.fx-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f8f4ff 0%, #f0ebff 100%);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.fx-section-header:hover {
    background: linear-gradient(135deg, #f0ebff 0%, #e8deff 100%);
}

.fx-section-header-open {
    background: linear-gradient(135deg, #e8deff 0%, #ddd0ff 100%);
    border-bottom: 1px solid #d0c0f0;
}

.fx-section-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.fx-toggle-btn {
    font-size: 13px;
    color: #9370db;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #9370db;
    border-radius: 12px;
    transition: all 0.2s;
}

.fx-section-header:hover .fx-toggle-btn {
    background: #9370db;
    color: #fff;
}

.fx-section-header-open .fx-toggle-btn {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.fx-section-content {
    background: #fff;
}

    .fx-section-inner {
        padding: 16px;
        font-size: 14px;
        color: #555;
        line-height: 1.7;
    }

    .fx-analysis-header {
        display: flex;
        gap: 8px;
        margin-bottom: 14px;
        flex-wrap: wrap;
    }

    .fx-tag {
        display: inline-block;
        padding: 4px 12px;
        background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
        color: #fff;
        border-radius: 12px;
        font-size: 13px;
    }

/* 大运分析样式 */
.dy-header {
    font-size: 18px;
    color: #d4a06b;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.dy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-content: center;
}

.dy-item {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dy-item:hover {
    transform: translateY(-2px);
}

.dy-item.selected {
    background-color: #f0f9ff;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 0 0 2px #3b82f6;
}

.dy-year {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.dy-ganzhi {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding: 10px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.dy-ganzhi:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* 大运分析结果样式 */
/* 大运分析结果样式 - 类似性格分析的紧凑排版 */
.dy-analysis-result {
    margin-top: 16px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: calc(100% + 40px);
    box-sizing: border-box;
    margin-left: -20px;
    margin-right: -20px;
}

.dy-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dy-analysis-result h3 {
    color: #7c3aed;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7c3aed;
    flex: 1;
}

.dy-toggle-button {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 20px;
}

.dy-toggle-button:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

/* 大运分析内容样式 - 类似fx-section-inner */
.dy-analysis-content {
    padding: 12px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    max-height: 600px;
    overflow-y: auto;
}

/* 大运分析标题样式 */
.dy-analysis-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #7c3aed;
}

/* 大运分析 section 样式 - 更紧凑 */
.dy-analysis-section {
    font-size: 14px;
    font-weight: 600;
    color: #7c3aed;
    margin-top: 12px;
    margin-bottom: 8px;
    padding-left: 8px;
    border-left: 3px solid #7c3aed;
}

/* 大运分析 subsection 样式 - 更紧凑 */
.dy-analysis-subsection {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-top: 8px;
    margin-bottom: 4px;
    padding-left: 12px;
}

/* 大运分析内容样式 - 更紧凑 */
.dy-analysis-content-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    padding-left: 12px;
    margin-bottom: 8px;
}

/* 大运分析分隔线 - 更紧凑 */
.dy-analysis-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 12px 0;
}

/* 流年运势容器样式 */
.dy-liunian-result {
    margin-top: 16px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: calc(100% + 40px);
    box-sizing: border-box;
    margin-left: -20px;
    margin-right: -20px;
}

.dy-liunian-header {
    color: #7c3aed;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7c3aed;
}

/* 流年运势样式 */

.dy-liunian-list {
    margin-top: 15px;
}

.dy-liunian-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.dy-liunian-item:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dy-liunian-info {
    flex: 1;
}

.dy-liunian-year {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.dy-liunian-gz {
    font-size: 14px;
    color: #666;
}

.dy-liunian-buttons {
    display: flex;
    gap: 8px;
}

.dy-liunian-button {
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dy-liunian-button.copy-button {
    background: #e0e0e0;
    color: #333;
}

.dy-liunian-button.copy-button:hover {
    background: #d0d0d0;
}

.dy-liunian-button.expand-button {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white;
}

.dy-liunian-button.expand-button:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

/* 大运分析信息项 - 类似性格分析的fx-analysis-item */
.dy-analysis-item {
    display: flex;
    margin-bottom: 6px;
    line-height: 1.5;
}

.dy-analysis-label {
    font-weight: 600;
    color: #7c3aed;
    min-width: 80px;
    flex-shrink: 0;
}

.dy-analysis-value {
    color: #555;
    flex: 1;
}

/* 移动端响应式 */

/* AI分析命理样式 */
.ai-analysis-container {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 20px;
}

.ai-analysis-header {
    margin-bottom: 20px;
    text-align: center;
}

.ai-analysis-header h3 {
    color: #333;
    font-size: 18px;
    margin: 0;
}

.ai-bazi-info {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    line-height: 1.5;
    border: 1px solid #e0e0e0;
}

.ai-button-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn-ai-analysis {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-align: center;
}

.btn-ai-analysis:hover {
    background-color: #45a049;
}

.ai-analysis-result h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-button-container {
    display: inline-block;
}

.btn-copy {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.btn-copy:hover {
    background-color: #0b7dda;
}

.analysis-content {
    margin-top: 10px;
    line-height: 1.6;
    color: #333;
}

.ai-result-container {
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    min-height: 300px;
}

.ai-result-content {
    padding: 15px;
}

.ai-loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.ai-error {
    text-align: center;
    padding: 40px 0;
    color: #f44336;
}

.ai-analysis-result {
    line-height: 1.6;
    color: #333;
}

.ai-analysis-result br {
    margin-bottom: 10px;
}
@media (max-width: 600px) {
    .fx-analysis-container {
        padding: 8px;
    }
    
    /* 移动端大运卡片样式 */
    .dy-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .dy-ganzhi {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        font-size: 16px;
    }
    
    .dy-item.selected .dy-ganzhi {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
    }

    .fx-section-header {
        padding: 12px 14px;
    }

    .fx-section-title {
        font-size: 14px;
    }

    .fx-toggle-btn {
        font-size: 12px;
        padding: 3px 10px;
    }

    .fx-dayzhi-section {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px dashed #e0e0e0;
    }

    .fx-tag-accent {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: #fff;
    }

    .fx-section-inner {
        padding: 14px;
        font-size: 13px;
    }

    /* 一生所求模块 */
    .fx-life-goal-section {
        margin-top: 16px;
        padding-top: 16px;
        border-top: 2px solid #f0f0f0;
        background: linear-gradient(to bottom, #fefefe, #f8f9fa);
        border-radius: 8px;
        padding: 14px;
    }

    .fx-tag-goal {
        background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        color: #fff;
        font-size: 14px;
        padding: 5px 14px;
    }

    .fx-goal-main {
        display: flex;
        align-items: baseline;
        margin: 12px 0 8px;
        gap: 10px;
    }

    .fx-goal-label {
        font-size: 13px;
        color: #888;
        font-weight: 600;
        white-space: nowrap;
    }

    .fx-goal-content {
        font-size: 14px;
        color: #333;
        font-weight: 600;
    }

    .fx-goal-desc {
        font-size: 13px;
        color: #555;
        line-height: 1.7;
        margin-bottom: 10px;
    }

    .fx-goal-fear {
        display: flex;
        align-items: flex-start;
        gap: 6px;
        font-size: 12px;
        color: #e67e22;
        background: #fff8f0;
        padding: 8px 10px;
        border-radius: 6px;
        border-left: 3px solid #e67e22;
    }

    .fx-fear-icon {
        flex-shrink: 0;
    }

    /* 日柱生人特点 */
    .fx-daypillar-section {
        margin-top: 16px;
        padding: 14px;
        background: linear-gradient(135deg, #fff9f0 0%, #fef6e4 100%);
        border-radius: 8px;
        border: 1px solid #f0e0c0;
    }

    .fx-daypillar-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

    .fx-tag-pillar {
        background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
        color: #fff;
        font-size: 14px;
        padding: 5px 14px;
    }

    .fx-daypillar-sub {
        font-size: 13px;
        color: #b8860b;
        font-weight: 600;
    }

    .fx-daypillar-content {
        font-size: 13px;
        color: #555;
        line-height: 1.8;
    }

    /* === 祖上分析模块 === */
    .anc-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .anc-section {
        background: #fafafa;
        border-radius: 8px;
        padding: 12px 14px;
        border-left: 3px solid #ddd;
    }

    .anc-intro {
        background: linear-gradient(135deg, #f8f4ff 0%, #f0ecff 100%);
        border-left-color: #9b59b6;
    }

    .anc-note {
        font-size: 13px;
        color: #666;
        margin-top: 6px;
    }

    .anc-xi-label {
        font-size: 13px;
        color: #555;
    }

    .anc-tag {
        display: inline-block;
        font-size: 13px;
        font-weight: 600;
        padding: 3px 10px;
        border-radius: 4px;
        margin-bottom: 6px;
    }

    .anc-tag-base { background: #9b59b6; color: #fff; }
    .anc-tag-stem { background: #8e44ad; color: #fff; }
    .anc-tag-zhi  { background: #7d3c98; color: #fff; }
    .anc-tag-good { background: #27ae60; color: #fff; }
    .anc-tag-bad  { background: #e74c3c; color: #fff; }
    .anc-tag-neutral { background: #95a5a6; color: #fff; }
    .anc-tag-warn { background: #e67e22; color: #fff; }
    .anc-tag-sha  { background: #2980b9; color: #fff; }
    .anc-tag-sum  { background: #2c3e50; color: #fff; }

    .anc-item {
        font-size: 13px;
        line-height: 1.7;
        padding: 6px 10px;
        border-radius: 6px;
        margin-top: 4px;
    }

    .anc-good {
        background: #eafaf1;
        color: #1e8449;
        border: 1px solid #a9dfbf;
    }

    .anc-warn {
        background: #fef5e7;
        color: #d35400;
        border: 1px solid #f5b041;
    }

    .anc-neutral {
        background: #f8f9fa;
        color: #555;
        border: 1px solid #ddd;
    }

    .anc-shensha-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 4px;
    }

    .anc-shensha-item {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        font-size: 13px;
        padding: 5px 10px;
        border-radius: 6px;
    }

    .anc-shensha-tag {
        font-weight: 600;
        white-space: nowrap;
        padding: 1px 6px;
        border-radius: 4px;
        background: #ecf0f1;
        color: #333;
    }

    .anc-summary {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        border-left: none;
        border-radius: 8px;
    }

    .anc-summary-text {
        font-size: 13px;
        color: #ecf0f1;
        line-height: 1.7;
    }

    /* === 四柱原局分析模块 === */
    .yuanju-container {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }

    .yuanju-section {
        border: 1px solid #e8e0f0;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }

    .yuanju-sec-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
        background: linear-gradient(135deg, #f5f0ff 0%, #ede7f6 100%);
        cursor: pointer;
        user-select: none;
        font-size: 13px;
        font-weight: 600;
        color: #5e35b1;
        transition: background 0.2s;
    }

    .yuanju-sec-header:hover {
        background: linear-gradient(135deg, #ede7f6 0%, #e1d5f5 100%);
    }

    .yuanju-sec-header .fx-toggle-btn {
        font-size: 11px;
        color: #7c4dff;
        padding: 3px 10px;
        background: #fff;
        border: 1px solid #7c4dff;
        border-radius: 10px;
    }

    .yuanju-sec-header:hover .fx-toggle-btn {
        background: #7c4dff;
        color: #fff;
    }

    .yuanju-container .fx-section-content {
        background: #fff;
    }

    .yuanju-item {
        background: #fafafa;
        border-radius: 6px;
        overflow: hidden;
    }

    .yuanju-wx-bar {
        margin-bottom: 0;
    }

    .yuanju-status {
        font-size: 11px;
        font-weight: 600;
    }
}

/* 小儿关煞样式 */
.guansha-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.guansha-header h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.guansha-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guansha-info {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.guansha-result {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.guansha-item {
    margin-bottom: 10px;
}

.guansha-label {
    font-weight: bold;
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.guansha-value {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    word-wrap: break-word;
}

.guansha-age-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #9370db;
}

.guansha-age-title {
    font-weight: bold;
    color: #9370db;
    margin-bottom: 10px;
    font-size: 15px;
}

.guansha-age-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guansha-age-item {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    padding-left: 15px;
    position: relative;
}

.guansha-age-item::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #9370db;
    font-weight: bold;
}

.guansha-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 14px;
}

.guansha-meaning {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 5px;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
}

.guansha-resolve {
    color: #27ae60;
    font-size: 13px;
    line-height: 1.5;
    padding-left: 10px;
    border-left: 2px solid #27ae60;
}

@media (max-width: 600px) {
    .guansha-container {
        padding: 15px;
    }
    
    .guansha-header h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .guansha-content {
        gap: 15px;
    }
    
    .guansha-info,
    .guansha-result {
        padding: 12px;
    }
    
    .guansha-label {
        font-size: 13px;
    }
    
    .guansha-value {
        font-size: 13px;
    }
    
    .guansha-age-section {
        margin-bottom: 15px;
        padding: 12px;
    }
    
    .guansha-age-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .guansha-age-item {
        font-size: 13px;
        padding-left: 12px;
    }
    
    .guansha-name {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .guansha-meaning {
        font-size: 12px;
        padding-left: 8px;
    }
    
    .guansha-resolve {
        font-size: 12px;
        padding-left: 8px;
    }
}
