.year-calendar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px auto;
    gap: 15px;
    max-width: 1200px; /* 容器最大宽度 */
}
.month {
    background-color: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    flex: 1 1 calc(25% - 30px); /* 每行最多显示4个，留出间隙 */
    min-width: 250px; /* 最小宽度 */
    max-width: 300px; /* 最大宽度，防止过宽 */
    overflow: hidden; /* 避免内容溢出 */
    transition: transform 0.2s ease;
}
.month:hover {
    transform: scale(1.05);
}
.month-name {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #4A90E2;
    margin-bottom: 10px;
}
table {
    width: 100%; /* 表格宽度自适应父容器 */
    border-collapse: collapse;
    table-layout: fixed; /* 固定表格布局 */
}
th, td {
    width: 14.28%; /* 每列占总宽度的 1/7 */
    height: 35px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #e3e3e3;
    color: #555;
    position: relative;
    box-sizing: border-box; /* 确保宽度包括内边距和边框 */
}
th {
    background-color: #f4f4f4;
    color: #555;
    font-weight: bold;
}
td {
    background-color: #ffffff;
}
td:hover {
    background-color: #dff0ff;
    cursor: pointer;
}
.empty {
    background-color: #f7f8fc;
    cursor: default;
}
.heart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 0, 0, 0.3); /* 半透明的红色背景 */
    color: #ff0000;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}
/* 响应式设计 */
@media (max-width: 1024px) {
    .month {
        flex: 1 1 calc(33.33% - 20px); /* 每行最多显示3个 */
    }
}
@media (max-width: 768px) {
    .month {
        flex: 1 1 calc(50% - 20px); /* 每行最多显示2个 */
    }
}
@media (max-width: 480px) {
    .month {
        flex: 1 1 calc(100% - 20px); /* 每行显示1个 */
    }
}
