* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 300;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e74c3c;
    color: white;
}

.btn-secondary:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.schedule-container {
    padding: 30px;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #e0e0e0;
    padding: 15px;
    text-align: center;
    vertical-align: middle;
}

.schedule-table th {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.schedule-table th:first-child {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.schedule-table td {
    height: 80px;
    position: relative;
    transition: all 0.3s ease;
}

.schedule-table td:hover {
    background: #f8f9fa;
    transform: scale(1.02);
}

.course-cell {
    border-radius: 8px;
    padding: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.course-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.course-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.course-details {
    font-size: 12px;
    opacity: 0.9;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

.modal h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    text-align: center;
    font-weight: 300;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .schedule-container {
        padding: 15px;
    }
    
    .schedule-table th,
    .schedule-table td {
        padding: 8px;
        font-size: 14px;
    }
    
    .course-name {
        font-size: 12px;
    }
    
    .course-details {
        font-size: 10px;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}

/* 空单元格样式 */
.empty-cell {
    background: #f8f9fa;
    color: #bdc3c7;
}

.empty-cell:hover {
    background: #ecf0f1;
}

/* 页脚样式 */
.footer {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

.footer p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
    font-weight: 300;
}
