* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: #060913;
  color: #a5b4fc;
  font-family: Consolas, Monaco, "PingFang SC", "Microsoft YaHei", monospace;
  line-height: 1.7;
}
main { max-width: 760px; margin: 0 auto; padding: 0 16px 60px; }

/* 赛博朋克终端头部 */
.hero {
  background: linear-gradient(180deg, #090e1f 0%, #060913 100%);
  border-bottom: 1px solid #1e293b;
  padding: 40px 16px 30px;
  text-align: center;
  position: relative;
  margin-bottom: 24px;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, #00f2fe, transparent);
  box-shadow: 0 0 10px #00f2fe;
}
.cyber-title {
  font-size: 30px;
  color: #00f2fe;
  text-shadow: 0 0 15px rgba(0, 242, 254, 0.7);
  margin: 0 0 8px;
  font-weight: 900;
  letter-spacing: 3px;
}
.cyber-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
  font-family: monospace;
  letter-spacing: 1px;
}

/* 导航选项卡 */
.tabs {
  max-width: 760px; margin: 0 auto 25px; padding: 0 16px;
  display: flex; gap: 12px;
}
.tab {
  flex: 1; border: 1px solid #1e293b; cursor: pointer;
  background: #090e1a; color: #64748b; font-size: 13px;
  padding: 12px 0; border-radius: 4px; font-weight: bold;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  font-family: inherit;
  transition: all 0.25s ease;
}
.tab.active {
  background: #0b132b;
  border: 1px solid #00f2fe;
  color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.35), inset 0 0 5px rgba(0, 242, 254, 0.15);
  text-shadow: 0 0 5px rgba(0, 242, 254, 0.4);
}

/* 主面板卡片 */
.card {
  background: #080c16; border: 1px solid #1e293b; border-radius: 4px; padding: 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6); margin-bottom: 20px;
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: 15px; width: 40px; height: 3px;
  background: #00f2fe;
  box-shadow: 0 0 10px #00f2fe;
}
.label { display: block; font-weight: bold; font-size: 11px; color: #38bdf8; margin: 18px 0 8px; letter-spacing: 1px; }
.label:first-child { margin-top: 0; }

.input {
  width: 100%; background: #0b1120; border: 1px solid #1e293b; border-radius: 3px;
  padding: 12px 14px; font-size: 14px; outline: none; color: #e2e8f0;
  font-family: inherit;
  transition: all 0.2s ease;
}
.input:focus {
  border-color: #00f2fe;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.25);
}

/* 复习深度单选组 */
.depth-group {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.depth-card {
  flex: 1; background: #0b1120; border: 1px solid #1e293b; border-radius: 4px;
  padding: 12px; cursor: pointer; transition: all 0.25s ease; position: relative;
  overflow: hidden;
}
.depth-card:hover { border-color: #475569; }
.depth-card.active {
  border-color: #00f2fe;
  background: rgba(0, 242, 254, 0.02);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}
.depth-card.active::after {
  content: "✓"; position: absolute; right: 8px; top: 6px;
  color: #00f2fe; font-size: 11px; font-weight: bold;
}
.depth-title { font-size: 12px; font-weight: bold; color: #cbd5e1; margin-bottom: 4px; }
.depth-card.active .depth-title { color: #00f2fe; }
.depth-desc { font-size: 10px; color: #64748b; line-height: 1.3; }

/* 文件上传舱 */
.drop {
  border: 1px dashed #f472b6; background: rgba(244, 114, 182, 0.01); border-radius: 4px;
  padding: 36px 20px; text-align: center; color: #f472b6; cursor: pointer; font-size: 14px;
  text-shadow: 0 0 4px rgba(244,114,182,0.3); transition: all 0.25s ease;
}
.drop.over { background: rgba(244, 114, 182, 0.05); box-shadow: 0 0 12px rgba(244, 114, 182, 0.2); }
.drop-sub { color: #64748b; font-size: 11px; margin-top: 6px; }

.file-list { list-style: none; margin-top: 10px; }
.file-list li {
  display: flex; align-items: center; gap: 10px;
  background: #0d1527; border: 1px solid #1e293b; border-radius: 3px;
  padding: 8px 12px; margin-bottom: 8px; font-size: 12px;
}
.file-list .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e2e8f0; }
.file-list .rm { cursor: pointer; color: #ef4444; border: none; background: none; font-size: 14px; padding: 0 4px; }

/* 赛博功能按钮 */
.btn-primary {
  display: block; width: 100%; margin-top: 18px;
  background: transparent; color: #00f2fe;
  border: 1px solid #00f2fe; border-radius: 4px; padding: 14px 0;
  font-size: 14px; font-weight: bold; cursor: pointer;
  letter-spacing: 1.5px; text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
  box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.1);
  transition: all 0.25s ease;
  font-family: inherit;
}
.btn-primary:hover:not(:disabled) {
  background: #00f2fe; color: #060913;
  box-shadow: 0 0 18px rgba(0, 242, 254, 0.6); text-shadow: none;
}
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary.small { display: inline-block; width: auto; padding: 6px 16px; font-size: 12px; margin: 0; }

.btn-ghost {
  background: #0d1527; color: #38bdf8; border: 1px solid #1e293b;
  border-radius: 4px; padding: 6px 14px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.btn-ghost:hover { border-color: #38bdf8; box-shadow: 0 0 8px rgba(56, 189, 248, 0.2); }
.btn-danger {
  background: rgba(239, 68, 68, 0.05); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 4px; padding: 6px 14px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.btn-danger:hover { border-color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.25); }
.hint { font-size: 11px; color: #64748b; margin-top: 14px; text-align: center; line-height: 1.5; }

/* 进度指示 */
.progress { text-align: center; padding: 34px 22px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border: 3px solid #0d1527; border-top-color: #00f2fe;
  border-radius: 50%; animation: spin .9s linear infinite;
  box-shadow: 0 0 8px rgba(0,242,254,0.15);
}
@keyframes spin { to { transform: rotate(360deg); } }
.step-now { color: #00f2fe; font-weight: 600; margin-bottom: 14px; text-shadow: 0 0 4px rgba(0,242,254,0.3); }
.step-log { list-style: none; text-align: left; font-size: 13px; color: #64748b; }
.step-log li::before { content: "✓ "; color: #22C55E; }

/* 笔记列表卡片 */
.note-card { cursor: pointer; transition: all 0.2s ease; }
.note-card:hover { border-color: #00f2fe; box-shadow: 0 0 12px rgba(0, 242, 254, 0.2); }
.note-card .subj {
  display: inline-block; font-size: 11px; color: #00f2fe;
  background: rgba(0, 242, 254, 0.08); padding: 2px 8px; border-radius: 3px;
  border: 1px solid rgba(0, 242, 254, 0.15);
}
.note-card h3 { font-size: 16px; margin: 8px 0 4px; color: #cbd5e1; }
.note-card .meta { font-size: 12px; color: #64748b; }

/* 资料共享库 */
.lib-subj { cursor: pointer; transition: all 0.2s ease; }
.lib-subj:hover { border-color: #00f2fe; }
.lib-subj .head { display: flex; align-items: center; }
.lib-subj .head h3 { flex: 1; font-size: 15px; color: #cbd5e1; }
.lib-subj .head .meta { font-size: 11px; color: #64748b; margin-right: 8px; }
.lib-files { border-top: 1px dashed #1e293b; margin-top: 12px; padding-top: 8px; }
.lib-file {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 13px; cursor: pointer; color: #94a3b8;
}
.lib-file:hover { color: #00f2fe; }
.lib-file .meta { font-size: 11px; color: #475569; }

/* 笔记阅读与衍生练习交互 */
.reader-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 8px;
}
.reader-actions { display: flex; gap: 8px; }

.note-body { font-size: 14px; color: #cbd5e1; }
.note-body h1 { font-size: 20px; text-align: center; margin: 16px 0; color: #e2e8f0; }
.note-body h2 {
  font-size: 16px; color: #38bdf8; margin: 24px 0 12px;
  border-left: 4px solid #38bdf8; padding-left: 10px;
}
.note-body h3 { font-size: 14px; margin: 18px 0 8px; color: #cbd5e1; }
.note-body p { margin: 10px 0; line-height: 1.6; }
.note-body ul { padding-left: 20px; margin: 8px 0; }
.note-body blockquote {
  background: #0d1527; border-left: 4px solid #38bdf8;
  padding: 10px 14px; border-radius: 4px; margin: 12px 0;
  font-size: 13px; color: #94a3b8;
}
.note-body code {
  font-family: monospace; background: #0d1527; border: 1px solid #1e293b;
  padding: 1px 5px; border-radius: 3px; color: #f472b6; font-size: 13px;
}
.note-body pre {
  font-family: monospace; background: #070a13; border: 1px solid #1e293b;
  padding: 14px; border-radius: 4px; margin: 12px 0;
  font-size: 12px; overflow-x: auto; color: #94a3b8;
}
.note-body table { border-collapse: collapse; width: 100%; margin: 12px 0; border: 1px solid #1e293b; }
.note-body th, .note-body td {
  border: 1px solid #1e293b; padding: 8px 10px;
  font-size: 12px; text-align: center;
}
.note-body th { background: #0d1527; color: #38bdf8; }
.note-body hr { border: none; border-top: 1px solid #1e293b; margin: 22px 0; }
/* LaTeX公式反色处理适配暗黑底色 */
.note-body img { filter: invert(1) hue-rotate(180deg); max-width: 100%; }

/* 衍生习题卡片样式 */
.derive-container {
  margin: 18px 0;
}
.derive-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(168, 85, 247, 0.08); border: 1px solid #a855f7;
  color: #d8b4fe; padding: 8px 16px; font-size: 12px; font-weight: bold;
  cursor: pointer; border-radius: 4px; transition: all 0.25s ease;
  text-shadow: 0 0 4px rgba(168, 85, 247, 0.4); font-family: inherit;
}
.derive-btn:hover {
  background: #a855f7; color: #060913;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5); text-shadow: none;
}
.practice-box {
  margin-top: 12px; background: #0f162a; border: 1px solid #a855f7;
  border-radius: 4px; padding: 16px; box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
  animation: slideDown 0.25s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.practice-title { font-size: 12px; color: #e879f9; margin-bottom: 8px; font-weight: bold; }
.practice-question { font-size: 13px; color: #f1f5f9; line-height: 1.6; margin-bottom: 12px; }
.practice-textarea {
  width: 100%; height: 80px; background: #070a13; border: 1px solid #334155;
  color: #e2e8f0; padding: 10px; font-size: 13px; outline: none; box-sizing: border-box;
  resize: vertical; margin-bottom: 12px; font-family: inherit; border-radius: 3px;
}
.practice-textarea:focus { border-color: #a855f7; }
.action-group { display: flex; gap: 10px; }
.action-btn {
  flex: 1; background: transparent; border: 1px solid #475569;
  color: #94a3b8; padding: 8px 0; font-size: 12px; cursor: pointer;
  font-family: inherit; font-weight: bold; border-radius: 3px; transition: all 0.2s ease;
}
.action-btn.primary { border-color: #a855f7; color: #d8b4fe; }
.action-btn.primary:hover { background: rgba(168, 85, 247, 0.1); }
.action-btn.secondary:hover { background: rgba(100, 116, 139, 0.08); }
.solution-box {
  margin-top: 14px; border-top: 1px dashed #334155; padding-top: 12px;
  font-size: 13px; color: #94a3b8; line-height: 1.6;
}

.empty { text-align: center; color: #475569; padding: 60px 20px; font-size: 13px; }
.hidden { display: none !important; }
.foot {
  margin-top: auto; text-align: center; color: #475569; font-size: 11px;
  padding: 24px; border-top: 1px solid #0f172a; background: #05070f;
  letter-spacing: 1px;
}

/* 美化滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #060913; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #00f2fe; }
