/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
}

/* 标题 */
h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 2rem;
}

/* 日历导航 */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

#current-month-year {
    font-size: 1.5rem;
    font-weight: bold;
    color: #34495e;
}

.nav-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: #2980b9;
}

/* 日历布局 */
.calendar {
    width: 100%;
}

/* 星期标题 */
.weekdays {
    display: flex;
    background-color: #2c3e50;
    color: white;
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

.weekday {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    font-weight: bold;
    font-size: 1rem;
}

/* 日期格子 */
.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.day {
    background-color: white;
    padding: 15px 10px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: background-color 0.3s ease;
}

.day:hover {
    background-color: #f0f0f0;
}

.day.other-month {
    background-color: #f9f9f9;
    color: #ccc;
}

.day.today {
    background-color: #d4edda;
    border: 2px solid #28a745;
}

.day.workday {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.day.holiday {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.day.work-holiday {
    background: linear-gradient(to bottom, #fff3cd 50%, #d4edda 50%);
    border-left: 4px solid #ffc107;
}

.day-date {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-shift {
    font-size: 0.9rem;
    color: #666;
}

.day-shift.work-bold {
    font-weight: bold;
}

.day-holiday {
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: bold;
    margin-top: 3px;
}

/* 统计信息 */
.stats {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.stats p {
    font-size: 1.1rem;
    font-weight: bold;
    color: #34495e;
}

.stats span {
    color: #e74c3c;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 0;
        padding: 10px;
        border-radius: 0;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    #current-month-year {
        font-size: 1.2rem;
    }
    
    .nav-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .weekday {
        padding: 10px 0;
        font-size: 0.9rem;
    }
    
    .day {
        padding: 10px 5px;
        min-height: 80px;
    }
    
    .day-date {
        font-size: 1rem;
    }
    
    .day-shift {
        font-size: 0.8rem;
    }
    
    .stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .stats p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .days {
        gap: 0.5px;
    }
    
    .day {
        padding: 8px 3px;
        min-height: 70px;
    }
    
    .day-date {
        font-size: 0.9rem;
    }
    
    .day-shift {
        font-size: 0.7rem;
    }
}