/* ======================
课程交付平台 · 七杀主调
冷白 + 铁灰 + 暗锈红，直角，克制
====================== */

:root{
  --bg: #f2f3f5;
  --bg-panel: #ffffff;
  --ink: #1f242e;
  --ink-soft: #545b68;
  --line: #d8dade;
  --accent: #7a2e2e;
  --accent-soft: #a85c5c;
}

*{
  box-sizing: border-box;
}

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.8;
}

/* ---------- 顶部 ---------- */

header{
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .title{
  font-size: 16px;
  letter-spacing: 2px;
  font-weight: 600;
}

header .studentName{
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- 布局 ---------- */

.layout{
  display: flex;
  min-height: calc(100vh - 73px);
}

/* ---------- 左侧课时列表 ---------- */

#lessonList{
  width: 260px;
  border-right: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 20px 0;
}

.lessonItem{
  padding: 14px 24px;
  cursor: pointer;
  border-left: 3px solid transparent;
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lessonItem:hover{
  background: #f7f7f8;
}

.lessonItem.active{
  border-left-color: var(--accent);
  color: var(--ink);
  background: #f7f7f8;
  font-weight: 600;
}

.lessonDone{
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- 主内容区 ---------- */

#lessonContent{
  flex: 1;
  padding: 60px 80px;
  max-width: 820px;
}

#lessonTitle{
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 30px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 16px;
}

#lessonBody{
  font-size: 15px;
  white-space: pre-wrap;
  margin-bottom: 40px;
}

.fileLink{
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}

.fileLink:hover{
  background: var(--ink);
  color: var(--bg-panel);
}

/* ---------- 完成按钮 ---------- */

#completeBtn{
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  padding: 10px 24px;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 1px;
}

#completeBtn.done{
  background: var(--accent);
  color: white;
}

#completeBtn:hover{
  background: var(--accent);
  color: white;
}

/* ---------- 笔记区 ---------- */

#notesArea{
  margin-top: 50px;
  border-top: 1px solid var(--line);
  padding-top: 30px;
}

#notesArea h3{
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--ink-soft);
  margin-bottom: 14px;
  text-transform: uppercase;
}

#noteInput{
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: 16px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.8;
  resize: vertical;
}

#noteInput:focus{
  outline: none;
  border-color: var(--ink);
}

.saveStatus{
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
}

/* ---------- 登录页 ---------- */

#loginBox{
  max-width: 360px;
  margin: 120px auto;
  text-align: center;
}

#loginBox h1{
  font-size: 18px;
  letter-spacing: 3px;
  margin-bottom: 40px;
}

#tokenInput{
  width: 100%;
  padding: 14px;
  border: 1px solid var(--ink);
  background: var(--bg-panel);
  font-size: 14px;
  text-align: center;
  letter-spacing: 1px;
}

#enterBtn{
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  background: var(--ink);
  color: white;
  border: none;
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
}

#enterBtn:hover{
  background: var(--accent);
}

#loginError{
  margin-top: 16px;
  font-size: 13px;
  color: var(--accent);
  display: none;
}
