@charset "UTF-8";
@font-face {
  font-family: chancery;
  src: url(./fonts/chancery/apple-chancery-webfont.eot);
  src: local("Apple Chancery"),
    url(./fonts/chancery/apple-chancery-webfont.eot?#iefix)
      format("embedded-opentype"),
    url(./fonts/chancery/apple-chancery-webfont.woff2) format("woff2"),
    url(./fonts/chancery/apple-chancery-webfont.woff) format("woff"),
    url(./fonts/chancery/apple-chancery-webfont.ttf) format("truetype"),
    url(./fonts/chancery/apple-chancery-webfont.svg#apple-chancery)
      format("svg");
  font-weight: lighter;
  font-style: normal;
  font-display: swap;
}

html {
  font-size: 16px;
}

body {
  font-family: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  background-color: #fdfdfd;
  color: #333; /* Default text color for light mode */
  transition: background-color 0.3s, color 0.3s; /* Smooth transition */
}

a {
  color: blue;
  text-decoration: none;
}

a:hover {
  color: blue;
  text-decoration: underline;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 10px;
}

header.header {
  height: 60px;
  padding: 20px;
  display: flex; /* Use flexbox for header layout */
  justify-content: space-between; /* Space out logo and nav */
  align-items: center; /* Vertically align items */
}

div.logowrap {
  /* float: left; No longer needed with flexbox */
}

header.header a {
  color: #34495e;
  text-decoration: none;
}

header.header a:hover {
  color: #34495e;
  text-decoration: none;
}

a.logo {
  font-size: 48px;
  font-family: chancery, "PingFang SC", cursive, LiSu, sans-serif;
}

nav.site-navbar {
  /* float: right; No longer needed with flexbox */
  font-size: 18px;
  /* padding-right: 25px; Adjust padding/margin as needed */
}

nav.site-navbar > ul {
  display: flex;
  flex-direction: row;
  align-items: center; /* Align nav items vertically */
  list-style: none;
  padding-inline-start: 0;
  margin: 0; /* Remove default ul margin */
}

nav.site-navbar a:hover {
  text-decoration: underline;
}

nav.site-navbar > ul > li {
  padding: 2px 0;
  margin-left: 10px; /* Use margin-left for spacing */
}
nav.site-navbar > ul > li:first-child {
    margin-left: 0; /* No margin for the first item */
}


main.content {
  padding: 0 20px;
  margin-top: 20px; /* Add space below header */
}

.content > article {
  word-break: break-all;
  line-height: 1.5;
}

.content > article .post-header {
  margin-bottom: 20px;
}

.content > article .post-title {
  margin: 0;
  font-size: 27px;
  font-weight: 400;
}

.content > article .post-meta {
  font-size: 14px;
  color: #8a8a8a;
}

.content > article .post-meta .updated {
  margin-left: 10px;
}

.content > article .post-meta .edit-link {
  margin-left: 10px;
}

.content > article .post-meta .edit-link a {
  color: #007bff;
  text-decoration: none;
  padding: 2px 6px;
  border: 1px solid #007bff;
  border-radius: 3px;
  font-size: 12px;
}

.content > article .post-meta .edit-link a:hover {
  background-color: #007bff;
  color: white;
}

.content > article img {
  max-width: 100%;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 6px;
}

.content > article blockquote {
  margin-block: 0;
  margin-inline: 0;
  padding: 3px 10px;
  background-color: #f3f3f3;
  margin-bottom: 15px;
  border-left: 2px solid #24292f;
  color: #333; /* Ensure blockquote text color contrasts with light background */
}

.content > article div.chroma {
  overflow-x: auto;
  line-height: 1.2em;
  font-size: 14px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  border-radius: 6px;
  padding: 0 5px;
  word-wrap: normal;
}

.content > article div.chroma>table.lntable tr {
  background-color: transparent;
}

.content > article table {
  border-collapse: collapse;
}

.content > article td,
.content > article th {
  border: 1px solid #ccc;
  padding: 2px 5px;
}

.content > article tr:nth-child(even) {
  background-color: #f2f2f2;
}

.content > article tr:hover {
  background-color: #ddd;
}

.content > article .post-footer {
  margin-top: 30px;
  border-top: 1px solid #e6e6e6;
}

.content > article .post-footer .post-tags {
  padding: 15px 0;
}

.content > article .post-footer .post-tags a {
  margin-right: 5px;
  word-break: break-all;
}

/* 美化笔记列表 */
ul.note-list {
  list-style: none;
  padding: 0;
  margin: 0;
  /* margin-top: 20px; Moved to main.content */
}

.note-item {
  margin-bottom: 20px; /* Increase space between items */
  padding: 15px;
  border-radius: 8px;
  background-color: #fff; /* Restore background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Restore shadow */
  transition: all 0.3s ease;
  display: flex; /* Use flex for horizontal layout */
  align-items: center; /* Vertically align items in the center */
  /* justify-content: space-between; Let flex-grow handle spacing */
  position: relative;
}

.note-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.note-date {
  background-color: #f5f5f5; /* Restore date background */
  color: #666;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-right: 15px; /* Add space between date and title */
  white-space: nowrap; /* Prevent date from wrapping */
  flex-shrink: 0; /* Prevent date from shrinking */
}

.note-title-wrapper {
  display: flex;
  align-items: center;
  flex-grow: 1; /* Allow title wrapper to take up available space */
  min-width: 0; /* Allow title wrapper to shrink if needed */
  overflow: hidden; /* Prevent long titles from pushing tags */
  text-overflow: ellipsis; /* Add ellipsis for very long titles */
  white-space: nowrap; /* Prevent title from wrapping */
}

.note-publish-icon {
  margin-right: 5px;
  font-size: 0.9em;
  color: #777;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.note-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-title:hover {
  color: #0066cc;
  text-decoration: none;
}

.note-tags {
  display: flex;
  flex-wrap: nowrap; /* Prevent tags from wrapping */
  align-items: center;
  margin-left: 15px; /* Add space between title and tags */
  flex-shrink: 0; /* Prevent tags container from shrinking */
}

.note-tag {
  background-color: #f0f0f0; /* Restore tag background */
  color: #555;
  padding: 3px 8px;
  border-radius: 15px; /* Restore tag border-radius */
  font-size: 0.75rem;
  margin-left: 6px; /* Use margin-left for spacing between tags */
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap; /* Prevent individual tags from wrapping */
}
.note-tag:first-child {
    margin-left: 0; /* Remove margin from the first tag */
}


.note-tag:hover {
  background-color: #e0e0e0; /* Restore tag hover */
  color: #333;
  text-decoration: none;
}


/* 美化分页导航 */
nav {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

nav a {
  padding: 8px 16px;
  margin: 0 5px;
  background-color: #f5f5f5;
  color: #333;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s ease;
}

nav a:hover {
  background-color: #e0e0e0;
  color: #0066cc;
  text-decoration: none;
}

.search > form {
  padding: 10px 0 5px 0;
}

.search .result .item {
  padding: 5px 0;
  border-bottom: 1px solid #444;
}

.search .result .item:last-child {
  border-bottom: none;
}

.search .result .item .hit-text > div {
  padding: 2px 0;
  border-bottom: 1px dashed #444;
}

.search .result .item .hit-text > div:last-child {
  border-bottom: none;
}

footer > p {
  text-align: center;
  color: #555; /* Footer text color for light mode */
}

@media screen and (max-width: 800px) {
  a.logo {
    font-size: 30px;
  }
  header.header {
      flex-direction: column; /* Stack logo and nav vertically */
      height: auto; /* Adjust height */
      padding: 10px;
  }
  nav.site-navbar {
    font-size: 14px;
    padding-right: 0;
    margin-top: 10px; /* Add space below logo */
  }
  nav.site-navbar > ul > li {
    padding: 0;
    margin-left: 5px; /* Adjust spacing */
  }
  main.content {
    padding: 0 10px; /* Adjust padding */
    margin-top: 10px;
  }
  /* Adjust note item for smaller screens if needed */
  .note-item {
      flex-wrap: wrap; /* Allow wrapping on small screens */
      /* justify-content: flex-start; Remove this if flex-grow is used */
  }
  .note-tags {
      margin-left: 0; /* Remove margin override */
      margin-top: 8px; /* Add space when tags wrap */
      width: 100%; /* Allow tags to take full width when wrapped */
      flex-wrap: wrap; /* Allow tags to wrap internally */
      justify-content: flex-start; /* Align tags to start */
  }
   .note-tag {
      margin-left: 0;
      margin-right: 6px; /* Use right margin for spacing */
      margin-bottom: 4px; /* Add bottom margin for wrapped tags */
  }
  .note-title-wrapper {
      white-space: normal; /* Allow title to wrap */
      margin-right: 0; /* Remove right margin */
      width: 100%; /* Allow title wrapper to take full width if needed */
      margin-top: 8px; /* Add space above title when date wraps */
      order: 2; /* Ensure title comes after date */
  }
   .note-date {
       margin-bottom: 0; /* Remove bottom margin when wrapped */
       margin-right: 0; /* Remove right margin */
       width: 100%; /* Take full width */
       text-align: left; /* Align left */
       order: 1; /* Ensure date comes first */
   }
   .note-tags {
       order: 3; /* Ensure tags come last */
   }
}

/*====================================代码高亮自动生成============================================*/
/* These styles are likely for a specific code highlighting library (like Chroma) */
/* They define colors for dark code blocks, which might conflict or complement the dark theme */
/* We'll keep them as is for now, but they might need adjustment depending on the desired dark mode look */

/* Background */
.bg {
  color: #f8f8f2;
  background-color: #272822;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
}
/* PreWrapper */
.chroma {
  color: #f8f8f2;
  background-color: #272822;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
}
/* LineTableTD */
.chroma .lntd:last-child {
  width: 100%;
} /* LineNumbers targeted by URL anchor */
.chroma .ln:target {
  color: #f8f8f2;
  background-color: #3c3d38;
}
/* LineNumbersTable targeted by URL anchor */
.chroma .lnt:target {
  color: #f8f8f2;
  background-color: #3c3d38;
}
/* Error */
.chroma .err {
  color: #960050;
  background-color: #1e0010;
}
/* LineTableTD */
.chroma .lntd {
  vertical-align: top;
  padding: 0;
  margin: 0;
  border: 0;
}
/* LineTable */
.chroma .lntable {
  border-spacing: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
/* LineHighlight */
.chroma .hl {
  background-color: #3c3d38;
}
/* LineNumbersTable */
.chroma .lnt {
  white-space: pre;
  user-select: none;
  margin-right: 0.4em;
  padding: 0 0.4em 0 0.4em;
  color: #7f7f7f;
}
/* LineNumbers */
.chroma .ln {
  white-space: pre;
  user-select: none;
  margin-right: 0.4em;
  padding: 0 0.4em 0 0.4em;
  color: #7f7f7f;
}
/* Line */
.chroma .line {
  display: flex;
}
/* Keyword */
.chroma .k {
  color: #66d9ef;
}
/* KeywordConstant */
.chroma .kc {
  color: #66d9ef;
}
/* KeywordDeclaration */
.chroma .kd {
  color: #66d9ef;
}
/* KeywordNamespace */
.chroma .kn {
  color: #f92672;
}
/* KeywordPseudo */
.chroma .kp {
  color: #66d9ef;
}
/* KeywordReserved */
.chroma .kr {
  color: #66d9ef;
}
/* KeywordType */
.chroma .kt {
  color: #66d9ef;
}
/* NameAttribute */
.chroma .na {
  color: #a6e22e;
}
/* NameClass */
.chroma .nc {
  color: #a6e22e;
}
/* NameConstant */
.chroma .no {
  color: #66d9ef;
}
/* NameDecorator */
.chroma .nd {
  color: #a6e22e;
}
/* NameException */
.chroma .ne {
  color: #a6e22e;
}
/* NameFunction */
.chroma .nf {
  color: #a6e22e;
}
/* NameOther */
.chroma .nx {
  color: #a6e22e;
}
/* NameTag */
.chroma .nt {
  color: #f92672;
}
/* Literal */
.chroma .l {
  color: #ae81ff;
}
/* LiteralDate */
.chroma .ld {
  color: #e6db74;
}
/* LiteralString */
.chroma .s {
  color: #e6db74;
}
/* LiteralStringAffix */
.chroma .sa {
  color: #e6db74;
}
/* LiteralStringBacktick */
.chroma .sb {
  color: #e6db74;
}
/* LiteralStringChar */
.chroma .sc {
  color: #e6db74;
}
/* LiteralStringDelimiter */
.chroma .dl {
  color: #e6db74;
}
/* LiteralStringDoc */
.chroma .sd {
  color: #e6db74;
}
/* LiteralStringDouble */
.chroma .s2 {
  color: #e6db74;
}
/* LiteralStringEscape */
.chroma .se {
  color: #ae81ff;
}
/* LiteralStringHeredoc */
.chroma .sh {
  color: #e6db74;
}
/* LiteralStringInterpol */
.chroma .si {
  color: #e6db74;
}
/* LiteralStringOther */
.chroma .sx {
  color: #e6db74;
}
/* LiteralStringRegex */
.chroma .sr {
  color: #e6db74;
}
/* LiteralStringSingle */
.chroma .s1 {
  color: #e6db74;
}
/* LiteralStringSymbol */
.chroma .ss {
  color: #e6db74;
}
/* LiteralNumber */
.chroma .m {
  color: #ae81ff;
}
/* LiteralNumberBin */
.chroma .mb {
  color: #ae81ff;
}
/* LiteralNumberFloat */
.chroma .mf {
  color: #ae81ff;
}
/* LiteralNumberHex */
.chroma .mh {
  color: #ae81ff;
}
/* LiteralNumberInteger */
.chroma .mi {
  color: #ae81ff;
}
/* LiteralNumberIntegerLong */
.chroma .il {
  color: #ae81ff;
}
/* LiteralNumberOct */
.chroma .mo {
  color: #ae81ff;
}
/* Operator */
.chroma .o {
  color: #f92672;
}
/* OperatorWord */
.chroma .ow {
  color: #f92672;
}
/* Comment */
.chroma .c {
  color: #75715e;
}
/* CommentHashbang */
.chroma .ch {
  color: #75715e;
}
/* CommentMultiline */
.chroma .cm {
  color: #75715e;
}
/* CommentSingle */
.chroma .c1 {
  color: #75715e;
}
/* CommentSpecial */
.chroma .cs {
  color: #75715e;
}
/* CommentPreproc */
.chroma .cp {
  color: #75715e;
}
/* CommentPreprocFile */
.chroma .cpf {
  color: #75715e;
}
/* GenericDeleted */
.chroma .gd {
  color: #f92672;
}
/* GenericEmph */
.chroma .ge {
  font-style: italic;
}
/* GenericInserted */
.chroma .gi {
  color: #a6e22e;
}
/* GenericStrong */
.chroma .gs {
  font-weight: bold;
}
/* GenericSubheading */
.chroma .gu {
  color: #75715e;
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #2c2c2c; /* Dark background */
  color: #f1f1f1; /* Light text */
}

body.dark-mode a {
  color: #64b5f6; /* Lighter blue for links */
}

body.dark-mode a:hover {
  color: #90caf9; /* Even lighter blue on hover */
}

body.dark-mode header.header a {
  color: #e0e0e0; /* Lighter header links */
}
body.dark-mode header.header a.logo {
    color: #e0e0e0; /* Ensure logo color is also light */
}

body.dark-mode header.header a:hover {
  color: #ffffff; /* White on hover */
}

body.dark-mode .content > article blockquote {
  background-color: #3a3a3a; /* Darker blockquote background */
  border-left-color: #64b5f6; /* Lighter blue border */
  color: #e0e0e0; /* Lighter text in blockquote */
}

body.dark-mode .content > article td,
body.dark-mode .content > article th {
  border-color: #555; /* Darker table borders */
}

body.dark-mode .content > article tr:nth-child(even) {
  background-color: #383838; /* Slightly darker even table rows */
}

body.dark-mode .content > article tr:hover {
  background-color: #4a4a4a; /* Darker hover effect for table rows */
}

body.dark-mode .content > article .post-footer {
  border-top-color: #555; /* Darker footer border */
}

/* 暗黑模式下的笔记列表样式 */
body.dark-mode .note-item {
  background-color: #3a3a3a; /* Restore dark background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Restore dark shadow */
}

body.dark-mode .note-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); /* Restore dark hover */
}

body.dark-mode .note-date {
  background-color: #2c2c2c; /* Restore dark date background */
  color: #ccc;
}

body.dark-mode .note-title {
  color: #e0e0e0;
}

body.dark-mode .note-title:hover {
  color: #90caf9;
}

body.dark-mode .note-publish-icon {
  color: #aaa;
}

body.dark-mode .note-tag {
  background-color: #444; /* Restore dark tag background */
  color: #bdbdbd;
}

body.dark-mode .note-tag:hover {
  background-color: #555; /* Restore dark tag hover */
  color: #fff;
}

body.dark-mode nav a {
  background-color: #3a3a3a;
  color: #e0e0e0;
}

body.dark-mode nav a:hover {
  background-color: #4a4a4a;
  color: #90caf9;
}

body.dark-mode footer > p {
  color: #bdbdbd; /* Lighter footer text */
}

body.dark-mode #theme-toggle {
    border-color: #777; /* Adjust button border for dark mode */
    color: #f1f1f1; /* Ensure button icon is visible */
}

/* Keep existing code highlighting styles, they might work well enough */
/* If code blocks look bad in dark mode, these .chroma styles would need adjustment */
body.dark-mode .content > article div.chroma {
  /* Optionally adjust chroma background/text if needed, but the default dark might be okay */
   /* background-color: #1e1e1e; */
   /* color: #d4d4d4; */
   box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.3); /* Darker shadow */
}

body.dark-mode .content > article .post-meta {
  color: #aaa; /* Lighter meta text */
}

body.dark-mode .content > article .post-meta .edit-link a {
  color: #64b5f6;
  border-color: #64b5f6;
}

body.dark-mode .content > article .post-meta .edit-link a:hover {
  background-color: #64b5f6;
  color: #2c2c2c;
}

body.dark-mode .search .result .item {
  border-bottom-color: #555; /* Darker search result border */
}

body.dark-mode .search .result .item .hit-text > div {
   border-bottom-color: #555; /* Darker hit text border */
}

/* 为分类目录页面添加额外的暗色模式样式 */
body.dark-mode .category-card {
  border: 1px solid #555;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  background-color: #3a3a3a;
}

body.dark-mode .category-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

body.dark-mode .category-card a {
  color: #e0e0e0;
}

body.dark-mode .category-card .category-desc {
  color: #aaa;
}

/* 搜索页面样式 */
.search-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.search-form-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.search-form-container h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 500;
  color: #555;
}

.form-group input {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #64b5f6;
  box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2);
}

.btn-primary {
  padding: 12px 20px;
  background-color: #64b5f6;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #42a5f5;
}

.search-results h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.result-count {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-item {
  padding: 20px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.result-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.result-title {
  margin-bottom: 10px;
}

.result-title a {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
}

.result-title a:hover {
  color: #0066cc;
  text-decoration: underline;
}

.result-snippet {
  color: #666;
  font-size: 14px;
}

.result-snippet > div {
  padding: 3px 0;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.no-results p {
  margin: 0;
  font-size: 18px;
  color: #666;
}

.suggestion {
  font-size: 14px !important;
  margin-top: 10px !important;
}

/* 认证页面样式 */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
}

.auth-container {
  background-color: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-container h2 {
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
  color: #333;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.error-message {
  margin-top: 20px;
  padding: 15px;
  background-color: #ffebee;
  color: #c62828;
  border-radius: 4px;
  text-align: center;
}

.error-message p {
  margin: 0;
}

/* 标签页面样式 */
.tag-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.tag-page h2 {
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
  color: #333;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.tag-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background-color: #fff;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.tag-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.tag-name {
  font-size: 16px;
  color: #333;
  margin-right: 8px;
}

.tag-count {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: #64b5f6;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
}

.no-tags {
  text-align: center;
  padding: 40px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.no-tags p {
  margin: 0;
  font-size: 18px;
  color: #666;
}

/* 标签详情页面样式 */
.tag-item-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.tag-item-page h2 {
  margin-top: 0;
  margin-bottom: 30px;
  text-align: center;
  color: #333;
}

.note-list-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.no-notes {
  text-align: center;
  padding: 40px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.no-notes p {
  margin: 0;
  font-size: 18px;
  color: #666;
}

/* 暗色模式下的搜索页面样式 */
body.dark-mode .search-form-container,
body.dark-mode .result-item,
body.dark-mode .no-results,
body.dark-mode .auth-container,
body.dark-mode .tag-item,
body.dark-mode .no-tags,
body.dark-mode .note-list-container,
body.dark-mode .no-notes {
  background-color: #3a3a3a;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode .search-form-container h2,
body.dark-mode .search-results h3,
body.dark-mode .auth-container h2,
body.dark-mode .tag-page h2,
body.dark-mode .tag-item-page h2 {
  color: #f1f1f1;
}

body.dark-mode .form-group label {
  color: #e0e0e0;
}

body.dark-mode .form-group input {
  background-color: #2c2c2c;
  border-color: #555;
  color: #f1f1f1;
}

body.dark-mode .form-group input:focus {
  border-color: #64b5f6;
  box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.4);
}

body.dark-mode .btn-primary {
  background-color: #1976d2;
}

body.dark-mode .btn-primary:hover {
  background-color: #1565c0;
}

body.dark-mode .result-title a,
body.dark-mode .tag-name {
  color: #e0e0e0;
}

body.dark-mode .result-title a:hover {
  color: #90caf9;
}

body.dark-mode .result-snippet,
body.dark-mode .result-count {
  color: #bdbdbd;
}

body.dark-mode .no-results p,
body.dark-mode .no-tags p,
body.dark-mode .no-notes p {
  color: #bdbdbd;
}

body.dark-mode .error-message {
  background-color: #424242;
  color: #ef9a9a;
}

/* 响应式设计 */
@media screen and (max-width: 800px) {
  .search-page,
  .tag-page,
  .tag-item-page {
    padding: 10px;
  }
  
  .search-form-container,
  .auth-container {
    padding: 20px;
  }
  
  .auth-page {
    padding: 20px;
  }
  
  .tag-list {
    gap: 10px;
  }
  
  .tag-item {
    padding: 8px 16px;
  }
  
  .tag-name {
    font-size: 14px;
  }
  
  .tag-count {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
}