/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'Microsoft Yahei', sans-serif;
}

:root {
    --primary: #5d4037;
    --secondary: #8d6e63;
    --accent: #ff9800;
    --text-primary: #212121;
    --text-secondary: #757575;
    --background: #f5f5f5;
    --card-bg: #ffffff;
    --highlight: #ffeb3b;
    --success: #4caf50;
    --error: #f44336;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 布局容器 */
.huangli-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, #3e2723 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header-content {
    text-align: center;
}

.site-title {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.site-description {
    font-size: 1rem;
    opacity: 0.9;
}

/* 实时更新通知 */
.update-notice {
    text-align: center;
    padding: 10px;
    background-color: #e8f5e9;
    border-radius: var(--radius);
    margin: 15px 0;
    font-size: 0.9rem;
    color: #2e7d32;
}

/* 主内容区 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 25px 0;
}

/* 卡片通用样式 */
.content-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 15px 20px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* 日期信息块 */
.date-block {
    background: #f5f5f5;
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.date-row {
    margin: 8px 0;
    display: flex;
}

.date-label {
    font-weight: 700;
    min-width: 80px;
    color: var(--secondary);
}

.date-value {
    flex: 1;
}

/* 宜忌区 */
.yiji-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.yi-block,
.ji-block {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border-radius: var(--radius);
}

.yi-block {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-left: 4px solid #4caf50;
}

.ji-block {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
}

.yiji-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
}

.yi-tag {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.ji-tag {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

/* 方位区 */
.directions-wrapper {
    margin: 20px 0;
}

.direction-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 15px 0 10px;
    color: var(--secondary);
}

/* 日历区 */
.calendar-wrapper {
    width: 100%;
}

.date-navigator {
    background: var(--background);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.date-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.date-controls select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: white;
    font-size: 0.9rem;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #3e2723;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background: #6d4c41;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.weekday-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 5px;
}

.weekday {
    text-align: center;
    font-weight: 700;
    padding: 10px 0;
    background: var(--secondary);
    color: white;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.cal-day {
    min-height: 70px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px;
    text-align: center;
    background: white;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cal-day:hover {
    background: var(--background);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.day-num {
    font-size: 1rem;
    font-weight: 700;
}

.lunar-date {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.festival {
    font-size: 0.7rem;
    color: var(--primary);
    margin-top: 2px;
}

.jieqi {
    font-size: 0.7rem;
    color: var(--secondary);
    font-weight: 700;
    margin-top: 2px;
}

.today {
    background: rgba(93, 64, 55, 0.1);
    border: 2px solid var(--primary);
}

.empty-day {
    background: #f8f9fa;
    border: 1px dashed #ccc;
}

/* 未来运势 */
.forecast-wrapper {
    width: 100%;
}

.future-day {
    background: var(--background);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary);
    transition: all 0.2s ease;
}

.future-day:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.future-date {
    font-weight: 700;
    color: var(--secondary);
}

.future-weekday {
    color: #666;
    font-size: 0.9rem;
}

.forecast-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

/* 运势分析 */
.fortune-analysis {
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid #1976d2;
}

.fortune-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0d47a1;
}

/* 卦象解析 */
.hexagram-analysis {
    background: linear-gradient(135deg, #f3f2f8 0%, #e9e8f0 100%);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #5c6bc0;
}

/* 八字分析 */
.bazi-analysis {
    padding: 15px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid #8e24aa;
}

.bazi-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #4a148c;
}

.bazi-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 15px 0;
}

.bazi-pillar {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: white;
    border-radius: var(--radius);
    border: 1px solid #ce93d8;
}

/* 节气物候 */
.jieqi-wuhou {
    padding: 15px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid #ffa000;
}

/* 三伏数九 */
.seasonal-info {
    padding: 15px;
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid #0288d1;
}

/* 时辰信息 */
.shichen-section {
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: var(--radius);
    margin: 20px 0;
    border-left: 4px solid #388e3c;
}

/* 黄道吉日推荐 */
.lucky-days-section {
    margin-top: 25px;
}

.lucky-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.lucky-day-item {
    background: white;
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lucky-day-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

/* 知识面板 */
.knowledge-panel {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 25px 0;
}

.knowledge-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

/* 节气样式 */
.jieqi-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.jieqi-header {
    background-color: var(--primary);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.jieqi-title {
    color: white;
    font-size: 2.2rem;
    margin: 8px 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.jieqi-desc {
    color: rgba(255, 255, 255, 0.9);
    font-weight: normal;
    font-size: 0.95rem;
}

.jieqi-block {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.jieqi-block-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--primary);
}

.jieqi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.jieqi-item {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

.jieqi-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.jieqi-item.current {
    background-color: #fef9e7;
    border-left: 4px solid #f1c40f;
}

/* 三伏数九样式 */
.seasonal-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.seasonal-header {
    background-color: var(--primary);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.seasonal-block {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.sanfu-block {
    background-color: var(--sanfu-light);
    border-left: 4px solid var(--sanfu-color);
}

.shujiu-block {
    background-color: var(--shujiu-light);
    border-left: 4px solid var(--shujiu-color);
}

.seasonal-status {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sanfu-status {
    background-color: var(--sanfu-light);
    border-left: 4px solid var(--sanfu-color);
}

.shujiu-status {
    background-color: var(--shujiu-light);
    border-left: 4px solid var(--shujiu-color);
}

:root {
    --sanfu-color: #e65100;
    --sanfu-light: #fff3e0;
    --shujiu-color: #0d47a1;
    --shujiu-light: #e3f2fd;
}

/* 页脚样式 */
.site-footer {
    background: linear-gradient(135deg, var(--primary) 0%, #3e2723 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 25px 0;
    margin-top: 30px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-text {
    opacity: 0.8;
    margin-bottom: 8px;
}

.footer-links {
    margin: 10px 0;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-right: 15px;
}

.footer-links a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.footer-divider {
    margin: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.beian-info {
    margin: 15px 0;
}

.beian-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.friend-links {
    margin-top: 15px;
    font-size: 0.85rem;
}

.friend-links-title {
    margin-bottom: 8px;
    opacity: 0.8;
}

.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.friend-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-right: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .calendar-grid {
        gap: 3px;
    }

    .cal-day {
        min-height: 60px;
        font-size: 0.9rem;
    }

    .bazi-grid {
        flex-wrap: wrap;
    }

    .bazi-pillar {
        min-width: 45%;
    }

    .yiji-wrapper {
        flex-direction: column;
    }

    .lucky-days-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}