/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.calendar-app {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    padding: 20px;
    box-sizing: border-box;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.5em;
    color: #007bff;
    margin: 0;
}

.header button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.header button:hover {
    background-color: #0056b3;
}

/* 日历网格样式 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

/* 周一到周日的名称 */
.day-name {
    font-weight: bold;
    padding: 10px 0;
    color: #555;
    background-color: #e9ecef;
    border-radius: 4px;
}

/* 日期单元格 */
.date-cell {
    padding: 10px 0;
    border-radius: 4px;
    cursor: default;
    transition: background-color 0.1s;
}

/* 当前月份的日期 */
.current-month {
    color: #333;
}

/* 非当前月份的日期（上个月/下个月） */
.outside-month {
    color: #ccc;
}

/* 今天日期的高亮 */
.today {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.4);
}

/* 周末日期的高亮 */
.weekend {
    color: #dc3545; /* 红色表示周末 */
}

/* 底部样式 */
.footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8em;
    color: #999;
}

/* 调整周日的字体颜色 */
.calendar-grid > :nth-child(7n + 1),
.calendar-grid > :nth-child(7n) {
    /* 配合 weekend 类 */
}
