/* ===== 公历农历转换 美化样式 ===== */

.lunar-app { padding: 16px; }

/* 左右布局：左表单 右结果 */
.lunar-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}
.lunar-forms {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.lunar-card {
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 2px 10px rgba(31, 45, 61, .04);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.lunar-card:hover {
    border-color: #c9d8f7;
    box-shadow: 0 6px 18px rgba(31, 45, 61, .08);
}

.lunar-card__head {
    padding: 12px 16px;
    color: #3a6fd8;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #f0f3f9;
    border-radius: 11px 11px 0 0;
}
.lunar-card__head--yang,
.lunar-card__head--yin { background: #f7faff; }

.lunar-card__body { padding: 16px; }

.lunar-pick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 18px;
}
.lunar-pick .form-control {
    width: auto;
    min-width: 74px;
    display: inline-block;
    border-radius: 8px;
    border-color: #dfe3ec;
}
.lunar-pick .lunar-sep { color: #9aa3b2; font-size: 14px; }
.lunar-pick strong { display: none; }

/* PC 端自定义下拉（js/lunar-select.js 生成） */
.lsel-hidden { display: none !important; }
.lsel { position: relative; display: flex; flex: 1 1 0; min-width: 0; }
.lsel__btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #dfe3ec;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.lsel__btn:hover,
.lsel__btn.is-open {
    border-color: #4e8cff;
    box-shadow: 0 0 0 2px rgba(78, 140, 255, .12);
    color: #333;
}
.lsel__btn .fa-angle-down { color: #98a2b3; transition: transform .15s; }
.lsel__btn.is-open .fa-angle-down { transform: rotate(180deg); }
.lsel__panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 50;
    min-width: 100%;
    max-height: 224px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(31, 45, 61, .12);
    padding: 4px;
}
.lsel__panel.is-open { display: block; }
.lsel__panel {
    scrollbar-width: thin;
    scrollbar-color: #c9d3e3 transparent;
}
.lsel__panel::-webkit-scrollbar { width: 6px; }
.lsel__panel::-webkit-scrollbar-track { background: transparent; }
.lsel__panel::-webkit-scrollbar-thumb { background: #c9d3e3; border-radius: 3px; }
.lsel__panel::-webkit-scrollbar-thumb:hover { background: #a8b6cc; }
.lsel__opt {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}
.lsel__opt:hover { background: #f0f5ff; color: #3a6fd8; }
.lsel__opt.is-active { background: #4e8cff; color: #fff; }

.lunar-btn {
    width: 100%;
    border: 1px solid #4e8cff;
    background: #4e8cff;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    box-shadow: none;
    transition: background .2s;
}
.lunar-btn:hover  { background: #3a6fd8; border-color: #3a6fd8; color: #fff; }
.lunar-btn:active { background: #3a6fd8; }
.lunar-btn:focus,
.lunar-btn:active:focus,
.lunar-btn.active:focus,
.lunar-btn:focus:active {
    outline: none;
    outline-offset: 0;
    box-shadow: none;
    background: #3a6fd8;
    border-color: #3a6fd8;
    color: #fff;
}
.yang-btn { background: #4e8cff; }
.yin-btn  { background: #4e8cff; }

/* 查询结果 */
.lunar-result {
    margin-top: 0;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(31, 45, 61, .04);
}
.lunar-result__title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lunar-result__title i { color: #4e8cff; }

.result-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 52px;
    background: linear-gradient(135deg, #f7f9ff, #eef3ff);
    border: 1px solid #e7ecfb;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
}
.result-label {
    color: #8a93a6;
    font-size: 14px;
    flex-shrink: 0;
    white-space: nowrap;
}
.result-value {
    flex: 1;
    color: #3a6fd8;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
    text-align: right;
}
.lunar-gz { display: inline; }

/* ===== 移动端美化 ===== */
@media (max-width: 768px) {
    .lunar-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .lunar-card__body { padding: 16px 14px; }
    .lunar-pick { gap: 6px; flex-wrap: nowrap; }
    .lunar-pick .form-control { min-width: 0; }
    .lunar-pick .lunar-sep { font-size: 13px; }
    .lsel__btn {
        min-width: 0;
        height: 32px;
        padding: 0 7px;
        font-size: 13px;
        gap: 5px;
    }
    .lsel__btn .fa-angle-down { font-size: 12px; }
    .lunar-result { padding: 16px 14px; margin-top: 0; }
    .result-item { padding: 12px 14px; min-height: 48px; }
    .lunar-gz { display: block; }
    .gz-bracket { display: none; }
}
