:root {
  --primary-color: #1e40af;
  --primary-hover: #1e3a8a;
  --link-color: #334155;
  --link-hover: #1e40af;
  --text-main: #334155;
  --text-muted: #64748b;
  --bg-body: #f2f4f7;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --sidebar-width: 300px;
  --container-width: 1100px;
  --header-height: 64px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius-md: 0.5rem;
}
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background-color: var(--bg-body);
}
dd {
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
  color: var(--link-color);
  transition: color 0.2s;
}
a:hover {
  color: var(--link-hover);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
p {
  margin: 0 0 1rem;
}
#divAll {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#divPage {
  background: none;
}
#divMiddle {
  width: 100%;
  max-width: var(--container-width);
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  gap: 2rem;
  flex: 1;
}
#divTop {
  width: 100%;
  height: auto;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-sm);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}
#divTop > .content-wrapper {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#BlogTitle {
  font-size: 1.5rem;
  font-weight: 700;
}
#BlogTitle a {
  color: var(--text-main);
}
#BlogSubTitle {
  display: none;
}
#divNavBar {
  float: none;
  width: auto;
  height: auto;
  background: transparent;
}
#divNavBar ul {
  display: flex;
  gap: 1rem;
}
#divNavBar li {
  font-size: 1rem;
  position: relative;
}
#divNavBar a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-weight: 500;
}
#divNavBar a:hover, #divNavBar a.on {
  background-color: #eff6ff;
  color: var(--primary-color);
}
#divNavBar li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  min-width: 180px;
  flex-direction: column;
  gap: 0;
}
#divNavBar li:hover ul {
  display: flex;
}
#divNavBar li ul li {
  width: 100%;
}
#divNavBar li ul a {
  padding: 0.5rem 1rem;
  border-radius: 0
}
#divMain {
  flex: 1;
  width: auto;
  margin: 0;
  padding: 0;
  float: none;
  min-width: 0;
}
#divSidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  float: none;
}
.menu-toggle {
  display: none;
}
.hidden {
  overflow: hidden;
}
.function {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--shadow-sm);
}
.function a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.function .function_t {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  background: none;
  color: var(--text-main);
  padding-left: 0;
}
.function ul {
  border: none;
  padding: 0;
  width: 100%;
}
.function li {
  background: none;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.95rem;
}
.function li:last-child {
  border-bottom: none;
}
#divPrevious a {
  white-space: break-spaces;
}
#divCalendar table {
  width: 100%;
  text-align: center;
  border-collapse: collapse;
}
#divCalendar caption {
  padding: 0.5rem 0;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
#divCalendar caption a {
  padding: 0 0.25rem;
  color: var(--text-main);
}
#divCalendar caption a:hover {
  color: var(--primary-color);
}
#divCalendar th {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: normal;
  padding-bottom: 0.5rem;
}
#divCalendar td {
  padding: 0.5rem 0;
  font-size: 0.9rem;
}
#divCalendar td a {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  line-height: 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  text-align: center;
}
#divCalendar td a:hover {
  background-color: var(--primary-hover);
  color: #fff;
}
#divSearchPanel form {
  display: flex;
  gap: 0.5rem;
}
#divSearchPanel form label {
  flex: 1;
  display: block;
}
#divSearchPanel input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
#divSearchPanel input[type="text"]:focus {
  border-color: var(--primary-color);
}
#divSearchPanel input[type="submit"] {
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}
#divSearchPanel input[type="submit"]:hover {
  background-color: var(--primary-hover);
}
#divTags ul, #divComments ul, #divFavorites ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#divCatalog li, #divTags li, #divComments li, #divFavorites li, #divLinkage li, #divArchives li, #divAuthors li {
  width: auto;
  border: none;
  padding: 0;
  background: none;
  min-width: 0;
}
#divCatalog li a, #divTags li a, #divComments li a, #divFavorites li a, #divLinkage li a, #divArchives li a, #divAuthors li a {
  display: block;
  padding: 0.35rem 0.75rem;
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-main);
  transition: all 0.2s;
}
#divCatalog li a:hover, #divTags li a:hover, #divComments li a:hover, #divFavorites li a:hover, #divLinkage li a:hover, #divArchives li a:hover, #divAuthors li a:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
  transform: translateX(2px);
}
#divArchives ul, #divAuthors ul, #divLinkage ul, #divCatalog ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
#divMisc ul {
  display: flex;
  gap: 1rem;
  align-items: center;
}
#divMisc li {
  background: none;
  border: none;
  padding: 0;
  width: auto;
}
#divMisc img {
  height: 31px;
  width: auto;
  border-radius: var(--radius-md);
  transition: opacity 0.2s;
}
#divMisc a:hover img {
  opacity: 0.8;
}
#divComments li, #divFavorites li {
  width: 100%;
}
#divContorPanel .function_c div {
  padding: 0.25rem 0;
  text-align: center
}
#divContorPanel .cp-hello {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
#divContorPanel br {
  display: none;
}
#divContorPanel .cp-login, #divContorPanel .cp-vrs {
  display: inline-block;
  margin-right: 0.5rem;
}
#divContorPanel a {
  color: var(--primary-color);
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #f0f9ff;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: all 0.2s;
}
#divContorPanel a:hover {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}
ul.msg {
  margin-top: 1rem;
}
li.msgname {
  display: flex;
  align-items: center;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: 1px solid var(--border-color);
}
li.msgname img.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  margin-right: 0.75rem;
  object-fit: cover;
}
li.msgname .commentname {
  font-weight: 600;
  margin-right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
li.msgname small {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: normal;
  margin-left: auto;
}
li.msgarticle {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-top: none;
}
ul.msg ul.msg {
  margin-left: 1rem;
  border-left: 2px solid var(--border-color);
  padding-left: 1rem;
}
ul.msg ul.msg li.msgarticle {
  border: 1px solid var(--border-color);
}
.commentpagebar {
  margin-bottom: 1.5rem;
}
#divCommentPost {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
#divCommentPost .posttop {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}
#divCommentPost small {
  font-weight: normal;
  font-size: 1rem;
}
#divCommentPost form p {
  margin-bottom: 1rem;
  position: relative;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.5rem;
}
#divCommentPost form p:last-child {
  flex-direction: row;
}
#divCommentPost form p img {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
}
#divCommentPost input.text, #divCommentPost textarea.text {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #f8fafc;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#divCommentPost input.text:focus, #divCommentPost textarea.text:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #fff;
}
#divCommentPost input.button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}
#divCommentPost input.button:hover {
  background-color: var(--primary-hover);
}
#divCommentPost label {
  color: var(--text-muted);
}
div.post {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  width: 100%;
}
div.post .post-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  background: none;
  border: none;
  padding: 0;
  width: auto;
  float: none;
  color: var(--text-main);
}
div.post .post-title a {
  color: var(--text-main);
}
div.post .post-title a:hover {
  color: var(--primary-color);
}
div.post .post-date, div.post .post-tags, div.post .post-footer {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
  text-align: left;
  color: var(--text-muted);
  font-size: 0.875rem;
}
div.post .post-tags {
  margin-bottom: 0.5rem
}
div.post .post-date {
  margin-bottom: 1rem;
}
div.post div.post-body {
  width: 100%;
  margin: 1.25rem 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
  word-break: break-all;
  overflow-wrap: break-word;
}
div.post div.post-body p {
  text-indent: 0;
  margin: 1.25rem 0;
}
.pagebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pagebar a, .now-page {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.now-page, .pagebar a:hover {
  background: var(--primary-color);
  color: #fff;
}
#divBottom {
  background-color: #1e293b;
  color: #94a3b8;
  padding: 3rem 0;
  margin-top: auto;
  text-align: center;
  width: 100%;
  height: auto;
}
#divBottom a {
  color: #cbd5e1;
}
#backToTop {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: #fff;
  border-radius: var(--radius-md);
  text-align: center;
  line-height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: none;
  z-index: 999;
}
#backToTop i {
  border: solid #fff;
  border-width: 0 .125rem .125rem 0;
  display: inline-block;
  padding: 0.375rem;
  transform: rotate(-135deg);
  -webkit-transform: rotate(-135deg);
}
@media (max-width: 768px) {
  #divMiddle {
    flex-direction: column;
    margin: 1.5rem auto;
    gap: 0;
  }
  #divSidebar {
    width: 100%;
  }
  #divTop > .content-wrapper {
    flex-direction: row;
    height: auto;
    padding: 1rem;
    align-items: center;
    justify-content: space-between;
  }
  #divNavBar {
    margin-top: 0;
    width: auto;
    flex-shrink: 0;
  }
  #divNavBar a {
    border-radius: 0;
    padding: 0.75rem 1rem;
  }
  #divNavBar ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    flex-direction: column;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    z-index: 1010;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    gap: 0;
  }
  #divNavBar ul.active {
    display: flex;
  }
  #divNavBar > ul {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 100vh;
  }
  #divNavBar li {
    width: 100%;
    text-align: center;
    position: relative;
  }
  #divNavBar li ul {
    display: none;
    position: static;
    width: 100%;
    box-shadow: none;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0;
    min-width: 0;
    padding: 0.5rem 0;
  }
  #divNavBar li:hover ul, #divNavBar li.hover ul {
    display: block;
  }
  #divNavBar li ul li a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  .menu-toggle {
    display: block;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    margin-left: auto;
  }
  .menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
  }
  .menu-toggle span:nth-child(1) {
    top: 0px;
  }
  .menu-toggle span:nth-child(2) {
    top: 10px;
  }
  .menu-toggle span:nth-child(3) {
    top: 20px;
  }
  .menu-toggle.open span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
  }
  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
  }
  .menu-toggle.open span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
  }
  div.post {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }
  li.msgname .commentname {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
}