/* ===== FriendLink 样式（蓝绿色 / 卡片式 / 适配 1366×768） ===== */
:root {
  --primary: #0ea5a4;
  --primary-dark: #0d7d76;
  --primary-light: #5fd3d0;
  --accent: #f59e0b;
  --bg: #eef7f6;
  --card: #ffffff;
  --text: #1f3a3a;
  --text-light: #5b7170;
  --border: #d4e8e6;
  --danger: #e23b3b;
  --warn: #d97706;
  --success: #16a34a;
  --shadow: 0 2px 10px rgba(13, 125, 118, 0.10);
  --shadow-lg: 0 6px 24px rgba(13, 125, 118, 0.16);
  --radius: 14px;
}

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

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 顶部导航 ===== */
.navbar {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.navbar .brand { font-size: 20px; font-weight: 700; letter-spacing: 0.5px; }
.navbar .brand span { opacity: 0.85; font-weight: 400; font-size: 14px; margin-left: 8px; }
.navbar .nav-links a { color: #e6fbfa; margin-left: 18px; font-size: 14px; }
.navbar .nav-links a:hover { color: #fff; }

/* ===== 首页 ===== */
.hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: center;
}
.hero h1 { font-size: 34px; color: var(--primary-dark); margin-bottom: 6px; }
.hero-subtitle { font-size: 16px; color: var(--text-light); margin-bottom: 18px; letter-spacing: 1px; }
.hero .tagline {
  font-size: 17px;
  color: var(--text-light);
  max-width: 680px;
  margin: 0 auto 26px;
  line-height: 1.8;
}

/* 教学闭环流程 */
.loop-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 auto 34px;
  max-width: 1000px;
}
.loop-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 104px;
  box-shadow: var(--shadow);
}
.loop-step .ls-icon { font-size: 22px; margin-bottom: 4px; }
.loop-step .ls-label { font-size: 13px; font-weight: 600; color: var(--primary-dark); }
.loop-arrow { color: var(--primary-light); font-size: 20px; font-weight: 700; padding: 0 2px; }
.hero-note {
  margin: 30px auto 0;
  max-width: 720px;
  font-size: 14.5px;
  color: var(--text);
  background: #e6fbfa;
  border: 1px solid var(--primary-light);
  border-radius: 10px;
  padding: 14px 20px;
  line-height: 1.7;
}
.entry-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.entry-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 34px 30px;
  width: 320px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
}
.entry-card:hover { transform: translateY(-4px); }
.entry-card .icon { font-size: 46px; margin-bottom: 14px; }
.entry-card h2 { color: var(--primary-dark); margin-bottom: 10px; font-size: 22px; }
.entry-card p { color: var(--text-light); margin-bottom: 22px; font-size: 14px; min-height: 60px; }
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 11px 26px;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #fff; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn.secondary:hover { background: var(--bg); }
.btn:disabled { background: #9cc4c2; cursor: not-allowed; }
.btn.small { padding: 7px 16px; font-size: 13px; }

.features {
  max-width: 960px;
  margin: 40px auto 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 24px;
}
.feature {
  background: var(--card);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.feature .ficon { font-size: 26px; margin-bottom: 8px; }
.feature h3 { color: var(--primary-dark); font-size: 15px; margin-bottom: 6px; }
.feature p { font-size: 12.5px; color: var(--text-light); }

/* ===== 通用容器 ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 22px 24px 48px; }

/* ===== 标签页（学生端） ===== */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--card);
  padding: 8px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 12px 10px;
  text-align: center;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  transition: all 0.15s;
  font-size: 14.5px;
}
.tab:hover { background: var(--bg); color: var(--primary-dark); }
.tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.tab .step { display: block; font-size: 11px; opacity: 0.8; font-weight: 400; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== 卡片 / 表单 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.card h2 { color: var(--primary-dark); font-size: 18px; margin-bottom: 6px; }
.card .sub { color: var(--text-light); font-size: 13px; margin-bottom: 16px; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-row label .hint { font-weight: 400; color: var(--text-light); font-size: 12.5px; }
input[type="text"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfdfd;
  color: var(--text);
}
input[type="text"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.12);
}
textarea { resize: vertical; min-height: 96px; }
.task-options { display: flex; gap: 8px; flex-wrap: wrap; }
.task-options label {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 400;
  font-size: 13.5px;
}
.task-options input { display: none; }
.task-options label:hover { border-color: var(--primary-light); }
.task-options input:checked + span { color: var(--primary-dark); font-weight: 700; }
.task-options label:has(input:checked) { border-color: var(--primary); background: #e6fbfa; }
.word-count { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }
.word-count.warn { color: var(--warn); font-weight: 600; }

.form-actions { display: flex; gap: 10px; margin-top: 8px; align-items: center; }

/* ===== 状态提示 ===== */
.status {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 14px 0;
  font-size: 14px;
  display: none;
}
.status.show { display: block; }
.status.loading { background: #e6fbfa; color: var(--primary-dark); border: 1px solid var(--primary-light); }
.status.success { background: #e8f8ee; color: var(--success); border: 1px solid #9ad8ab; }
.status.error { background: #fdecec; color: var(--danger); border: 1px solid #f3b4b4; }
.status.warn { background: #fff5e6; color: var(--warn); border: 1px solid #f3cf9a; }
.status.empty { background: #f4f7f7; color: var(--text-light); border: 1px dashed var(--border); }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 结果区 ===== */
.result { margin-top: 18px; }
.result-section { margin-bottom: 16px; }
.result-section h3 {
  font-size: 14px; color: var(--primary-dark);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 2px solid var(--bg);
}
.evidence-box {
  background: #f4faf9;
  border-left: 4px solid var(--primary);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 6px 0;
  font-size: 13.5px;
}
.evidence-box .src { color: var(--text-light); font-style: italic; }

/* 五类标签 */
.labels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 10px 0; }
.label-chip {
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  border: 2px solid var(--border);
  background: #fbfdfd;
}
.label-chip.found { border-color: var(--warn); background: #fff5e6; }
.label-chip.ok { border-color: var(--success); background: #e8f8ee; }
.label-chip .code { font-weight: 700; font-size: 15px; color: var(--primary-dark); }
.label-chip.found .code { color: var(--warn); }
.label-chip .desc { font-size: 11.5px; color: var(--text-light); margin-top: 3px; }
.label-chip .state { font-size: 11px; margin-top: 4px; font-weight: 600; }

/* 三级支架 */
.scaffold-list { display: flex; flex-direction: column; gap: 10px; }
.scaffold-item {
  background: #f4faf9;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary-light);
  border-radius: 8px;
  padding: 12px 14px;
}
.scaffold-item .lvl { font-weight: 700; color: var(--primary-dark); font-size: 13px; }
.scaffold-item .lvl .num { background: var(--primary); color: #fff; border-radius: 50%; width: 20px; height: 20px; display: inline-block; text-align: center; line-height: 20px; font-size: 12px; margin-right: 6px; }

/* 评分 */
.score-overall {
  display: flex; align-items: center; gap: 20px;
  background: linear-gradient(120deg, #e6fbfa, #f4faf9);
  padding: 18px 22px; border-radius: 12px; margin-bottom: 14px;
}
.score-overall .total { font-size: 42px; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.score-overall .total small { font-size: 16px; color: var(--text-light); font-weight: 500; }
.score-overall .meta { font-size: 13px; color: var(--text-light); }
.score-bars { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.score-bar { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.score-bar .name { width: 90px; color: var(--text-light); }
.score-bar .track { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.score-bar .fill { height: 100%; background: var(--primary); border-radius: 4px; }
.score-bar .val { width: 44px; text-align: right; font-weight: 600; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600;
}
.badge.review { background: #fdecec; color: var(--danger); }
.badge.ok { background: #e8f8ee; color: var(--success); }
.badge.warn { background: #fff5e6; color: var(--warn); }
.badge.info { background: #e6fbfa; color: var(--primary-dark); }

/* 自检清单 */
.checklist { list-style: none; }
.checklist li { padding: 5px 0 5px 24px; position: relative; font-size: 13.5px; }
.checklist li:before { content: "☐"; position: absolute; left: 0; color: var(--primary); }

/* 修改前后对比 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare .col { background: #f4faf9; border-radius: 8px; padding: 12px 14px; border: 1px solid var(--border); }
.compare .col h4 { font-size: 13px; color: var(--primary-dark); margin-bottom: 6px; }
.compare .col.revised { background: #e8f8ee; border-color: #9ad8ab; }

/* ===== 教师看板 ===== */
.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; flex-wrap: wrap; gap: 12px;
}
.dash-header h1 { color: var(--primary-dark); font-size: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--card); border-radius: 12px; padding: 16px 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--primary-dark); }
.stat-card .lbl { font-size: 12.5px; color: var(--text-light); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }

.issue-item {
  background: #f4faf9; border-radius: 8px; padding: 12px 14px;
  border: 1px solid var(--border); border-left: 4px solid var(--warn); margin-bottom: 10px;
}
.issue-item .rank { background: var(--warn); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-block; text-align: center; line-height: 22px; font-size: 12px; font-weight: 700; margin-right: 8px; }
.issue-item .title { font-weight: 700; color: var(--text); }
.issue-item .meta { font-size: 12.5px; color: var(--text-light); margin-top: 4px; }
.issue-item .ev { font-size: 12.5px; color: var(--text); background: #fff; padding: 5px 8px; border-radius: 5px; margin-top: 6px; border: 1px dashed var(--border); }

.group-card { background: #f4faf9; border-radius: 8px; padding: 14px; border: 1px solid var(--border); }
.group-card h4 { color: var(--primary-dark); font-size: 14px; margin-bottom: 6px; }
.group-card .support { font-size: 12.5px; color: var(--text-light); margin-bottom: 8px; }
.group-card .pills span { display: inline-block; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 2px 10px; font-size: 12px; margin: 2px 4px 2px 0; }

.review-item { background: #fdecec; border-radius: 8px; padding: 10px 12px; border: 1px solid #f3b4b4; margin-bottom: 8px; font-size: 13px; }
.review-item .head { font-weight: 700; color: var(--danger); }
.review-item .desc { color: var(--text); margin-top: 3px; }

/* 空状态 */
.empty-state { text-align: center; padding: 30px; color: var(--text-light); }
.empty-state .icon { font-size: 38px; margin-bottom: 8px; }

/* 隐私风险框 */
.privacy-box { background: #fdecec; border: 2px solid var(--danger); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.privacy-box .head { color: var(--danger); font-weight: 700; margin-bottom: 6px; }
.privacy-box ul { margin: 6px 0 0 18px; font-size: 13px; }

.footer { text-align: center; color: var(--text-light); font-size: 12px; padding: 20px; }

@media (max-width: 900px) {
  .features, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .compare { grid-template-columns: 1fr; }
  .labels { grid-template-columns: repeat(2, 1fr); }
  .loop-arrow { display: none; }
  .loop-flow { gap: 8px; }
}

/* ===== 学生端步骤头 ===== */
.steps-header {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 20px;
}
.step-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow);
}
.step-item:hover { border-color: var(--primary-light); }
.step-item.active {
  border-color: var(--primary);
  background: linear-gradient(120deg, #e6fbfa, #f4faf9);
  box-shadow: 0 4px 14px rgba(14,165,164,0.18);
}
.step-item .step-num {
  width: 30px; height: 30px; flex: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-light);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.step-item.active .step-num { background: var(--primary); color: #fff; }
.step-item .step-text .t1 { font-weight: 700; font-size: 15px; color: var(--text); }
.step-item .step-text .t2 { font-size: 12px; color: var(--text-light); }
.step-item.active .step-text .t1 { color: var(--primary-dark); }

/* ===== 渐进式支架 ===== */
.attempt-show {
  background: #f4faf9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
  font-size: 13.5px;
}
.attempt-show .lbl { color: var(--text-light); font-weight: 600; margin-right: 6px; }
.diag-basis {
  background: #e6fbfa;
  border: 1px solid var(--primary-light);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--primary-dark);
}
.scaffold-reveal { margin-bottom: 10px; }
.next-level-btn {
  margin-top: 10px;
  background: #fff;
  color: var(--primary-dark);
  border: 1.5px dashed var(--primary);
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.next-level-btn:hover { background: #e6fbfa; }
.next-level-btn:disabled { color: #9cc4c2; border-color: var(--border); cursor: not-allowed; }
.scaffold-tip { font-size: 12.5px; color: var(--text-light); margin-top: 6px; }

/* 标签柔和状态 */
.label-chip.review { border-color: var(--danger); background: #fdecec; }
.label-chip.review .code { color: var(--danger); }
.label-chip .state.good { color: var(--success); }
.label-chip .state.watch { color: var(--warn); }
.label-chip .state.review { color: var(--danger); }

/* ===== 修改稿对比 ===== */
.compare-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.delta-badge {
  font-size: 18px; font-weight: 800;
  padding: 4px 12px; border-radius: 20px;
}
.delta-badge.up { background: #e8f8ee; color: var(--success); }
.delta-badge.down { background: #fdecec; color: var(--danger); }
.delta-badge.same { background: #f4f7f7; color: var(--text-light); }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.compare-col { background: #f4faf9; border-radius: 8px; padding: 12px 14px; border: 1px solid var(--border); font-size: 13px; }
.compare-col.revised { background: #e8f8ee; border-color: #9ad8ab; }
.compare-col h4 { font-size: 13px; color: var(--primary-dark); margin-bottom: 6px; display: flex; justify-content: space-between; }
.compare-col .essay { color: var(--text); line-height: 1.6; max-height: 120px; overflow: auto; }
.improve-list, .remain-list { margin-top: 8px; }
.improve-list .item, .remain-list .item {
  padding: 6px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 13px;
}
.improve-list .item { background: #e8f8ee; border-left: 3px solid var(--success); }
.remain-list .item { background: #fff5e6; border-left: 3px solid var(--warn); }

/* ===== 教师端复核详情 ===== */
.review-item .rv-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 5px; font-size: 12.5px; color: var(--text-light); }
.review-item .rv-snippet {
  background: #fff; border: 1px dashed var(--border);
  border-radius: 5px; padding: 5px 8px; margin-top: 6px;
  font-size: 12.5px; color: var(--text);
}
.review-item .rv-status { display: inline-block; background: #fdecec; color: var(--danger); border-radius: 10px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; }
.dash-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn.danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn.danger:hover { background: #fdecec; }
.section-title { color: var(--primary-dark); font-size: 18px; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.section-title .num { background: var(--primary); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.issue-item .task { font-size: 12.5px; color: var(--text); background: #e6fbfa; padding: 5px 8px; border-radius: 5px; margin-top: 6px; border: 1px solid var(--primary-light); }

/* ===== 语音输入 ===== */
.voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.btn-voice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-voice:hover:not(:disabled) {
  background: #e6fbfa;
  border-color: var(--primary);
}
.btn-voice.recording {
  background: #fdecec;
  color: var(--danger);
  border-color: var(--danger);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
.btn-voice:disabled {
  background: #f4f7f7;
  color: #9ca3a3;
  border-color: var(--border);
  cursor: not-allowed;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(226, 59, 59, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(226, 59, 59, 0); }
}
.voice-status {
  font-size: 12.5px;
  color: var(--text-light);
  line-height: 1.4;
}
.voice-status.warn {
  color: var(--warn);
  font-weight: 600;
}
.voice-status.error {
  color: var(--danger);
}
.voice-status.interim {
  color: var(--primary-dark);
  font-style: italic;
}

