/* ================================================
   编辑器主题样式（editor-themes.css）
   —— 作用于 <div class="article theme-xxx"> 容器
   —— 编辑器内（TinyMCE content_style）和导出的 HTML 都用同一份
   ================================================ */

/* -------- 基础：所有主题共用的骨架 -------- */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 24px;
  line-height: 1.75;
  word-break: break-word;
}
.article > *:first-child { margin-top: 0; }
.article > *:last-child { margin-bottom: 0; }
.article h1, .article h2, .article h3, .article h4 {
  margin: 1.4em 0 0.6em;
  font-weight: 600;
  line-height: 1.4;
}
.article p { margin: 0 0 1em; }
.article a { text-decoration: none; }
.article ul, .article ol { padding-left: 1.5em; margin: 0.6em 0 1em; }
.article li { margin-bottom: 0.4em; }
.article blockquote {
  margin: 1em 0;
  padding: 0.4em 1em;
  border-left: 4px solid;
  border-radius: 0 6px 6px 0;
}
.article img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1em 0;
  display: block;
}
.article hr {
  border: 0;
  height: 1px;
  margin: 2em auto;
  width: 60%;
}
.article code {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SF Mono", Menlo, Monaco, "Courier New", monospace;
}
.article pre {
  padding: 1em;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9em;
  line-height: 1.6;
}
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95em;
}
.article th, .article td {
  padding: 8px 12px;
  border: 1px solid #e0e6ee;
  text-align: left;
}
.article th { font-weight: 600; }
.article strong { font-weight: 600; }
.article em { font-style: italic; }

/* ================================================
   主题 1：极简清新（minimal）
   —— 白底、灰字、蓝色标题、行距宽 —— 通用/科技/工具类
   ================================================ */
.article.theme-minimal {
  color: #333;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #ffffff;
}
.article.theme-minimal h1 { color: #1a1a1a; font-size: 26px; }
.article.theme-minimal h2 {
  color: #2c7be5;
  font-size: 20px;
  border-left: 4px solid #2c7be5;
  padding-left: 12px;
  line-height: 1.4;
}
.article.theme-minimal h3 { color: #2c7be5; font-size: 17px; }
.article.theme-minimal a { color: #2c7be5; border-bottom: 1px dashed #2c7be5; }
.article.theme-minimal blockquote {
  border-left-color: #cfe0f5;
  background: #f4f8fd;
  color: #556677;
}
.article.theme-minimal code {
  background: #eff3f8;
  color: #c7254e;
}
.article.theme-minimal pre {
  background: #2b2f3a;
  color: #eaeef3;
}
.article.theme-minimal hr { background: linear-gradient(90deg, transparent, #cfd6e0, transparent); }
.article.theme-minimal th { background: #f4f8fd; }

/* ================================================
   主题 2：文艺范（literary）
   —— 米白底、深棕字、宋体大标题 —— 读书/文学/生活
   ================================================ */
.article.theme-literary {
  color: #3f2f21;
  font-family: "Songti SC", "SimSun", Georgia, serif;
  background: #faf6ef;
}
.article.theme-literary h1 {
  color: #5b3a1e;
  font-size: 28px;
  text-align: center;
  letter-spacing: 3px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #c9b28c;
}
.article.theme-literary h2 {
  color: #7a5c3f;
  font-size: 20px;
  text-align: center;
  letter-spacing: 2px;
}
.article.theme-literary h2::before,
.article.theme-literary h2::after {
  content: "❋";
  margin: 0 12px;
  color: #c9b28c;
  font-weight: normal;
}
.article.theme-literary h3 { color: #7a5c3f; font-size: 17px; }
.article.theme-literary a { color: #7a5c3f; border-bottom: 1px solid #c9b28c; }
.article.theme-literary blockquote {
  border-left-color: #c9b28c;
  background: #f2e8d5;
  color: #6a4e2f;
  font-style: italic;
}
.article.theme-literary code {
  background: #eee2c9;
  color: #5b3a1e;
  font-family: Menlo, monospace;
}
.article.theme-literary pre {
  background: #3f2f21;
  color: #faf6ef;
  font-family: Menlo, monospace;
}
.article.theme-literary hr {
  height: auto;
  border: 0;
  text-align: center;
  color: #c9b28c;
}
.article.theme-literary hr::before {
  content: "· · ·";
  letter-spacing: 8px;
  font-size: 16px;
}
.article.theme-literary th { background: #f2e8d5; color: #5b3a1e; }

/* ================================================
   主题 3：商务专业（business）
   —— 深蓝头图色、正文分栏易读 —— 财经/报告/工作汇报
   ================================================ */
.article.theme-business {
  color: #253649;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #ffffff;
}
.article.theme-business h1 {
  color: #ffffff;
  font-size: 24px;
  background: linear-gradient(135deg, #1f3a68, #2c5aa0);
  padding: 18px 22px;
  border-radius: 8px;
  margin-top: 0;
}
.article.theme-business h2 {
  color: #1f3a68;
  font-size: 19px;
  padding-left: 12px;
  border-left: 5px solid #1f3a68;
  line-height: 1.4;
  background: linear-gradient(90deg, rgba(31, 58, 104, 0.06), transparent);
  padding-top: 6px;
  padding-bottom: 6px;
}
.article.theme-business h3 {
  color: #2c5aa0;
  font-size: 16px;
  padding-bottom: 4px;
  border-bottom: 1px solid #d0dcef;
}
.article.theme-business a { color: #2c5aa0; font-weight: 500; }
.article.theme-business a:hover { text-decoration: underline; }
.article.theme-business blockquote {
  border-left-color: #2c5aa0;
  background: #eef4fc;
  color: #253649;
  padding: 12px 16px;
  font-size: 0.95em;
}
.article.theme-business code {
  background: #eef4fc;
  color: #1f3a68;
  font-weight: 500;
}
.article.theme-business pre {
  background: #1f2937;
  color: #eef4fc;
}
.article.theme-business hr {
  background: #d0dcef;
  height: 2px;
  width: 100%;
}
.article.theme-business th { background: #1f3a68; color: #fff; border-color: #1f3a68; }
.article.theme-business td { border-color: #d0dcef; }
.article.theme-business strong { color: #1f3a68; }

/* ======== 4. 学术：黑白衬线，规整严谨（论文 / 报告） ======== */
.article.theme-academic {
  font-family: "Times New Roman", "Songti SC", "SimSun", Georgia, serif;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.9;
}
.article.theme-academic h1 {
  text-align: center;
  font-size: 24px;
  color: #000;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
  margin-bottom: 20px;
  letter-spacing: 2px;
}
.article.theme-academic h2 {
  font-size: 19px;
  color: #000;
  padding: 4px 0 4px 10px;
  border-left: 4px solid #333;
  margin-top: 1.4em;
}
.article.theme-academic h3 { font-size: 16px; color: #222; }
.article.theme-academic p { text-indent: 2em; text-align: justify; }
.article.theme-academic blockquote {
  border-left: 3px solid #999;
  background: transparent;
  color: #444;
  font-style: italic;
  padding: 4px 16px;
}
.article.theme-academic code { background: #f4f4f4; color: #333; font-family: "Consolas", monospace; }
.article.theme-academic pre  { background: #fafafa; border: 1px solid #ddd; color: #222; }
.article.theme-academic table { border: 1.5px solid #000; }
.article.theme-academic th, .article.theme-academic td { border: 1px solid #333; }
.article.theme-academic th { background: #f0f0f0; color: #000; }
.article.theme-academic a { color: #000; border-bottom: 1px solid #000; }

/* ======== 5. 科技：蓝紫渐变，未来感（技术博客 / 产品发布） ======== */
.article.theme-tech {
  font-family: -apple-system, "PingFang SC", "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 260px);
  color: #1a2340;
}
.article.theme-tech h1 {
  font-size: 26px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 0;
}
.article.theme-tech h2 {
  font-size: 19px;
  color: #4f46e5;
  padding: 6px 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(79,70,229,0.10), rgba(6,182,212,0.02));
  border-left: 4px solid #06b6d4;
}
.article.theme-tech h3 { color: #0e7490; font-size: 16px; }
.article.theme-tech a  { color: #4f46e5; }
.article.theme-tech blockquote {
  border-left: 4px solid #4f46e5;
  background: #eef2ff;
  color: #312e81;
  border-radius: 4px;
}
.article.theme-tech code {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.article.theme-tech pre {
  background: #0f172a;
  color: #a5b4fc;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(15,23,42,0.18);
}
.article.theme-tech th { background: linear-gradient(90deg, #4f46e5, #06b6d4); color: #fff; }
.article.theme-tech hr { background: linear-gradient(90deg, transparent, #4f46e5, transparent); }

/* ======== 6. 报刊：灰底 + 红点，新闻感（时评 / 专栏） ======== */
.article.theme-magazine {
  font-family: "Songti SC", "SimSun", "Times New Roman", serif;
  background: #fafaf7;
  color: #1a1a1a;
}
.article.theme-magazine h1 {
  font-size: 28px;
  color: #111;
  border-top: 3px double #c00;
  border-bottom: 3px double #c00;
  padding: 12px 0;
  text-align: center;
  letter-spacing: 6px;
  margin-top: 0;
}
.article.theme-magazine h2 {
  font-size: 20px;
  color: #c00;
  position: relative;
  padding-left: 22px;
  margin-top: 1.3em;
}
.article.theme-magazine h2::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 12px; height: 12px; background: #c00; border-radius: 50%;
  transform: translateY(-50%);
}
.article.theme-magazine h3 { color: #333; font-size: 17px; border-bottom: 1px dashed #999; padding-bottom: 4px; }
.article.theme-magazine p { text-indent: 2em; }
.article.theme-magazine blockquote {
  border-left: 4px solid #c00;
  background: #fff;
  color: #444;
  font-size: 0.95em;
  padding: 10px 14px;
}
.article.theme-magazine a { color: #c00; border-bottom: 1px solid #c00; }
.article.theme-magazine th { background: #333; color: #fff; }
.article.theme-magazine hr { background: repeating-linear-gradient(90deg, #c00 0, #c00 6px, transparent 6px, transparent 12px); height: 3px; }

/* ======== 7. 暗黑：深色护眼（夜间阅读 / 代码文档） ======== */
.article.theme-dark {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #1e1e28;
  color: #d4d4dc;
  padding: 24px 22px;
  border-radius: 8px;
}
.article.theme-dark h1 { color: #ffd479; font-size: 26px; border-bottom: 1px solid #3a3a44; padding-bottom: 8px; margin-top: 0; }
.article.theme-dark h2 { color: #6ec1e4; font-size: 20px; padding-left: 12px; border-left: 4px solid #6ec1e4; }
.article.theme-dark h3 { color: #b48ead; font-size: 17px; }
.article.theme-dark p, .article.theme-dark li { color: #d4d4dc; }
.article.theme-dark a  { color: #7fbfff; border-bottom: 1px dashed #7fbfff; }
.article.theme-dark blockquote {
  border-left: 4px solid #6ec1e4;
  background: #262635;
  color: #cfd6e0;
}
.article.theme-dark code {
  background: #2a2a3a; color: #ffcb6b; border: 1px solid #3a3a44;
}
.article.theme-dark pre { background: #14141c; color: #c3e88d; }
.article.theme-dark hr  { background: #3a3a44; }
.article.theme-dark th  { background: #2c2c3a; color: #ffd479; }
.article.theme-dark td  { border-color: #3a3a44; }
.article.theme-dark strong { color: #ffd479; }

/* ======== 8. 中式：宋体 + 朱印章，古典雅致（文学 / 传统文化） ======== */
.article.theme-chinese {
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  background: #f7f1e3;
  color: #3a2b1b;
  line-height: 2;
  padding: 30px 30px;
  border: 1px solid #d4b483;
  border-radius: 4px;
}
.article.theme-chinese h1 {
  text-align: center;
  font-size: 28px;
  color: #7b2d26;
  font-weight: 500;
  letter-spacing: 10px;
  border-bottom: 2px solid #7b2d26;
  padding-bottom: 10px;
  margin-top: 0;
}
.article.theme-chinese h2 {
  color: #7b2d26;
  font-size: 22px;
  text-align: center;
  position: relative;
  padding: 6px 0;
}
.article.theme-chinese h2::before,
.article.theme-chinese h2::after {
  content: "◆";
  color: #d4b483;
  margin: 0 12px;
  font-size: 12px;
  vertical-align: middle;
}
.article.theme-chinese h3 { color: #5c4b32; font-size: 18px; text-align: center; }
.article.theme-chinese p { text-indent: 2em; }
.article.theme-chinese blockquote {
  background: rgba(212, 180, 131, 0.15);
  border-left: 4px solid #d4b483;
  color: #5c4b32;
  font-style: normal;
}
.article.theme-chinese code { background: #efe5cf; color: #7b2d26; }
.article.theme-chinese pre  { background: #efe5cf; color: #3a2b1b; }
.article.theme-chinese a    { color: #7b2d26; border-bottom: 1px dashed #7b2d26; }
.article.theme-chinese hr   { background: repeating-linear-gradient(90deg, #d4b483 0, #d4b483 8px, transparent 8px, transparent 16px); height: 2px; }
.article.theme-chinese th   { background: #7b2d26; color: #f7f1e3; }

/* ======== 9. 温柔：粉樱柔和（生活 / 小红书 / 心情） ======== */
.article.theme-sakura {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #fff5f7 0%, #ffffff 300px);
  color: #4a2b3a;
  line-height: 1.85;
}
.article.theme-sakura h1 {
  font-size: 25px;
  color: #d64d6b;
  font-weight: 700;
  padding: 8px 14px;
  background: linear-gradient(90deg, #ffe4ec, transparent);
  border-radius: 20px 6px 20px 6px;
  margin-top: 0;
}
.article.theme-sakura h1::before { content: "🌸 "; }
.article.theme-sakura h2 {
  font-size: 19px;
  color: #b83a5a;
  padding-left: 14px;
  border-left: 5px solid #f6b8c8;
  border-radius: 3px;
}
.article.theme-sakura h2::before { content: "❁ "; color: #f6b8c8; }
.article.theme-sakura h3 { color: #d64d6b; font-size: 16px; }
.article.theme-sakura a  { color: #d64d6b; border-bottom: 1px dashed #d64d6b; }
.article.theme-sakura blockquote {
  border-left: 4px solid #f6b8c8;
  background: #fff5f7;
  color: #7a3e51;
  border-radius: 4px;
}
.article.theme-sakura code {
  background: #ffe4ec; color: #b83a5a; border: 1px solid #f6b8c8;
}
.article.theme-sakura pre  { background: #fff5f7; color: #7a3e51; border: 1px dashed #f6b8c8; }
.article.theme-sakura th   { background: linear-gradient(90deg, #d64d6b, #f6b8c8); color: #fff; }
.article.theme-sakura hr   { background: repeating-linear-gradient(90deg, #f6b8c8 0, #f6b8c8 6px, transparent 6px, transparent 12px); height: 2px; }
.article.theme-sakura strong { color: #d64d6b; }
