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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    margin-top: 15px;
}

nav button {
    padding: 8px 16px;
    margin-right: 10px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
}

section {
    display: none;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

section.active {
    display: block;
}

.add-project, .add-note {
    margin-bottom: 20px;
}

input, textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    height: 150px;
    resize: vertical;
}

button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* 项目和章节样式优化 */
.project-item {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.project-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 15px;
}

.project-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.project-header-left h3 {
    margin: 0;
    color: #2c3e50;
}

.project-progress {
    flex: 1;
    max-width: 200px;
}

.progress-bar {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

.project-buttons {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.project-buttons button {
    padding: 6px 12px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 添加图标 */
.project-buttons button::before {
    font-family: "Material Icons";
    font-size: 16px;
}

.add-chapter-btn::before {
    content: "add";
}

.delete-project-btn::before {
    content: "delete";
}

/* 折叠指示器样式 */
.collapse-indicator {
    cursor: pointer;
    padding: 5px;
    color: #666;
    transition: transform 0.3s ease;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.collapse-indicator:hover {
    background-color: #e0e0e0;
    color: #333;
}

.collapse-indicator.collapsed {
    transform: rotate(-90deg);
}

/* 章节列表默认收起 */
.chapter-list {
    display: none;
    margin-top: 15px;
    padding: 0 15px;
}

.chapter-list.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* 美化按钮样式 */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.action-button.primary {
    background-color: #4CAF50;
    color: white;
}

.action-button.danger {
    background-color: #f44336;
    color: white;
}

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

/* 自定义复选框样式 */
.checkbox-wrapper {
    margin: 0;
    display: flex;
    align-items: center;
}

.custom-checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.custom-checkbox input {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #4CAF50;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #4CAF50;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* 章节状态标签 */
.chapter-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    white-space: nowrap;
    text-align: center;
}

.status-completed {
    background-color: #e8f5e9;
    color: #4CAF50;
}

.status-pending {
    background-color: #fff3e0;
    color: #ff9800;
}

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

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-form input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin: 0;
}

.modal-form input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

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

/* 修改按钮样式 */
.action-button.secondary {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.action-button.secondary:hover {
    background-color: #e0e0e0;
}

/* 文件上传样式优化 */
#chaptersFile {
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    width: 100%;
    margin: 15px 0;
    cursor: pointer;
}

#chaptersFile:hover {
    border-color: #4CAF50;
}

/* JSON示例样式优化 */
.json-format-hint {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.json-format-hint pre {
    margin: 10px 0 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* 课程表样式 */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.refresh-btn {
    padding: 6px 12px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.refresh-btn:hover {
    background-color: #1976D2;
}

.time-slot {
    background-color: white;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid transparent;
}

.time-slot.empty {
    background-color: #f5f5f5;
    opacity: 0.7;
}

.time-info {
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-info h4 {
    color: #333;
    margin: 0;
}

.duration {
    color: #666;
    font-size: 0.9em;
}

.course-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.course-name {
    min-width: 150px;
}

.course-name h5 {
    margin: 0;
    color: #1976D2;
}

.course-name p {
    margin: 4px 0 0 0;
    color: #666;
}

.course-duration {
    white-space: nowrap;
}

.session-tag {
    white-space: nowrap;
}

.course-actions {
    margin-left: auto;
}

.no-course {
    color: #999;
    font-style: italic;
    margin: 0;
}

/* 修改课程表样式 */
.schedule-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.schedule-info p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

/* 为不同项目添加不同的颜色标识 */
.time-slot[data-project="1"]::before {
    background-color: #4CAF50;
}

.time-slot[data-project="2"]::before {
    background-color: #2196F3;
}

.time-slot[data-project="3"]::before {
    background-color: #FF9800;
}

/* 禁用的复选框样式 */
.custom-checkbox input:disabled ~ .checkmark {
    background-color: #e0e0e0;
    border-color: #bdbdbd;
    cursor: not-allowed;
}

/* 添加完成提示样式 */
.toast-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 1.7s;
    z-index: 1000;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 添加滑动开关按钮样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e0e0e0;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4CAF50;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 修改章节项样式 */
.chapter-item {
    display: flex;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 10px;
    background-color: #fff;
}

.chapter-content {
    flex: 1;
    margin-right: 15px;
}

.chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.chapter-title {
    display: flex;
    align-items: center;
}

.chapter-title h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1em;
}

.chapter-duration {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
}

.chapter-desc {
    color: #666;
    font-size: 0.9em;
    line-height: 1.5;
}

.chapter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 修改标签页样式 */
.add-chapter-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4CAF50;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: #4CAF50;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 添加大课和小课的样式区分 */
.time-slot.large {
    background-color: #f3f9ff;
    border-left: 4px solid #1976D2;
}

.time-slot.small {
    background-color: #f5f5f5;
    border-left: 4px solid #66BB6A;
}

.time-slot.large .time-info h4 {
    color: #1976D2;
    font-weight: 500;
}

.time-slot.small .time-info h4 {
    color: #43A047;
    font-weight: 500;
}

/* 时间槽的间距调整 */
.time-slot {
    margin-bottom: 15px;
}

.time-slot:not(:last-child) {
    margin-bottom: 20px;
}

/* 添加时间段分隔 */
.time-slot.large + .time-slot.large {
    margin-top: 30px;
}

/* 修改项目描述样式 */
.project-desc {
    padding: 15px;
    margin: 15px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.desc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.desc-title {
    font-weight: 500;
    color: #2c3e50;
}

.edit-desc-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-desc-btn:hover {
    background-color: #f0f0f0;
    color: #4CAF50;
}

.edit-desc-btn .material-icons {
    font-size: 18px;
}

.desc-content {
    color: #666;
    margin: 0;
    padding: 8px;
    min-height: 24px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
}

.desc-editor {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: inherit;
    color: #666;
    resize: vertical;
    background-color: #fff;
    white-space: pre-wrap;
    line-height: 1.5;
}

.desc-editor:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 章节容器样式 */
.chapters-container {
    margin-top: 20px;
}

/* 右侧内容区样式 */
.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.no-project-selected {
    text-align: center;
    color: #666;
    padding: 40px;
    font-size: 1.2em;
}

/* 添加淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 项目左右布局样式 */
.projects-container {
    display: flex;
    gap: 20px;
    height: calc(100vh - 150px);
}

.projects-sidebar {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.projects-sidebar h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
}

#projectsList {
    flex: 1;
    overflow-y: auto;
}

.projects-content {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-y: auto;
}

/* 项目列表项样式 */
.project-list-item {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.project-list-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.project-list-item.active {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

.project-list-item h3 {
    margin: 0;
    font-size: 1em;
    color: #2c3e50;
}

.project-list-item .progress-bar {
    margin-top: 8px;
}

/* 调整滚动条样式 */
.projects-content::-webkit-scrollbar {
    width: 8px;
}

.projects-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.projects-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.projects-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 添加响应式布局 */
@media screen and (max-width: 768px) {
    .projects-container {
        flex-direction: column;
        height: auto;
    }

    .projects-sidebar {
        width: 100%;
        height: auto;
        margin-bottom: 20px;
    }

    .projects-content {
        width: 100%;
        height: auto;
        min-height: 300px;
    }

    #projectsList {
        max-height: 300px;
        overflow-y: auto;
    }

    /* 调整项目列表项在手机上的样式 */
    .project-list-item {
        padding: 12px;
    }

    .project-list-item:hover {
        transform: none;
    }

    /* 调整项目详情在手机上的样式 */
    .project-detail-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .project-detail-buttons {
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .project-detail-buttons button {
        flex: 1;
    }
} 