:root {
  --red: #1a9ad8;
  --red-dark: #0b6fa8;
  --ink: #163044;
  --muted: #5c7386;
  --line: #d4e6f2;
  --paper: #f2f8fc;
  --card: #ffffff;
  --gold: #0e7eb8;
  --shadow: 0 10px 30px rgba(12, 90, 140, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: #eaf6fd;
  background-image: url("../assets/img/site-bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.topbar {
  background: var(--red-dark);
  color: #e8f6fd;
  font-size: 13px;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; min-height: 34px; align-items: center; }
.topbar a:hover { color: #fff; }

.header {
  position: relative;
  overflow: hidden;
  background-color: #7ec8ef;
  background-image: url("../assets/img/site-bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}
.brand { display: flex; align-items: center; gap: 14px; padding: 18px 0 14px; }
.seal {
  width: 58px; height: 58px; flex: none;
  border: 2px solid var(--red);
  color: var(--red);
  display: grid; place-items: center;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-weight: 700; line-height: 1.05; letter-spacing: 1px; text-align: center;
}
.brand-logo { display: flex; align-items: center; position: relative; z-index: 1; min-height: 211px; padding: 16px 0 18px; }
.brand-logo img { height: 187px; width: auto; max-width: min(768px, 100%); object-fit: contain; filter: drop-shadow(0 1px 0 rgba(255,255,255,.85)); }
.sky-fire { position: absolute; inset: 0 0 0 42%; pointer-events: none; }
.sky-fire i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: #fff;
  box-shadow:
    0 -26px 0 -1px #fff, 0 26px 0 -1px #fff,
    26px 0 0 -1px #ffe7a8, -26px 0 0 -1px #fff,
    18px -18px 0 -1px #fff, -18px 18px 0 -1px #ffe7a8,
    18px 18px 0 -1px #fff, -18px -18px 0 -1px #fff,
    0 0 14px 3px rgba(255, 244, 214, 0.95);
  animation: burst 3.4s ease-out infinite;
}
.sky-fire i:nth-child(1) { top: 26%; right: 16%; }
.sky-fire i:nth-child(2) { top: 62%; right: 34%; animation-delay: 1.1s; scale: 0.72; }
.sky-fire i:nth-child(3) { top: 18%; right: 46%; animation-delay: 1.9s; scale: 0.55; }
.sky-fire i:nth-child(4) { top: 48%; right: 8%; animation-delay: 0.5s; scale: 0.85; }
@keyframes burst {
  0%, 100% { transform: scale(0.4); opacity: 0.45; }
  35% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1.15); opacity: 0.7; }
}
.brand h1 { margin: 0; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 28px; font-weight: 700; letter-spacing: 1px; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }

.nav { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 20; }
.nav .wrap { display: flex; align-items: stretch; gap: 8px; }
.menu { display: flex; flex: 1; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; }
.menu > li > a, .nav-btn {
  display: block; color: #fff; padding: 14px 14px; font-size: 20px; font-weight: 500;
}
.menu > li > a:hover, .menu > li:focus-within > a, .menu > li.active > a { background: rgba(0,0,0,.15); }
.dropdown {
  display: none; position: absolute; left: 0; top: 100%; min-width: 160px;
  background: #fff; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 6px 0;
}
.menu > li:hover > .dropdown, .menu > li:focus-within > .dropdown { display: block; }
.dropdown a { display: block; padding: 10px 16px; font-size: 17px; }
.dropdown a:hover { background: #e7f4fb; color: var(--red); }
.search { display: flex; align-items: center; padding: 8px 0; }
.search input {
  width: 148px; border: 0; border-radius: 2px; padding: 8px 10px; font-size: 16px; background: rgba(255,255,255,.92);
}
.search button { margin-left: 6px; border: 0; background: var(--gold); color: #fff; padding: 6px 10px; cursor: pointer; }
.nav-toggle { display: none; margin-left: auto; background: transparent; color: #fff; border: 0; padding: 10px; cursor: pointer; }

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 22px; padding: 26px 0 8px; }
.slider { position: relative; background: #12344d; min-height: 320px; min-width: 0; overflow: hidden; }
.slide { display: none; }
.slide.on { display: block; }
.slide img { width: 100%; height: 360px; object-fit: cover; display: block; }
.slide span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 14px;
  color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72));
  font-size: 16px;
}
.dots { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); padding: 0; cursor: pointer; }
.dots button.on { background: #fff; }
.panel { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.panel h2, .block h2 {
  margin: 0; padding: 10px 16px; background: var(--red); color: #fff;
  font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.panel h2 a, .block h2 a { color: #fff; font-size: 12px; font-weight: 400; }
.news-list { list-style: none; margin: 0; padding: 6px 0; }
.news-list li { display: flex; gap: 12px; align-items: baseline; min-width: 0; padding: 8px 16px; border-bottom: 1px dashed var(--line); }
.news-list li:last-child { border-bottom: 0; }
.news-list a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-list a:hover { color: var(--red); }
.news-list time { color: var(--muted); font-size: 13px; flex: none; }

.grid3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 18px 0 8px; }
.block { background: var(--card); border: 1px solid var(--line); min-width: 0; overflow: hidden; }
.about {
  margin: 22px 0; background: var(--red-dark); color: #f4fbff;
  display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 24px; padding: 28px; align-items: center;
}
.about-photo { width: 100%; height: 180px; object-fit: cover; display: block; }
.about h2 { margin: 0 0 8px; font-family: "Noto Serif SC", serif; font-size: 26px; font-weight: 700; }
.about p { margin: 0; color: #e7f4fc; }
.about-side { display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 1px solid rgba(255,255,255,.2); padding-left: 22px; }
.about-side strong { font-family: "Noto Serif SC", serif; font-size: 22px; }
.btn {
  display: inline-block; margin-top: 14px; background: var(--gold); color: #fff; padding: 8px 16px;
}
.btn:hover { filter: brightness(1.05); }

.page { padding: 22px 0 40px; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.crumb a:hover { color: var(--red); }
.layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.side { background: var(--card); border: 1px solid var(--line); }
.side h2 { margin: 0; padding: 12px 14px; background: var(--red); color: #fff; font-size: 16px; }
.side a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.side a:hover, .side a.on { color: var(--red); background: #eef6fb; }
.article, .doc { background: var(--card); border: 1px solid var(--line); padding: 28px 32px 36px; }
.article h1, .doc h1 { margin: 0 0 10px; font-family: "Noto Serif SC", serif; font-size: 28px; line-height: 1.4; }
/* 正文页：标题居中，日期栏通栏，和原站文章页一致 */
.read { padding: 0 0 36px; }
.read > h1 {
  margin: 0;
  padding: 22px 32px 0;
  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 26px;
  font-weight: 500;
  color: #4a5560;
}
.crumb-bar {
  background: #f4f5f6;
  border: 1px solid #e6e6e6;
  color: #666;
  font-size: 14px;
  padding: 10px 14px;
  margin-bottom: 0;
}
.crumb-bar a { color: #333; text-decoration: underline; }
.meta {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin: 16px 0 0;
  padding: 10px 16px;
  background: #f3f3f3;
  border-bottom: 1px dashed #cfcfcf;
}
.prose { font-size: 16px; line-height: 2; color: #3a4550; padding: 18px 36px 0; }
.prose p { margin: 0 0 0.75em; }
.prose p.indent { text-indent: 2em; text-align: justify; }
.prose p.center-line { text-align: center; font-weight: 700; text-indent: 0; margin: 1.05em 0 0.55em; }
.prose p.mid { text-align: center; text-indent: 0; font-weight: 400; }
.prose p.sign-line { text-align: right; text-indent: 0; }
.prose p.plain { text-indent: 0; text-align: left; }
.prose img { display: block; max-width: 100%; height: auto; margin: 12px auto; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px; vertical-align: top; }
.prose td p, .prose th p { margin: 0; text-indent: 0; }
.list-title { margin: 0 0 12px; font-family: "Noto Serif SC", serif; font-size: 26px; }
.empty { padding: 28px 16px; color: var(--muted); }

.footer { background: #0c3d5e; color: #d5e8f4; margin-top: 10px; }
.footer .wrap { padding: 26px 0 18px; }
.footer h3 { margin: 0 0 8px; color: #fff; font-size: 15px; font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.links a:hover { color: #fff; }
.legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; font-size: 13px; color: #b7d0e2; }
.legal a { color: #d6eeff; }

.admin-shell { width: min(1180px, calc(100% - 32px)); margin: 24px auto 48px; }
.rte { border: 1px solid var(--line); background: #fff; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #f4f8fb; border-bottom: 1px solid var(--line); }
.rte-bar button { background: #fff; border: 1px solid #c5d7e4; padding: 6px 10px; cursor: pointer; font-size: 14px; }
.rte-bar button:hover { border-color: var(--red); color: var(--red); }
.rte-body { min-height: 420px; max-height: 68vh; overflow: auto; outline: none; }
.rte-body.prose { padding: 16px 20px 28px; }
.login-card, .editor { background: var(--card); border: 1px solid var(--line); padding: 28px; box-shadow: var(--shadow); }
.login-card { width: min(420px, 100%); margin: 48px auto; }
.login-card h1, .editor h1 { font-family: "Noto Serif SC", serif; margin: 0 0 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line); background: #fff; padding: 8px 10px; border-radius: 2px;
}
.field textarea { min-height: 220px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.primary, .ghost, .danger {
  border: 0; cursor: pointer; padding: 8px 14px;
}
.primary { background: var(--red); color: #fff; }
.ghost { background: #e3f2fa; }
.danger { background: transparent; color: var(--red); }
.hint { color: var(--muted); font-size: 13px; }
.error { color: var(--red); min-height: 1.2em; }
.tabs { display: flex; gap: 8px; margin: 12px 0; }
.tabs button.on { background: var(--red); color: #fff; }
.split { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.pick { max-height: 520px; overflow: auto; border: 1px solid var(--line); }
.pick button { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; cursor: pointer; }
.pick button.on { background: #eef6fb; color: var(--red); }
.ok { color: #1d6b3a; }

@media (max-width: 860px) {
  body { background-attachment: scroll; }
  .hero, .grid3, .about, .layout, .split { grid-template-columns: 1fr; }
  .header .wrap { display: block; }
  .sky-fire { display: none; }
  .brand-logo { min-height: 144px; padding: 12px 0; }
  .brand-logo img { height: 125px; }
  .about-side { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.2); padding-top: 14px; }
  .slide img { height: 210px; }
  .nav-toggle { display: block; }
  .menu, .search { display: none; }
  .nav.open .menu { display: flex; flex-direction: column; }
  .nav.open .search { display: flex; padding-bottom: 12px; }
  .nav .wrap { flex-wrap: wrap; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; background: #f4faff; }
  .nav.open .menu > li:hover > .dropdown, .nav.open .menu > li.open > .dropdown { display: block; }
  .brand h1 { font-size: 22px; }
  .article, .doc { padding: 18px 16px 28px; }
  .read { padding: 0 0 24px; }
  .read > h1 { padding: 16px 16px 0; font-size: 22px; }
  .prose { padding: 14px 16px 0; }
}
