/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:active {
    transform: scale(0.98);
}

.error {
    color: #e74c3c;
    margin-top: 15px;
    font-size: 14px;
}

.hints {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: left;
}

.hints p {
    color: #888;
    font-size: 14px;
    margin-bottom: 5px;
}

/* 主页面 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.header h1 {
    font-size: 24px;
    color: #333;
}

.header .subtitle {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.user-info {
    margin-top: 10px;
    font-size: 16px;
    color: #555;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    background: #f0f0f0;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
}

.logout-btn:hover {
    background: #e0e0e0;
}

/* 月份导航 */
.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.month-nav h2 {
    font-size: 20px;
    color: #333;
}

.nav-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.nav-btn:active {
    transform: scale(0.95);
}

/* 图例 */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

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

/* 日历 */
.calendar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

.calendar-header div {
    padding: 15px 5px;
    text-align: center;
    font-size: 14px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
    min-height: 80px;
    border: 1px solid #f0f0f0;
    padding: 5px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
}

.calendar-day:hover {
    background: #f8f9ff;
}

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

.calendar-day.today {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.calendar-day.today .day-number {
    color: #d39e00;
    font-weight: bold;
    font-size: 16px;
}

.day-number {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.day-users {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    flex: 1;
}

.day-user {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 提示 */
.tips {
    text-align: center;
    margin-top: 20px;
    color: white;
    font-size: 14px;
}

.tips p {
    margin-bottom: 5px;
}

/* 响应式 */
@media (max-width: 600px) {
    .calendar-day {
        min-height: 60px;
        padding: 3px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .day-user {
        padding: 1px 4px;
        font-size: 9px;
    }
    
    .calendar-header div {
        padding: 10px 2px;
        font-size: 12px;
    }
}
