/* 黄历页面样式 */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-title {
    text-align: center;
    color: #8b0000;
    margin-bottom: 30px;
    font-size: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* 日期控制区域 */
.date-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* 日期导航按钮区域 */
.date-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* 日期选择容器包装器 */
.date-selection-wrapper {
    display: flex;
    width: 100%;
    gap: 15px;
    justify-content: center;
}

/* 日期组样式 */
.date-group {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 253, 240, 0.7);
    border: 1px solid #e0d6b8;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 6px rgba(139, 69, 19, 0.1);
    flex: 1;
    min-width: 0; /* 防止内容溢出 */
}

/* 日期标签 */
.date-label {
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 10px;
    font-size: 1.1rem;
    text-align: center;
}

/* 日期选择容器 */
.date-selection-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 农历日期输入区域 */
.lunar-date-inputs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

/* 日期选择器样式 */
.date-picker {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    max-width: 300px;
}

/* 农历日期选择器 */
.lunar-date-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    min-width: 80px;
    background-color: #fffef5;
}

/* 农历年份输入框容器 */
.lunar-year-input-container {
    position: relative;
    display: inline-flex;
    width: 100%;
    max-width: 120px;
}

/* 年份干支显示 */
.lunar-year-ganzhi {
    position: absolute;
    right: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #8B4513;
    font-size: 0.9em;
    pointer-events: none;
}

/* 年份选择器图标 */
.year-picker-icon {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #f5f5dc;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #8B4513;
    font-weight: bold;
    transition: background-color 0.3s;
}

.year-picker-icon:hover {
    background-color: #f0e6cc;
}

/* 年份下拉列表 */
.year-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 180px;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fffef5;
    border: 1px solid #d9ccb3;
    border-radius: 4px;
    z-index: 1000;
    display: none;
    padding: 5px;
    margin-top: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.year-dropdown-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.year-option {
    width: calc(33.33% - 4px);
    padding: 5px 3px;
    margin: 2px;
    text-align: center;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.year-option:hover {
    background-color: #f0e6cc;
}

/* 按钮样式 */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    min-width: 80px;
    font-family: 'KaiTi', 'STKaiti', serif;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #8B4513;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #9B5523;
}

/* 黄历容器 */
.huangli-container {
    background-color: rgba(255, 248, 220, 0.9);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.huangli-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #d4a76a;
    padding-bottom: 10px;
}

.huangli-header h3 {
    margin: 0;
    color: #8b4513;
    font-size: 1.5rem;
}

.current-time {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #5a3d1c;
    font-weight: bold;
}

/* 新的黄历内容布局 */
.huangli-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.huangli-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.huangli-middle-row {
    width: 100%;
}

.huangli-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 信息卡片样式 */
.info-card {
    background-color: rgba(255, 255, 240, 0.7);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d4a76a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #8b4513;
    border-bottom: 1px dashed #d4a76a;
    padding-bottom: 5px;
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
}

/* 通用标签样式 */
.label {
    font-weight: bold;
    color: #8b4513;
    margin-right: 8px;
}

.gan-zhi-hour {
    font-style: italic;
    color: #555;
}

/* 日期信息区域 */
.date-info .info-grid {
    grid-template-columns: 1fr;
}

/* 宜忌区域 */
.suitable-unsuitable {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.yi-ji-section .suitable-unsuitable {
    display: flex;
    gap: 20px;
}

.suitable-section, .unsuitable-section {
    flex: 1;
    width: 50%;
}

.suitable-section h5, .unsuitable-section h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #8b4513;
    text-align: center;
    font-size: 1.1rem;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.suitable-tag {
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
}

.unsuitable-tag {
    background-color: #ffebee;
    border: 1px solid #e57373;
    color: #c62828;
}

/* 彭祖百忌区域 */
.peng-zu-bai-ji {
    background-color: #8b451345;
    padding: 15px;
    border-radius: 4px;
    font-family: "SimSun", "宋体", serif;
    line-height: 1.6;
    color: #333;
}

/* 神煞信息区域 */
.shen-sha-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shen-sha-row-j {
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.shen-sha-row-x{
    background-color: #ffebee;
    border: 1px solid #e57373;
    color: #c62828;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.shen-sha-item {
    flex: 1;
    min-width: 150px;
}

.ji-xiong-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.shen-sha-column-j {
    background-color: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shen-sha-column-x {
    background-color: #ffebee;
    border: 1px solid #e57373;
    color: #c62828;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 九天黄历样式 */
.week-huangli {
    margin-top: 30px;
}

.extension-toggle {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 4px 14px;
    border: 0;
    border-top: 1px solid rgba(92, 49, 20, 0.3);
    border-bottom: 1px solid rgba(92, 49, 20, 0.3);
    background: transparent;
    color: #8b0000;
    font: 500 2.8rem/1.2 'YanTi', 'STKaiti', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.extension-indicator {
    position: absolute;
    right: 8px;
    display: inline-block;
    color: #5c3114;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.extension-toggle[aria-expanded="true"] .extension-indicator {
    transform: rotate(90deg);
}

.extension-toggle:focus-visible {
    outline: none;
    box-shadow: inset 3px 0 #8b4513;
}

.week-huangli-panel {
    padding-top: 18px;
}

.scenario-filter {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    max-width: 720px;
    margin: 0 auto 20px;
}

.scenario-option {
    min-width: 0;
    padding: 8px 6px;
    border: 1px solid #d4a76a;
    border-radius: 4px;
    background: rgba(255, 248, 220, 0.7);
    color: #5c3114;
    font: 500 1rem 'KaiTi', 'STKaiti', serif;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.scenario-option:hover {
    background: #f0e6cc;
}

.scenario-option[aria-pressed="true"] {
    border-color: #8b4513;
    background: #8b4513;
    color: #fff;
}

.scenario-option:focus-visible {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.day-card {
    background-color: #fff8dc;
    border: 1px solid #d4a76a;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.day-card.today {
    border: 2px solid #8b4513;
    background-color: #f5e9d3;
}

.date-title {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #d4a76a;
}

.solar-date {
    font-size: 1.1em;
    font-weight: bold;
}

.weekday {
    font-size: 0.9em;
    color: #8b4513;
}

.lunar-date {
    font-size: 0.9em;
    color: #8b4513;
}

/* 九天黄历中的宜忌区域 */
.day-card .suitable-unsuitable {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.day-card .suitable-unsuitable-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.day-card .suitable,
.day-card .unsuitable {
    width: 48%;
    min-height: 2.8em;
    display: flex;
    flex-direction: column;
}

.day-card .suitable .label,
.day-card .unsuitable .label {
    font-weight: bold;
    margin-right: 5px;
    flex-shrink: 0;
    text-align: center;
}

.day-card .suitable .content {
    font-size: 0.8em;
    color: #2e7d32;
}

.day-card .unsuitable .content {
    font-size: 0.8em;
    color: #c62828;
}

/* 九天黄历中的神煞信息 */
.shen-sha-brief {
    font-size: 0.75em;
    margin-top: 8px;
    color: #666;
    border-top: 1px dashed #d4a76a;
    padding-top: 8px;
    line-height: 1.4;
    text-align: left;
}


/* 节气与节日区域 */


.solar-term-festival {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.solar-term, .festival {
    display: flex;
    justify-content: space-between;
}

.festival-list {
    display: flex;
    flex-wrap: wrap;
    color: #006400;
    font-weight: bold;
    font-style: italic;
    gap: 5px;
}

.festival-item {
    background-color: #f8f0e3;
    border: 1px solid #d4a76a;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.9em;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.huangli-container, .week-huangli {
    animation: fadeIn 0.8s ease-in-out;
}

/* 适配卷轴容器样式 */
.scroll-content {
    padding: 20px 30px;
}

/* 诗词部分样式 */
.poetry-section {
    margin: 20px 0;
    text-align: center;
}

@keyframes fadeInPoem {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before, .divider::after {
    content: "";
    display: inline-block;
    width: 40%;
    height: 1px;
    background: linear-gradient(to right, transparent, #d4a76a, transparent);
    vertical-align: middle;
}

.cloud-pattern {
    display: inline-block;
    width: 40px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 40' fill='%23d4a76a'%3E%3Cpath d='M0,20 Q10,5 20,20 T40,20 T60,20 T80,20 Q70,35 60,20 Q50,5 40,20 Q30,35 20,20 Q10,5 0,20'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 10px;
}

/* 九天黄历网格样式 */
.nine-days-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.day-card {
    background-color: rgba(255, 248, 220, 0.9);
    border: 1px solid #d4a76a;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.day-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.day-date {
    font-size: 14px;
    margin-bottom: 8px;
    color: #8b4513;
    border-bottom: 1px dashed #d4a76a;
    padding-bottom: 5px;
}

.day-suitable {
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.suitable {
    color: #006400;
}

.unsuitable {
    color: #8b0000;
}

.day-chong {
    font-size: 12px;
    color: #8b4513;
    font-weight: bold;
}

/* 错误信息样式 */
.error {
    color: #8b0000;
    text-align: center;
    padding: 20px;
    background-color: rgba(255, 248, 220, 0.9);
    border: 1px solid #d4a76a;
    border-radius: 8px;
    margin-top: 20px;
}

/* 九天黄历中的宜忌样式 */
.suitable-unsuitable .content {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
    line-height: 1.4;
}



.inline-status { min-height: 1.5rem; text-align: center; }
.inline-status[data-type="error"] { color: #8f1d1d; }
.inline-status[data-type="success"] { color: #2f6b3c; }
.scenario-mark {
    width: fit-content;
    margin: 8px auto 4px;
    padding: 5px 14px;
    border-radius: 3px;
    color: #fff;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}
.scenario-宜 { background: #2f6b3c; }
.scenario-忌 { background: #9b1c1c; }
.responsible-use-notice { color: #66584b; font-size: 0.9rem; text-align: center; }
