/* 农历日历/万年历样式 */

.lunar-calendar-section {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
}

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title i {
    margin-right: 15px;
    font-size: 2.8rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.workspace {
    display: flex;
    gap: 30px;
    padding: 40px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.calendar-panel {
    flex: 1;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.view-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn:hover {
    background: #f0f0ff;
}

.view-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.date-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
}

#todayBtn {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.current-date {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    min-width: 120px;
    text-align: center;
}

.calendar-content {
    margin-bottom: 30px;
}

.calendar-view {
    display: none;
}

.calendar-view.active {
    display: block;
}

/* 月视图样式 */
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 10px;
}

.weekday {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
    border-radius: 5px;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.day {
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.day:hover {
    background: #f0f0ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.day.empty {
    background: #f8f9fa;
    cursor: default;
}

.day.empty:hover {
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

.day.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.day.weekend {
    background: #fff5f5;
}

.day.solar-term {
    background: #fff3cd;
    border-color: #ffeeba;
}

.day.lunar-festival {
    background: #d4edda;
    border-color: #c3e6cb;
}

.day.solar-festival {
    background: #d1ecf1;
    border-color: #bee5eb;
}

.solar-day {
    font-size: 1rem;
    font-weight: 500;
}

.lunar-day {
    font-size: 0.8rem;
    margin-top: 4px;
    opacity: 0.8;
}

.day.today .lunar-day {
    opacity: 0.9;
}

/* 年视图样式 */
.year-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.month-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.month-header {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.month-weekdays {
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 5px;
    color: #666;
}

.month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    font-size: 0.8rem;
}

.month-day {
    text-align: center;
    padding: 4px;
    border: 1px solid #e0e0e0;
    background: white;
}

.month-day.empty {
    background: #f8f9fa;
    border: none;
}

.month-day.weekend {
    background: #fff5f5;
}

/* 图例样式 */
.legend {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.legend h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-color.today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.legend-color.solar-term {
    background: #fff3cd;
    border: 1px solid #ffeeba;
}

.legend-color.lunar-festival {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.legend-color.solar-festival {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

.legend-color.weekend {
    background: #fff5f5;
}

/* 信息面板样式 */
.info-panel {
    width: 350px;
    flex-shrink: 0;
}

.info-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-card ul li:last-child {
    border-bottom: none;
}

.info-card ul li strong {
    color: #333;
}

.knowledge-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.knowledge-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.knowledge-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.knowledge-item p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* 日期信息样式 */
.date-info-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-placeholder {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 0.95rem;
}

.info-value {
    font-weight: 600;
    color: #333;
}

.info-item.solar-term .info-value {
    color: #856404;
}

.info-item.festival .info-value {
    color: #155724;
}

@media (max-width: 768px) {
    .workspace {
        flex-direction: column;
    }

    .info-panel {
        width: 100%;
    }

    .year-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .view-controls {
        justify-content: center;
    }

    .date-controls {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .year-grid {
        grid-template-columns: 1fr;
    }

    .day {
        min-height: 70px;
        padding: 8px 4px;
    }

    .solar-day {
        font-size: 0.9rem;
    }

    .lunar-day {
        font-size: 0.7rem;
    }
}