* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
}

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

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.event-icon {
    margin-right: 5px;
    font-size: 14px;
}

/* 事件详情模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border: none;
    width: 80%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* 模态框顶部装饰条 */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2196f3, #1976d2);
    border-radius: 12px 12px 0 0;
}

.close {
    color: #999;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f5f5f5;
    line-height: 1;
}

.close:hover {
    color: #333;
    background-color: #e0e0e0;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.event-details {
    margin-top: 20px;
    line-height: 1.7;
}

.event-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.event-details p strong {
    color: #555;
    font-weight: 600;
    min-width: 90px;
    flex-shrink: 0;
}

.event-details p span {
    color: #666;
    flex: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 15% auto;
        padding: 20px;
    }
    
    .event-details p {
        flex-direction: column;
        gap: 5px;
    }
    
    .event-details p strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 16px;
    }
    
    .modal-content h2 {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

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

.view-toggle .nav-btn {
    padding: 8px 16px;
    font-size: 14px;
}

.nav-btn[title="上一月"],
.nav-btn[title="下一月"],
.nav-btn[title="上一周"],
.nav-btn[title="下一周"] {
    font-size: 16px;
    padding: 8px 12px;
    min-width: 40px;
    text-align: center;
}
.header:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.header h1 {
    font-size: 24px;
    color: #2196f3;
    font-weight: 600;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.user-info span {
    font-weight: 500;
    color: #555;
}
.logout-btn {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.logout-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}
.calendar-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: box-shadow 0.3s ease;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    touch-action: pan-x;
}

.calendar-container:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 日历滚动容器 */
.calendar-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    touch-action: pan-x;
    white-space: nowrap;
}

.calendar-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.calendar-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.calendar-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.calendar-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.calendar-scroll-wrapper::-webkit-scrollbar-thumb:active {
    background: #333;
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.calendar-header h2 {
    font-size: 18px;
    color: #333;
    font-weight: 500;
}
.calendar-nav {
    display: flex;
    gap: 10px;
}
.nav-btn {
    background-color: #2196f3;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.nav-btn:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 150px);
    gap: 1px;
    background-color: #ddd;
    border-radius: 4px;
    overflow: hidden;
    min-width: 1050px;
    width: max-content;
}

.calendar-header-day {
    background-color: #f0f0f0;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
    color: #666;
}

.calendar-day {
    background-color: #fff;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 视图切换按钮样式 */
.view-toggle {
    display: flex;
    gap: 5px;
    margin: 10px 0;
}

.view-toggle .nav-btn {
    padding: 6px 12px;
    font-size: 13px;
    min-width: 40px;
    text-align: center;
}

.view-toggle .nav-btn.active {
    background-color: #1976d2;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

/* 周视图样式 */
.week-view {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    grid-template-rows: auto 1fr;
    height: 600px;
    overflow: auto;
}

.time-axis {
    grid-row: 2;
    grid-column: 1;
    background-color: #f9f9f9;
    border-right: 1px solid #ddd;
}

.time-slot {
    height: 60px;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-header {
    grid-row: 1;
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.week-day-header {
    padding: 10px;
    text-align: center;
    border-right: 1px solid #ddd;
}

.week-day-header:last-child {
    border-right: none;
}

.week-day-header.today {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
}

.day-name {
    font-size: 12px;
    color: #666;
}

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

.week-grid {
    grid-row: 2;
    grid-column: 2 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(24, 60px);
}

.week-slot {
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 2px;
    overflow: hidden;
    position: relative;
}

.week-slot:last-child {
    border-right: none;
}

.week-slot.today {
    background-color: #f3e5f5;
}

.slot-events {
    height: 100%;
    overflow: hidden;
}

/* 日视图样式 */
.day-view {
    display: flex;
    flex-direction: column;
    height: 600px;
    overflow: auto;
}

.day-header {
    background-color: #f0f0f0;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.day-grid {
    display: flex;
    flex-direction: column;
}

.day-time-slot {
    display: flex;
    height: 60px;
    border-bottom: 1px solid #ddd;
}

.time-label {
    width: 80px;
    padding: 5px;
    background-color: #f9f9f9;
    border-right: 1px solid #ddd;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-events {
    flex: 1;
    padding: 5px;
    overflow: hidden;
}

/* 年视图样式 */
.year-view {
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.year-header {
    text-align: center;
    margin-bottom: 20px;
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.year-month {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

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

.year-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.year-day:hover {
    background-color: #e3f2fd;
    transform: scale(1.05);
}

.year-day.today {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    font-weight: bold;
}
.calendar-header-day {
    background-color: #f0f0f0;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
    color: #666;
}
.calendar-day {
    background-color: #fff;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}
.calendar-day:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
}
.calendar-day.other-month {
    background-color: #f9f9f9;
    color: #999;
}
.day-number {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}
.events {
    margin-top: 5px;
    max-height: 80px;
    overflow-y: auto;
}
.event {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 3px 6px;
    margin-bottom: 4px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event:hover {
    background-color: #bbdefb;
    transform: translateX(2px);
}

/* 任务样式 */
.task {
    padding: 3px 6px;
    margin-bottom: 4px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid transparent;
}

.task:hover {
    transform: translateX(2px);
}

.task-todo {
    border-left-color: #ff8f00;
}

.task-in_progress {
    border-left-color: #1976d2;
}

.task-completed {
    border-left-color: #388e3c;
    text-decoration: line-through;
}

/* 日视图任务样式 */
.day-task {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.day-task:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.day-task.task-todo {
    background-color: #ffecb3;
    color: #ff8f00;
    border-left-color: #ff8f00;
}

.day-task.task-in_progress {
    background-color: #e3f2fd;
    color: #1976d2;
    border-left-color: #1976d2;
}

.day-task.task-completed {
    background-color: #e8f5e8;
    color: #388e3c;
    border-left-color: #388e3c;
    text-decoration: line-through;
}
.today {
    background-color: #e3f2fd !important;
    border: 2px solid #2196f3 !important;
}
.today .day-number {
    color: #2196f3;
    font-weight: bold;
}

/* 节日样式 */
.holiday-name {
    font-size: 11px;
    font-weight: bold;
    margin: 3px 0;
    padding: 2px 4px;
    border-radius: 3px;
    text-align: center;
    line-height: 1.2;
}

/* 通用节日样式 */
.holiday {
    position: relative;
}

/* 不同类型节日的样式 */
.holiday-法定节假日 {
    background-color: #fff3e0;
    border: 1px solid #ffcc80;
}

.holiday-法定节假日 .holiday-name {
    background-color: #ff9800;
    color: white;
}

.holiday-传统节日 {
    background-color: #e8f5e8;
    border: 1px solid #c8e6c9;
}

.holiday-传统节日 .holiday-name {
    background-color: #4caf50;
    color: white;
}

.holiday-国际节日 {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
}

.holiday-国际节日 .holiday-name {
    background-color: #2196f3;
    color: white;
}

.holiday-西方节日 {
    background-color: #f3e5f5;
    border: 1px solid #e1bee7;
}

.holiday-西方节日 .holiday-name {
    background-color: #9c27b0;
    color: white;
}

/* 确保节日显示不影响事件显示 */
.holiday .events {
    margin-top: 5px;
}

/* 天气样式 */
.weather-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3px 0;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
}

.weather-icon {
    font-size: 16px;
    margin-right: 4px;
}

.weather-temp {
    font-weight: bold;
    color: #333;
}

/* 不同天气状况的样式 */
.weather-clear {
    background-color: #fffde7;
    border: 1px solid #fff9c4;
}

.weather-clear .weather-info {
    background-color: #fff9c4;
}

.weather-cloudy {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.weather-cloudy .weather-info {
    background-color: #e0e0e0;
}

.weather-rainy {
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
}

.weather-rainy .weather-info {
    background-color: #bbdefb;
}

.weather-thunder {
    background-color: #f3e5f5;
    border: 1px solid #e1bee7;
}

.weather-thunder .weather-info {
    background-color: #e1bee7;
}

.weather-snowy {
    background-color: #fafafa;
    border: 1px solid #f5f5f5;
}

.weather-snowy .weather-info {
    background-color: #f5f5f5;
}

.weather-mist {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.weather-mist .weather-info {
    background-color: #e0e0e0;
}

/* 确保天气显示不影响其他内容 */
.weather-info {
    order: 2;
}

.holiday-name {
    order: 1;
}

.events {
    order: 3;
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .calendar-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .calendar-grid {
        min-width: 600px;
    }
    
    .calendar-day {
        min-height: 100px;
        padding: 8px;
    }
    
    .day-number {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .events {
        max-height: 60px;
    }
    
    .event {
        font-size: 11px;
        padding: 2px 4px;
        margin-bottom: 3px;
    }
    
    .holiday-name {
        font-size: 9px;
        padding: 1px 3px;
        margin: 2px 0;
    }
    
    .weather-info {
        font-size: 10px;
        margin: 2px 0;
        padding: 1px 3px;
    }
    
    .weather-icon {
        font-size: 14px;
        margin-right: 2px;
    }
    
    .holiday .events {
        margin-top: 3px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .calendar-header h2 {
        font-size: 16px;
    }
    
    .nav-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .calendar-grid {
        min-width: 500px;
    }
    
    .calendar-day {
        min-height: 90px;
        padding: 6px;
    }
    
    .day-number {
        font-size: 13px;
        margin-bottom: 3px;
    }
    
    .events {
        max-height: 50px;
    }
    
    .event {
        font-size: 10px;
        padding: 2px 3px;
        margin-bottom: 2px;
    }
    
    .holiday-name {
        font-size: 8px;
        padding: 1px 2px;
        margin: 1px 0;
    }
    
    .weather-info {
        font-size: 9px;
        margin: 1px 0;
        padding: 1px 2px;
    }
    
    .weather-icon {
        font-size: 12px;
        margin-right: 2px;
    }
    
    .holiday .events {
        margin-top: 2px;
        max-height: 50px;
    }
}

/* 后台日历的天气样式 */
.admin-module .weather-info {
    font-size: 11px;
}

.admin-module .weather-icon {
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}
input[type="text"],
input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}
input[type="text"]:focus,
input[type="datetime-local"]:focus,
textarea:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}
textarea {
    resize: vertical;
    min-height: 100px;
}
.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}
.btn-primary {
    background-color: #2196f3;
    color: white;
}
.btn-primary:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}
.btn-danger {
    background-color: #f44336;
    color: white;
}
.btn-danger:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}
.btn-secondary {
    background-color: #9e9e9e;
    color: white;
}
.btn-secondary:hover {
    background-color: #757575;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(158, 158, 158, 0.3);
}
.message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
    animation: fadeIn 0.3s ease;
}
.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}



/* 周视图和日视图样式 */

.week-view {
    grid-template-columns: 80px repeat(7, 1fr);
}

.week-day {
    min-height: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    position: relative;
    transition: all 0.3s ease;
}

.week-day:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
}

.week-day.today {
    background-color: #e3f2fd !important;
    border: 2px solid #2196f3 !important;
}

.time-slot {
    padding: 5px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    color: #666;
}

.week-day-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 2px;
}

.week-day-number {
    font-size: 14px;
    font-weight: bold;
}

/* 响应式设计 */



@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .header h1 {
        font-size: 20px;
    }
    .view-toggle {
        justify-content: center;
        flex-wrap: wrap;
    }
    .view-toggle .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    .calendar-container {
        padding: 15px;
    }
    .calendar-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .calendar-header h2 {
        text-align: center;
    }
    .calendar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-btn {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 80px;
    }
    .nav-btn[title="上一月"],
    .nav-btn[title="下一月"],
    .nav-btn[title="上一周"],
    .nav-btn[title="下一周"] {
        min-width: 40px;
        padding: 8px 10px;
    }
    .calendar-day {
        min-height: 90px;
        padding: 8px;
    }
    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 20px;
    }
    .form-buttons {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
    .day-name {
        font-size: 12px;
    }
    .day-number {
        font-size: 12px;
    }
    /* 触摸友好 */
    .event {
        padding: 4px 6px;
        font-size: 12px;
        min-height: 24px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 6px;
    }
    .header h1 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    .view-toggle {
        gap: 8px;
    }
    .view-toggle .nav-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 60px;
    }
    .calendar-container {
        padding: 8px;
        margin-bottom: 10px;
    }
    .calendar-header {
        margin-bottom: 10px;
    }
    .calendar-header h2 {
        font-size: 14px;
    }
    .calendar-nav {
        gap: 6px;
    }
    .nav-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 60px;
    }
    .nav-btn[title="上一月"],
    .nav-btn[title="下一月"],
    .nav-btn[title="上一周"],
    .nav-btn[title="下一周"] {
        min-width: 36px;
        padding: 6px 8px;
        font-size: 12px;
    }
    .calendar-grid {
        gap: 0.5px;
    }
    .calendar-header-day {
        padding: 6px 2px;
        font-size: 11px;
    }
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    .day-number {
        font-size: 12px;
        margin-bottom: 3px;
    }
    .events {
        max-height: 40px;
    }
    .event {
        font-size: 10px;
        padding: 2px 4px;
        min-height: 18px;
        margin-bottom: 2px;
    }
    .day-name {
        font-size: 9px;
    }
    .day-number {
        font-size: 9px;
    }
    /* 模态框优化 */
    .modal-content {
        width: 98%;
        margin: 30% auto;
        padding: 12px;
    }
    .modal-content h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .form-group {
        margin-bottom: 10px;
    }
    label {
        font-size: 13px;
    }
    input[type="text"],
    input[type="datetime-local"],
    textarea {
        padding: 8px;
        font-size: 14px;
    }
    /* 滚动条优化 */
    ::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    ::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
}

/* 竖屏优化 */
@media (max-width: 480px) and (orientation: portrait) {
    .header {
        padding: 12px;
        margin-bottom: 12px;
    }
    .calendar-container {
        padding: 8px;
    }
    .calendar-grid {
        gap: 0.5px;
    }
    .calendar-header-day {
        padding: 5px 1px;
        font-size: 10px;
    }
    .calendar-day {
        min-height: 50px;
        padding: 3px;
    }
    .day-number {
        font-size: 11px;
    }
    .event {
        font-size: 9px;
        padding: 2px 3px;
        min-height: 16px;
    }
    .view-toggle {
        flex-wrap: wrap;
        justify-content: center;
    }
    .view-toggle .nav-btn {
        flex: 1;
        min-width: 50px;
        text-align: center;
    }
    .calendar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .calendar-nav > div {
        display: flex;
        gap: 4px;
    }
    .nav-btn {
        flex: 1;
        min-width: 50px;
        text-align: center;
    }
}

/* 极小屏幕优化 */
@media (max-width: 320px) {
    .header h1 {
        font-size: 14px;
    }
    .view-toggle .nav-btn {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 50px;
    }
    .calendar-header h2 {
        font-size: 12px;
    }
    .nav-btn {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 50px;
    }
    .nav-btn[title="上一月"],
    .nav-btn[title="下一月"],
    .nav-btn[title="上一周"],
    .nav-btn[title="下一周"] {
        min-width: 30px;
        padding: 4px 6px;
    }
    .calendar-header-day {
        padding: 4px 1px;
        font-size: 9px;
    }
    .calendar-day {
        min-height: 40px;
        padding: 3px;
    }
    .day-number {
        font-size: 10px;
    }
    .event {
        font-size: 8px;
        padding: 2px 3px;
        min-height: 14px;
    }
}

/* 横屏适配 */
@media (max-height: 480px) and (orientation: landscape) {
    .calendar-day {
        min-height: 60px;
    }
    .modal-content {
        margin: 10% auto;
    }
}

/* 触摸反馈 */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .event,
    .btn {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    .nav-btn:active,
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* 头部导航样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}

#current-time {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 页脚样式 */
.footer {
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 20px 0;
    margin-top: 30px;
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-content span {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

.footer-content a {
    color: #2196f3;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-content a:hover {
    color: #1976d2;
    text-decoration: underline;
}

.beian-icon {
    width: 16px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .footer {
        padding: 15px 0;
        margin-top: 20px;
    }
    
    .footer-content {
        gap: 15px;
    }
    
    .footer-content span {
        font-size: 12px;
    }
    
    .beian-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 10px 0;
        margin-top: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-content span {
        font-size: 11px;
    }
    
    .beian-icon {
        width: 10px;
        height: 10px;
        margin-right: 3px;
    }
}



/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
