/* 基本样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

.dashboard-layout {
    display: flex;
    width: 100%;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    text-align: center;
    margin-top: 0;
    color: #007bff;
}

/* 备忘录预览区样式 */
.memo-preview {
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fdfdfd;
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 15px;
}
/* 优化markdown渲染样式 */
.memo-preview h1, .memo-preview h2, .memo-preview h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.memo-preview ul, .memo-preview ol {
    padding-left: 20px;
}
.memo-preview blockquote {
    border-left: 3px solid #ccc;
    padding-left: 10px;
    color: #666;
    margin-left: 0;
}
.memo-preview code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 3px;
}


/* 主内容区样式 */
.main-content {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 课表网格样式 */
#timetable-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1px;
    background-color: #e0e0e0;
    padding: 1px;
    flex-grow: 1;
}

.grid-header, .time-slot, .course-cell {
    background-color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.time-slot {
    font-size: 12px;
}

.course-cell {
    min-height: 80px;
    position: relative;
    padding: 0;
    border: 1px solid #f0f0f0;
}

.course-item {
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.2s;
}

.course-item:hover {
    filter: brightness(1.1);
}

.course-item strong {
    display: block;
    margin-bottom: 4px;
}
