/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #F5F5DC;
    color: #6B3E1F;
    line-height: 1.7;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #8B4513;
}

/* 输入区域样式 */
.input-section {
    background: #fff;
    padding: 24px 28px;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.form-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.form-header h2 { font-size: 1.4rem; color: #6B3E1F; }
.form-subtitle { font-size: 0.95rem; color: #8B6F4D; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: inline-block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #8B4513;
}

.text-input {
    width: 100%;
    padding: 12px 10px;
    border: 2px solid #D8B26E;
    border-radius: 10px;
    font-size: 16px;
    color: #5C3A1E;
    transition: all 0.3s ease;
    background-color: white;
}

.text-input:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.segmented-group {
    display: inline-flex;
    border: 2px solid #D2B48C;
    border-radius: 10px;
    overflow: hidden;
    background-color: #FFFFFF;
}

.segmented-group label {
    padding: 8px 14px;
    border-right: 1px solid #D2B48C;
    font-weight: 600;
    color: #8B4513;
}

.segmented-group label:last-child { border-right: none; }

.segmented-group input[type="radio"] { display: none; }

.segmented-group input[type="radio"]:checked + span {
    background-color: #7A1E12;
    color: #FFFFFF;
    box-shadow: inset 0 0 0 2px #7A1E12;
}

.segmented-group label span {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    background-color: #FFFFFF;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-row-two { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.form-row-four { grid-template-columns: repeat(4, minmax(180px, 1fr)); }

.form-group input#name { max-width: 100%; }

select {
    width: 100%;
    padding: 12px 10px;
    border: 2px solid #D8B26E;
    border-radius: 10px;
    font-size: 16px;
    background-color: white;
    color: #5C3A1E;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
}

/* 阴历日期选择器样式 */
#lunar_day {
    background-color: #FFFFFF;
    border-color: #CD853F;
}

#lunar_day:focus {
    border-color: #A0522D;
}

.submit-btn {
    background: linear-gradient(180deg,#A22D2D,#7A1E12);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 26px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(122,30,18,0.3);
    transition: transform .15s ease, box-shadow .15s ease;
}
.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(122,30,18,0.35);
}
.seal-btn { position: relative; letter-spacing: 0.12em; border: 2px solid #7A1E12; border-radius: 999px; text-shadow: 0 1px 0 rgba(0,0,0,0.2); }
.seal-btn:before { content:""; position:absolute; inset:-6px; border:2px solid rgba(122,30,18,0.35); border-radius:999px; }

/* 结果区域样式 */
.result-section { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 10px 28px rgba(0,0,0,0.08); border: 1px solid #E6D6B1; }
.result-section.ornament, .input-section.ornament { position: relative; }
.result-section.ornament:before, .result-section.ornament:after, .input-section.ornament:before, .input-section.ornament:after { content:""; position:absolute; width:22px; height:22px; border:2px solid #D8B26E; }
.result-section.ornament:before, .input-section.ornament:before { left:-11px; top:-11px; border-right:none; border-bottom:none; border-radius:6px 0 0 0; }
.result-section.ornament:after, .input-section.ornament:after { right:-11px; bottom:-11px; border-left:none; border-top:none; border-radius:0 0 6px 0; }

/* 时间显示区域样式 */
.time-display-section {
    margin-bottom: 30px;
    background-color: #FFF8DC;
    border: 2px solid #D2B48C;
    border-radius: 10px;
    padding: 20px;
}

.time-info h3 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.time-details {
    display: block;
}

.time-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #D2B48C;
}

.time-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; margin-bottom: 10px; }

.time-label {
    font-weight: bold;
    color: #8B4513;
    margin-right: 10px;
    min-width: 120px;
}

.time-value {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 四柱表格样式 */
.bazi-table {
    margin-bottom: 40px;
}

.main-table { width: 100%; border-collapse: collapse; table-layout: fixed; background-color: #FFF6E0; border: 2px solid #D8B26E; }

.main-table th,
.main-table td {
    border: 1px solid #D2B48C;
    padding: 12px 10px;
    text-align: center;
    vertical-align: middle;
}

.main-table th {
    background: linear-gradient(180deg,#FFE9B3,#FFD98A);
    font-weight: 700;
    color: #7A1E12;
    font-size: 1.08rem;
}

.header-cell {
    background-color: #DEB887 !important;
    font-size: 1.2rem !important;
}

/* 取消基于列序号的加粗边框，避免动态增删列导致样式错位 */

.row-label {
    background-color: #FFE9B3;
    font-weight: 700;
    color: #7A1E12;
    width: 86px;
}

/* 五行颜色样式 */
.wuxing-木 { color: #228B22 !important; }

.wuxing-火 { color: #FF4500 !important; }

.wuxing-土 { color: #8B4513 !important; }

.wuxing-金 { color: #D4AF37 !important; font-weight: 700; text-shadow: 0 0 2px rgba(212, 175, 55, 0.3); }

.wuxing-水 { color: #4169E1 !important; }

/* 增强金色在所有元素的显示 */
.wuxing-金,
span[class*="wuxing-金"],
td span.wuxing-金,
.shishen-cell .wuxing-金,
.canggan-item .wuxing-金,
.analysis-item .wuxing-金,
.modal-body .wuxing-金 {
    color: #D4AF37 !important;
    font-weight: 700 !important;
    filter: brightness(1.1);
    -webkit-filter: brightness(1.1);
}

/* 五行图标 */
/* 去除五行图标，用颜色与加粗突出显示 */
.tiangan-cell,
.dizhi-cell {
    font-weight: 900;
    font-size: 2em;
}

.canggan-item { line-height: 1.6; }
.canggan-item .canggan-stem { font-weight: 900; }
.canggan-item .canggan-shishen { font-weight: 700; }

/* 藏干样式 */
.canggan-cell {
    text-align: left;
    padding: 8px;
}

.canggan-item {
    margin-bottom: 3px;
    font-size: 0.9em;
}

.canggan-item:last-child {
    margin-bottom: 0;
}

/* 神煞样式 */
.shensha-cell {
    text-align: left;
    padding: 8px;
}

.shensha-item {
    margin-bottom: 3px;
    font-size: 0.85em;
    color: inherit;
}

.shensha-item:hover { text-decoration: none; opacity: 0.85; }

.shensha-item:last-child {
    margin-bottom: 0;
}

/* 大运区域样式 */
.dayun-section {
    margin-bottom: 40px;
}

.dayun-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dayun-header h3 {
    font-size: 1.5rem;
    color: #8B4513;
}

.toggle-switch {
    background-color: #8B4513;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
    cursor: pointer;
}

.dayun-info {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.age-button {
    background-color: white;
    border: 2px solid #D2B48C;
    border-radius: 20px;
    padding: 5px 15px;
    font-weight: bold;
    color: #8B4513;
}

/* 大运表格样式 */
.dayun-table {
    overflow-x: auto;
}

.dayun-grid {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFF6E0;
    border: 2px solid #D8B26E;
}

.decade-cell {
    border: 1px solid #D2B48C;
    padding: 10px 5px;
    text-align: center;
    min-width: 100px;
}

.dayun-grid a:hover .decade-ganzhi { color: #A0522D; }
.dayun-grid a:hover .decade-age { color: #8B4513; }

.decade-cell.active, .liunian-cell.active { background-color: #7A1E12; color: #fff; border-color: #7A1E12; font-weight: 700; box-shadow: 0 0 0 2px #A0522D inset; }
.liunian-cell.active a { color: inherit; }
.liunian-cell.active .liuyue-term,
.liunian-cell.active .liuyue-range,
.liunian-cell.active .liuyue-ganzhi { color: #fff !important; font-weight: 700; }
.decade-cell.active .decade-ganzhi, .decade-cell.active .decade-age,
.liunian-cell.active .liunian-year, .liunian-cell.active .liunian-ganzhi, .liunian-cell.active .liunian-shishen { color: #fff; }

.decade-year {
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 5px;
}

.decade-ganzhi {
    font-size: 1.1em;
    margin-bottom: 3px;
}

.decade-shishen {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 3px;
}

.decade-age {
    font-size: 0.85em;
    color: #888;
}

/* 流年区域样式 */
.liunian-section {
    margin-bottom: 40px;
}

.liunian-section h3 {
    font-size: 1.5rem;
    color: #8B4513;
    margin-bottom: 20px;
}

.liunian-table {
    overflow-x: auto;
}

.liunian-grid {
    width: 100%;
    border-collapse: collapse;
    background-color: #FFF6E0;
    border: 2px solid #D8B26E;
}

.liunian-cell {
    border: 1px solid #D2B48C;
    padding: 10px 6px;
    text-align: center;
    min-width: 96px;
    background: #FFF8E8;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.liunian-grid a:hover .liunian-ganzhi { color: #7A1E12; }
.liunian-grid a:hover .liunian-year { color: #7A1E12; }
/* 流月卡片内部三行样式优化 */
.liuyue-term { font-weight: 700; color: #7A4A22; letter-spacing: 0.02em; }
.liuyue-range { color: #5C3A1E; opacity: 0.85; }
.liuyue-ganzhi { font-weight: 900; color: #7A1E12; }
.liunian-cell.active { background: linear-gradient(180deg,#8B4513,#7A1E12); color: #fff; border-color: #7A1E12; box-shadow: 0 0 0 2px rgba(122,30,18,0.35) inset; }
.liunian-cell.active .liuyue-term { color: #fff !important; font-weight: 800; }
.liunian-cell.active .liuyue-range { color: #fff !important; }
.liunian-cell.active .liuyue-ganzhi { color: #fff !important; }

.cloud-divider { height: 26px; margin: 8px 0 18px; background:
    radial-gradient(circle at 12px 13px, rgba(216,178,110,0.35) 0, rgba(216,178,110,0.35) 7px, transparent 7px) 0 0/48px 100% repeat-x,
    radial-gradient(circle at 36px 13px, rgba(122,30,18,0.15) 0, rgba(122,30,18,0.15) 7px, transparent 7px) 0 0/48px 100% repeat-x;
}

.site-footer { margin-top: 28px; padding: 18px 10px; text-align: center; color: #7A1E12; border-top: 1px dashed #D8B26E; background: linear-gradient(180deg, #FFF6E0, #FFF1D2); }
.site-footer .wish { font-family: "KaiTi", "Noto Serif SC", serif; font-size: 1.05rem; letter-spacing: 0.08em; }

#shenshaModal {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#shenshaModal .modal-content {
    background: #FFF6E0;
    border: 2px solid #D8B26E;
    border-radius: 12px;
    width: min(800px, 90%);
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 20px;
}

#shenshaModal .modal-title { font-size: 1.3rem; font-weight: bold; color: #8B4513; margin-bottom: 10px; }
#shenshaModal .modal-close { float: right; cursor: pointer; font-size: 1.4rem; }

.liunian-year {
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 3px;
    font-size: 0.9em;
}

.liunian-ganzhi {
    font-size: 1em;
    margin-bottom: 2px;
}

.liunian-shishen {
    font-size: 0.8em;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dayun-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .main-table th,
    .main-table td {
        padding: 8px 4px;
        font-size: 0.9em;
    }
    
    .row-label {
        width: 60px;
    }
}

/* 动画效果 */
.result-section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表格悬停效果 */
.main-table tr:hover {
    background-color: #F5F5DC;
}

.decade-cell:hover,
.liunian-cell:hover {
    background-color: #F5DEB3;
    cursor: pointer;
}
/* 神煞弹窗美化样式 */
.modal {
    position: fixed;
    z-index: 9999;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.5);
    display:none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    max-width:700px;
    margin:8% auto;
    border-radius:16px;
    box-shadow:0 12px 32px rgba(0,0,0,0.3);
    padding:28px;
    border: 2px solid #D8B26E;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #D8B26E, #CD853F, #D8B26E);
    border-radius: 16px;
    z-index: -1;
    opacity: 0.8;
}

.modal-title {
    font-size:22px;
    font-weight:800;
    margin-bottom:16px;
    color: #7A1E12;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #D8B26E;
    letter-spacing: 0.05em;
}

.modal-body {
    line-height:1.8;
    color:#5C3A1E;
    font-size: 15px;
}

.modal-close {
    float: right;
    font-size:24px;
    cursor:pointer;
    color: #8B6F4D;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: absolute;
    top: 12px;
    right: 12px;
}

.modal-close:hover {
    background: rgba(139, 69, 19, 0.1);
    color: #7A1E12;
    transform: rotate(90deg);
}

.modal-body .line {
    margin:10px 0;
    padding: 8px 0;
    border-bottom: 1px dashed #E6D6B1;
}

.modal-body .line:last-child {
    border-bottom: none;
}

.modal-body .line:first-child {
    font-weight: 600;
    color: #7A1E12;
}

/* 神煞名称特殊样式 */
.modal-body .line:nth-child(2) {
    font-size: 16px;
    font-weight: 700;
    color: #A22D2D;
}

/* 组合说明样式 */
.modal-body .line:has('组合') {
    background: #FFF8DC;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid #D8B26E;
}
/* 批量删除确认弹窗尺寸优化 */
#confirmModal .modal-content {
    width: 420px;
    max-width: 90%;
    margin: 0 auto;
    background: #fff;
    border: 2px solid #D8B26E;
}
#confirmModal .modal-title {
    color: #8B4513;
    text-align: center;
    font-size: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E6D6B1;
}
#confirmModal .modal-body .line {
    color: #6B3E1F;
    border-bottom: none;
    padding: 0;
    margin: 0;
}

.main-table th, .main-table td { border: 1px solid #c9a66b; }
.inline-row { display:flex; align-items:center; gap: 24px; flex-wrap: nowrap; margin-bottom: 24px; }
.inline-row .name-wrap, .inline-row .gender-wrap { display:flex; align-items:center; gap:8px; }
.name-input { width: 220px; }
.first-row { display: grid; grid-template-columns: 220px 260px 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
.first-row .name-wrap, .first-row .gender-wrap, .first-row .inputtype-wrap { display:flex; align-items:center; gap:8px; }
.first-row .name-input { width: 110px; }
.first-row .inputtype-wrap { justify-content: flex-start; }
.collapsible { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease; }
.collapsible.open { max-height: 1000px; opacity: 1; }
.liunian-sub-list, .liuyue-sub-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 8px; }
.liunian-item, .liunian-month-item { background: #FDF1D6; border: 1px solid #D2B48C; border-radius: 6px; padding: 6px; text-align: center; cursor: pointer; }
.liunian-item:hover, .liunian-month-item:hover { background: #F7E5BE; }
.liunian-item.active, .liunian-month-item.active { background: #8B4513; color: #fff; border-color: #8B4513; }
.decade-cell, .liunian-cell { position: relative; }
.decade-cell.active, .liunian-cell.active { background-color: #8B4513; color: #fff; border-color: #8B4513; }
.decade-cell.active a, .liunian-cell.active a { color: #fff; }
.decade-cell .decade-ganzhi, .liunian-cell .liunian-ganzhi { font-weight: 700; }

/* —— 国学主题增强 —— */
:root { --cloud1-alpha: 0.15; --cloud2-alpha: 0.08; }
body { background-image: radial-gradient(circle at 20% 10%, rgba(216,178,110,var(--cloud1-alpha)), transparent 60%), radial-gradient(circle at 80% 90%, rgba(139,26,26,var(--cloud2-alpha)), transparent 55%); }
.brand-title { letter-spacing: 0.08em; position: relative; display: inline-block; padding: 8px 18px; border: 2px solid #D8B26E; border-radius: 8px; background: linear-gradient(180deg,#FFF6E0 0%,#FFF1D2 100%); box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.brand-title:before, .brand-title:after { content:""; position:absolute; width:18px; height:18px; border:2px solid #D8B26E; border-radius:50%; background: conic-gradient(from 45deg, rgba(216,178,110,0.25) 0 25%, transparent 0 100%); }
.brand-title:before { left:-12px; top:-12px; }
.brand-title:after { right:-12px; bottom:-12px; }
.cloud-divider { height: 26px; margin: 8px 0 18px; background:
  radial-gradient(circle at 12px 13px, rgba(216,178,110,0.35) 0, rgba(216,178,110,0.35) 7px, transparent 7px) 0 0/48px 100% repeat-x,
  radial-gradient(circle at 36px 13px, rgba(122,30,18,0.15) 0, rgba(122,30,18,0.15) 7px, transparent 7px) 0 0/48px 100% repeat-x; }
.input-section.ornament, .result-section.ornament { position: relative; }
.input-section.ornament:before, .input-section.ornament:after, .result-section.ornament:before, .result-section.ornament:after { content:""; position:absolute; width:22px; height:22px; border:2px solid #D8B26E; }
.input-section.ornament:before, .result-section.ornament:before { left:-11px; top:-11px; border-right:none; border-bottom:none; border-radius:6px 0 0 0; }
.input-section.ornament:after, .result-section.ornament:after { right:-11px; bottom:-11px; border-left:none; border-top:none; border-radius:0 0 6px 0; }
.seal-btn { position: relative; letter-spacing: 0.12em; border: 2px solid #7A1E12; border-radius: 999px; text-shadow: 0 1px 0 rgba(0,0,0,0.2); }
.seal-btn:before { content:""; position:absolute; inset:-6px; border:2px solid rgba(122,30,18,0.35); border-radius:999px; }
.shensha-item { display:inline-block; padding:2px 6px; border:1px solid #D8B26E; border-radius:6px; background:
  repeating-linear-gradient(0deg, rgba(216,178,110,0.15), rgba(216,178,110,0.15) 10px, transparent 10px, transparent 20px),
  repeating-linear-gradient(90deg, rgba(216,178,110,0.15), rgba(216,178,110,0.15) 10px, transparent 10px, transparent 20px);
  transition: transform .12s ease, box-shadow .12s ease; }
.shensha-item:active { transform: translateY(1px); box-shadow: inset 0 1px 3px rgba(0,0,0,0.12); }
.site-footer { margin-top: 28px; padding: 18px 10px; text-align: center; color: #7A1E12; border-top: 1px dashed #D8B26E; background: linear-gradient(180deg, #FFF6E0, #FFF1D2); }
.site-footer .wish { font-family: "KaiTi", "Noto Serif SC", serif; font-size: 1.05rem; letter-spacing: 0.08em; }
.site-footer:after { content: "缘福堂"; display:inline-block; margin-left: 12px; padding: 6px 10px; border:2px solid #7A1E12; border-radius:999px; color:#7A1E12; font-weight:700; letter-spacing:0.2em; box-shadow: 0 2px 0 rgba(122,30,18,0.25) inset; }

/* 命局分析美化样式 */
.analysis-section {
    background: linear-gradient(135deg, #fff 0%, #fff9f0 100%);
    border: 2px solid #D8B26E;
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.1);
    position: relative;
}

.analysis-header {
    background: linear-gradient(135deg, #7A1E12 0%, #8B3A1F 100%);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.analysis-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><path d="M0,10 Q25,20 50,10 T100,10 L100,20 L0,20 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
}

.analysis-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.analysis-icon {
    font-size: 28px;
    opacity: 0.8;
    animation: rotate 20s linear infinite;
    position: relative;
    z-index: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.analysis-content {
    padding: 24px;
    background: rgba(255, 255, 255, 0.95);
}

.analysis-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #E6D6B1;
    transition: all 0.2s ease;
}

.analysis-item:hover {
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.1);
    transform: translateX(4px);
}

.analysis-item:last-child {
    margin-bottom: 0;
}

.analysis-item.highlight {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE9B3 100%);
    border-color: #D8B26E;
    font-weight: 600;
}

.analysis-item.good {
    background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e8 100%);
    border-color: #90c690;
}

.analysis-item.bad {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-color: #d4a0a0;
}

.analysis-item.lucky {
    background: linear-gradient(135deg, #fffbf0 0%, #fff5cc 100%);
    border: 2px solid #D4AF37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    padding: 16px 20px;
}

.analysis-item.unlucky {
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    border: 2px solid #999;
    padding: 16px 20px;
}

/* 优化喜用神和忌神的布局 */
.analysis-item.lucky, .analysis-item.unlucky {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.analysis-item.lucky .analysis-label {
    min-width: auto;
    padding-right: 0;
    border-right: none;
    margin-right: 0;
    margin-bottom: 8px;
    font-size: 18px;
    color: #D4AF37;
    font-weight: 700;
}

.analysis-item.unlucky .analysis-label {
    min-width: auto;
    padding-right: 0;
    border-right: none;
    margin-right: 0;
    margin-bottom: 8px;
    font-size: 18px;
    color: #666;
    font-weight: 700;
}

.analysis-item.lucky .analysis-value-wrapper,
.analysis-item.unlucky .analysis-value-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
}

.analysis-item.lucky .analysis-value {
    font-size: 18px;
    font-weight: 700;
    color: #D4AF37;
    padding: 10px 16px;
    background: rgba(212, 175, 55, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    margin: 0;
}

.analysis-item.unlucky .analysis-value {
    font-size: 18px;
    font-weight: 700;
    color: #666;
    padding: 10px 16px;
    background: rgba(153, 153, 153, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(153, 153, 153, 0.3);
    margin: 0;
}

.analysis-item.lucky .analysis-desc,
.analysis-item.unlucky .analysis-desc {
    font-size: 14px;
    font-style: normal;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    margin: 0;
    line-height: 1.6;
}

.analysis-item.lucky .analysis-desc {
    border-left: 4px solid #D4AF37;
    color: #8B6F4D;
}

.analysis-item.unlucky .analysis-desc {
    border-left: 4px solid #999;
    color: #666;
}

.analysis-item.fortune {
    background: linear-gradient(135deg, #f5f5ff 0%, #e8e8ff 100%);
    border-color: #b3b3e6;
}

.analysis-item.detail {
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
    border-style: dashed;
}

.analysis-label {
    font-weight: 700;
    color: #7A1E12;
    min-width: 100px;
    padding-right: 16px;
    border-right: 2px solid #E6D6B1;
    margin-right: 16px;
}

.analysis-item.good .analysis-label {
    color: #2d6a2d;
}

.analysis-item.bad .analysis-label {
    color: #a02c2c;
}

.analysis-item.lucky .analysis-label {
    color: #b8860b;
}

.analysis-value {
    flex: 1;
    font-size: 16px;
    color: #5C3A1E;
}

.analysis-desc {
    font-size: 14px;
    color: #8B6F4D;
    margin-left: 12px;
    font-style: italic;
}

/* 特殊标记 */
.analysis-item.highlight .analysis-value {
    font-size: 18px;
    color: #7A1E12;
}

.analysis-item.lucky .analysis-value {
    font-weight: 700;
    color: #D4AF37;
}

.analysis-item.unlucky .analysis-value {
    font-weight: 700;
    color: #666;
}
