/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #4a5568;
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-container input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

/* 筛选器样式 */
.filters {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* 视图切换按钮 */
.view-toggle {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    justify-content: center;
}

.view-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.view-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 周次标签页 */
.week-tabs {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.week-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 日历视图样式 */
.calendar-view {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 2px;
    margin-bottom: 10px;
}

.calendar-day-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    border-radius: 10px 10px 0 0;
}

.calendar-body {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 2px;
}

.time-slot {
    background: #f8fafc;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    border-right: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.calendar-cell {
    background: white;
    border: 1px solid #e2e8f0;
    min-height: 80px;
    padding: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.calendar-cell:hover {
    background: #f7fafc;
}

.calendar-cell.has-course {
    background: linear-gradient(135deg, #e6f3ff, #f0f8ff);
    border-color: #667eea;
}

.course-event {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.course-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.course-event-title {
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.2;
}

.course-event-time {
    font-size: 11px;
    opacity: 0.9;
}

.course-event-location {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
}

/* 时间槽样式 */
.time-slot.morning {
    background: linear-gradient(135deg, #fff5e6, #ffeaa7);
    color: #d63031;
}

.time-slot.afternoon {
    background: linear-gradient(135deg, #e3f2fd, #81d4fa);
    color: #1976d2;
}

.time-slot.evening {
    background: linear-gradient(135deg, #f3e5f5, #ce93d8);
    color: #7b1fa2;
}

/* 课程网格 */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 课程卡片 */
.course-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    line-height: 1.4;
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4a5568;
}

.info-item i {
    width: 16px;
    color: #667eea;
    text-align: center;
}

.info-item strong {
    color: #2d3748;
    font-weight: 600;
}

.course-time {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 15px;
    border-radius: 12px;
    margin-top: 15px;
    font-weight: 600;
    text-align: center;
}

.course-location {
    background: #f7fafc;
    color: #4a5568;
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
    border-left: 4px solid #667eea;
}

/* 课程详情弹窗 */
.course-details {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.details-header {
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
}

.details-header h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    background: #f7fafc;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.details-content {
    background: white;
    border-radius: 0 0 20px 20px;
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h4 i {
    color: #667eea;
}

.detail-section p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 8px;
}

.detail-section ul {
    list-style: none;
    padding-left: 0;
}

.detail-section li {
    color: #4a5568;
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.detail-section li::before {
    content: "•";
    color: #667eea;
    position: absolute;
    left: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .filter-group select {
        min-width: auto;
    }
    
    .view-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .view-btn {
        justify-content: center;
    }
    
    .calendar-header {
        grid-template-columns: 80px 1fr 1fr;
    }
    
    .calendar-body {
        grid-template-columns: 80px 1fr 1fr;
    }
    
    .time-slot {
        padding: 10px 5px;
        font-size: 12px;
    }
    
    .calendar-cell {
        min-height: 60px;
        padding: 4px;
    }
    
    .course-event {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .course-event-title {
        font-size: 11px;
    }
    
    .course-event-time {
        font-size: 9px;
    }
    
    .course-event-location {
        font-size: 8px;
    }
    
    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .course-card {
        padding: 20px;
    }
    
    .course-title {
        font-size: 1.2rem;
    }
    
    .week-tabs {
        padding: 10px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .course-details {
        padding: 10px;
    }
    
    .details-header,
    .details-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .search-container input {
        padding: 12px 45px 12px 15px;
        font-size: 14px;
    }
    
    .calendar-header {
        grid-template-columns: 60px 1fr 1fr;
    }
    
    .calendar-body {
        grid-template-columns: 60px 1fr 1fr;
    }
    
    .time-slot {
        padding: 8px 3px;
        font-size: 10px;
    }
    
    .calendar-cell {
        min-height: 50px;
        padding: 2px;
    }
    
    .course-event {
        padding: 3px 4px;
        font-size: 9px;
    }
    
    .course-event-title {
        font-size: 10px;
    }
    
    .course-event-time {
        font-size: 8px;
    }
    
    .course-event-location {
        font-size: 7px;
    }
    
    .course-card {
        padding: 15px;
    }
    
    .course-title {
        font-size: 1.1rem;
    }
    
    .info-item {
        font-size: 13px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.course-card {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动条样式 */
.details-content::-webkit-scrollbar {
    width: 6px;
}

.details-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.details-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.details-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
