:root {
  --base-hue: 210;
  --base-sat: 10%;
  --bg-body: #f0f2f5;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-input: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --border-color: #e1e4e8;
  --divider-color: #eeeeee;
  --link-color: #778087;
  --link-hover: #4d5256;
  --primary: #333333;
  --primary-hover: #555555;
  --accent: #f9683a;
  --gap: 20px;
  --gap-mobile: 10px;
  --radius: 4px;
}

html {
  font-size: 14px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

body {
  margin: 0;
  background-color: var(--bg-body);
  color: var(--text-primary);
}

body a {
  color: var(--link-color);
  text-decoration: none;
  cursor: pointer;
}
body a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

* {
  box-sizing: border-box;
}

.button, button, input[type=submit] {
  display: inline-block;
  padding: 5px 10px;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 3px;
  cursor: pointer;
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease-in-out;
}
.button:hover, button:hover, input[type=submit]:hover {
  background-color: var(--divider-color);
  text-decoration: none;
  color: var(--text-primary);
}
.button.primary, button.primary, input[type=submit].primary {
  background-color: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}
.button.primary:hover, button.primary:hover, input[type=submit].primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
}
.button.small, button.small, input[type=submit].small {
  padding: 3px 8px;
  font-size: 12px;
}

.right {
  text-align: right;
}

.two {
  display: flex;
  justify-content: space-between;
}

.form {
  padding: 10px 0;
}
.form .form-row {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
}
.form .form-row label {
  width: 80px;
  text-align: right;
  margin-right: 20px;
  margin-bottom: 0;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  margin-top: 6px;
}
.form .form-row input[type=text],
.form .form-row input[type=email],
.form .form-row input[type=password],
.form .form-row input[type=file],
.form .form-row textarea,
.form .form-row select {
  flex: 1;
  max-width: 400px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form .form-row input[type=text]:focus,
.form .form-row input[type=email]:focus,
.form .form-row input[type=password]:focus,
.form .form-row input[type=file]:focus,
.form .form-row textarea:focus,
.form .form-row select:focus {
  border-color: #888;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}
.form .form-row input[type=text]:disabled,
.form .form-row input[type=email]:disabled,
.form .form-row input[type=password]:disabled,
.form .form-row input[type=file]:disabled,
.form .form-row textarea:disabled,
.form .form-row select:disabled {
  background-color: rgba(0, 0, 0, 0.05);
  cursor: not-allowed;
}
.form .form-row input[type=checkbox] {
  margin-right: 10px;
}
.form .form-row textarea {
  line-height: 1.5;
  resize: vertical;
  font-family: monospace;
}
.form .form-row .help-text {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.form .problem {
  margin-left: 100px;
  padding: 10px;
  background-color: #fff6f6;
  border: 1px solid #e0b4b4;
  color: #9f3a38;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 13px;
  max-width: 400px;
}
.form .form-actions {
  margin-top: 10px;
  margin-left: 100px;
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 600px) {
  .form .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form .form-row label {
    width: 100%;
    text-align: left;
  }
  .form .form-row input[type=text],
.form .form-row input[type=email],
.form .form-row input[type=password],
.form .form-row input[type=file],
.form .form-row textarea,
.form .form-row select {
    max-width: unset;
  }
  .form .form-actions {
    margin-top: unset;
    margin-left: unset;
  }
}
.form.form-topic .form-row input[type=text],
.form.form-topic .form-row input[type=email],
.form.form-topic .form-row input[type=password],
.form.form-topic .form-row input[type=file],
.form.form-topic .form-row textarea {
  max-width: 100%;
}
.form.form-topic .problem {
  max-width: 100%;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  list-style: none;
  padding: 0;
  margin: var(--gap) 0;
  gap: 5px;
}
.pagination li {
  display: flex;
  align-items: center;
}
.pagination li a {
  display: inline-block;
  padding: 4px 10px;
  text-decoration: none;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s ease-in-out;
}
.pagination li a:hover {
  background-color: var(--bg-body);
  color: var(--text-primary);
  border-color: var(--link-hover);
}
.pagination li.active a {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.pagination li.active a:hover {
  background-color: var(--primary-hover);
}
.pagination li:not(.active):not(:has(a)) {
  padding: 4px 10px;
  color: var(--text-tertiary);
  font-size: 14px;
}

@media (max-width: 600px) {
  .pagination {
    justify-content: center;
    margin: var(--gap-mobile) 0;
  }
}
#Curtain {
  background-color: var(--bg-header);
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  padding: 0 20px;
  height: 44px;
  min-width: 600px;
}
#Curtain .container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}
#Curtain .logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  gap: 10px;
}
#Curtain .logo a img {
  height: 36px;
  width: auto;
}
#Curtain .logo a:hover {
  color: var(--link-hover);
}

.navigation {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
}
.navigation > li > a {
  white-space: nowrap;
  display: inline-block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
}
.navigation > li > a:hover {
  color: var(--text-primary);
}
.navigation > li.active > a {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb {
  background-color: transparent;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-tertiary);
}
.breadcrumb a {
  color: var(--text-secondary);
}
.breadcrumb a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  #Curtain {
    padding: 0 10px;
    min-width: 100%;
  }
  #Curtain .container {
    width: 100%;
  }
  .navigation {
    gap: 10px;
  }
  .navigation > li > a {
    padding: 5px;
  }
}
#Wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
}

#Main {
  width: 1100px;
  max-width: 100%;
  min-height: 400px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

#Content {
  width: 770px;
  max-width: 100%;
}

#Sidebar {
  width: 270px;
  flex-shrink: 0;
}

#Content.full-width {
  width: 100%;
}

#Bottom {
  margin-top: 40px;
  width: 100%;
  background-color: var(--bg-card);
}
#Bottom .bottom-links {
  border-top: 1px solid var(--divider-color);
  padding: 30px 20px;
}
#Bottom .bottom-links .container {
  max-width: 1100px;
  margin: 0 auto;
}
#Bottom .bottom-links .links-grid {
  display: flex;
  flex-direction: row;
  gap: 40px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  #Bottom .bottom-links .links-grid {
    flex-wrap: wrap;
    gap: 20px;
  }
}
#Bottom .bottom-links .link-group .group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}
#Bottom .bottom-links .link-group .link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#Bottom .bottom-links .link-group .link-list li {
  margin-bottom: 8px;
}
#Bottom .bottom-links .link-group .link-list li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}
#Bottom .bottom-links .link-group .link-list li a:hover {
  color: var(--link-hover);
}
#Bottom .bottom-links .link-group .link-list li a .external-icon {
  opacity: 0.6;
  flex-shrink: 0;
}
#Bottom .bottom-copyright {
  border-top: 1px solid var(--divider-color);
  padding: 20px;
  text-align: center;
  color: var(--text-tertiary);
  background-color: var(--bg-body);
}
#Bottom .bottom-copyright .container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  #Bottom .bottom-copyright .container {
    gap: 5px;
  }
}
#Bottom .bottom-copyright .container strong {
  color: var(--text-secondary);
  font-size: 14px;
}
#Bottom .bottom-copyright .container .copyright-text {
  font-size: 13px;
}

@media (max-width: 1080px) {
  #Main {
    width: 100%;
    padding: 0 10px;
    flex-direction: column;
    justify-content: flex-start;
  }
  #Main #Content {
    width: 100%;
  }
  #Main #Sidebar {
    width: 100%;
  }
}
.sep5 {
  height: 5px;
}

.sep10 {
  height: 10px;
}

.sep20 {
  height: 20px;
}

.box {
  background-color: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 10px;
}

.inner {
  padding: 10px;
}

.cell {
  padding: 10px;
  border-bottom: 1px solid var(--divider-color);
}
.cell:last-child {
  border-bottom: none;
}

@media (max-width: 600px) {
  .box, .inner, .cell {
    padding: 5px;
  }
}
.nodes-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}
.nodes-list .node-item {
  background-color: var(--c3);
  border-radius: 4px;
  border: 1px solid var(--c2);
  padding: 12px 14px;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.nodes-list .node-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 500;
}
.nodes-list .node-item h3 a {
  color: var(--c1);
  text-decoration: none;
}
.nodes-list .node-item h3 a:hover {
  color: var(--x2);
}
.nodes-list .node-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c2);
  word-break: break-word;
}
.nodes-list .node-item:hover {
  border-color: var(--x2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
@media (max-width: 600px) {
  .nodes-list {
    grid-template-columns: 1fr 1fr;
  }
  .nodes-list .node-item {
    padding: 10px;
  }
}

.node-header {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid var(--divider-color);
  border-radius: var(--radius);
  align-items: center;
}
.node-header .node-avatar {
  flex-shrink: 0;
}
.node-header .node-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  display: block;
}
.node-header .node-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.node-header .node-info .title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.node-header .node-info .title-bar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.node-header .node-info .title-bar .node-stats {
  font-size: 13px;
  color: var(--text-tertiary);
}
.node-header .node-info .description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.node-header .node-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 20px;
}
.node-header .node-actions .button {
  padding: 4px 12px;
  font-size: 13px;
  height: auto;
  line-height: 24px;
}
@media (max-width: 600px) {
  .node-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .node-header .node-avatar img {
    width: 48px;
    height: 48px;
  }
  .node-header .node-info {
    width: 100%;
  }
  .node-header .node-info .title-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .node-header .node-actions {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    justify-content: flex-start;
  }
}

.nodes-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nodes-grid li a {
  display: inline-block;
  padding: 5px 10px;
  background-color: #f5f5f5;
  color: var(--text-secondary);
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
}
.nodes-grid li a:hover {
  background-color: #e2e2e2;
  color: var(--text-primary);
}

.topics {
  list-style: none;
  margin: 0;
  padding: 0;
}
.topics li {
  display: flex;
  width: 100%;
  padding: 10px;
  border-bottom: 1px solid var(--divider-color);
  align-items: center;
  background-color: var(--bg-card);
  transition: background-color 0.2s;
}
.topics li:last-child {
  border-bottom: none;
}
.topics li.empty {
  justify-content: center;
  padding: 20px;
  color: var(--text-tertiary);
}
.topics li.pinned {
  background-color: #fffcf0;
}
.topics li.pinned .item-title a {
  font-weight: bold;
}
.topics .item-avatar {
  flex-shrink: 0;
  margin-right: 10px;
}
.topics .item-avatar .avatar {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
}
.topics .item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  gap: 5px;
}
.topics .item-title {
  font-size: 16px;
  line-height: 1.3;
}
.topics .item-title a {
  color: var(--text-primary);
  text-decoration: none;
  word-break: break-all;
}
.topics .item-title a:hover {
  text-decoration: underline;
}
.topics .item-title a:visited {
  color: var(--text-secondary);
}
.topics .item-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.2;
}
.topics .item-meta a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}
.topics .item-meta a:hover {
  text-decoration: underline;
  color: var(--text-primary);
}
.topics .item-meta a.node {
  background-color: #f5f5f5;
  color: #999;
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: normal;
  margin-right: 5px;
}
.topics .item-meta a.node:hover {
  background-color: #e0e0e0;
  color: #333;
  text-decoration: none;
}
.topics .item-meta a.author {
  margin-right: 5px;
  color: var(--text-primary);
}
.topics .item-count {
  flex-shrink: 0;
  margin-left: 10px;
  text-align: right;
}
.topics .count-livid {
  background-color: #f5f5f5;
  color: var(--text-primary);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.topics .count-livid:hover {
  background-color: #e2e2e2;
}
@media (max-width: 600px) {
  .topics li {
    padding: 2px;
  }
}

.badge-pinned {
  background-color: var(--text-primary);
  color: var(--bg-card);
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-right: 5px;
  font-weight: normal;
  display: inline-block;
  line-height: 1.2;
  transform: scale(0.9);
}

.badge-op {
  border: 1px solid var(--text-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 0px 3px;
  border-radius: 3px;
  margin-left: 5px;
  font-weight: bold;
  display: inline-block;
  line-height: 1.2;
}

.topic-header {
  border-bottom: 1px solid var(--divider-color);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.topic-header .avatar-large {
  width: 73px;
  height: 73px;
  border-radius: 4px;
  object-fit: cover;
}
.topic-header h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 10px 0;
  color: var(--text-primary);
}
.topic-header .topic-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}
.topic-header .topic-meta a {
  color: var(--text-secondary);
  text-decoration: none;
}
.topic-header .topic-meta a:hover {
  text-decoration: underline;
}

.topic-content,
.comment-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.topic-content p,
.comment-body p {
  margin: 1em 0;
}
.topic-content img,
.comment-body img {
  max-width: 100%;
  height: auto;
}
.topic-content pre,
.comment-body pre {
  background-color: #f8f8f8;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 3px;
  overflow-x: auto;
  font-family: monospace;
}
.topic-content code,
.comment-body code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 90%;
}
.topic-content pre code,
.comment-body pre code {
  background-color: transparent;
  padding: 0;
}
.topic-content blockquote,
.comment-body blockquote {
  margin: 1em 0;
  padding: 0 1em;
  border-left: 4px solid var(--divider-color);
  color: var(--text-secondary);
}

.comments-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.comments-list .comment-item {
  padding: 10px;
  border-bottom: 1px solid var(--divider-color);
  display: flex;
  gap: 10px;
}
.comments-list .comment-item:last-child {
  border-bottom: none;
}
.comments-list .comment-item .avatar {
  width: 48px;
  height: 48px;
  border-radius: 4px;
}
.comments-list .comment-item .content {
  flex: 1;
  min-width: 0;
}
.comments-list .comment-item .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 5px;
}
.comments-list .comment-item .meta a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}
.comments-list .comment-item .meta a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}
.comments-list .comment-item .meta .floor {
  margin-left: 5px;
  color: #ccc;
}

.auth-page {
  display: flex;
  justify-content: center;
  padding-top: 40px;
}
.auth-page .auth-box {
  width: 480px;
}
.auth-page .auth-box .card-title {
  font-size: 16px;
  padding: 10px;
  border-bottom: 1px solid var(--divider-color);
  background-color: #f9f9f9;
  border-radius: var(--radius) var(--radius) 0 0;
}
.auth-page .auth-box .card-body {
  padding: 20px;
}

.user-center-layout {
  display: flex;
  gap: var(--gap);
}

.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.profile-header h1 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 10px;
}

.reply_content {
  background-color: #f9f9f9;
  padding: 10px 15px;
  border-radius: 5px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  position: relative;
  max-height: 120px;
  overflow: hidden;
}
.reply_content::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #f9f9f9;
  z-index: 1;
}
.reply_content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: linear-gradient(to bottom, rgba(249, 249, 249, 0), rgb(249, 249, 249));
  pointer-events: none;
}

.error-message {
  width: 100%;
  max-width: 600px;
  margin: 40px auto;
}
.error-message .error-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
}
.error-message .error-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.error-message .error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
}
.error-message .error-icon.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.error-message .error-icon.info {
  background-color: #e3f2fd;
  color: #1565c0;
  border: 1px solid #bbdefb;
}
.error-message .error-icon.danger {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}
.error-message .error-header.success {
  border-bottom-color: #2e7d32;
}
.error-message .error-header.info {
  border-bottom-color: #1565c0;
}
.error-message .error-header.danger {
  border-bottom-color: #c62828;
}
.error-message .error-content .error-text {
  margin: 0 0 20px 0;
  line-height: 1.6;
  color: var(--text-primary);
  font-size: 14px;
}
.error-message .error-content .error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--divider-color);
}

.error-tips {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.error-tips > div {
  color: #856404;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}
.error-tips > div:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background-color: var(--bg-input);
  border-color: var(--text-secondary);
}

@media (max-width: 768px) {
  .error-message {
    margin: 20px auto;
    max-width: 100%;
  }
  .error-message .error-header {
    padding: 10px 12px;
  }
  .error-message .error-content {
    padding: 16px;
  }
}
.search-container .search-form {
  display: flex;
  gap: 10px;
}
.search-container .search-form input[name=q] {
  flex: 1;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  background-color: var(--bg-body);
  transition: all 0.2s;
}
.search-container .search-form input[name=q]:focus {
  border-color: var(--text-secondary);
  outline: none;
  background-color: var(--bg-card);
}
.search-container .search-form button {
  flex-shrink: 0;
  height: auto;
}

.search-results-info {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-tertiary);
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--divider-color);
}

.search-result-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

body.theme-dark {
  --bg-body: #1a1b1e;
  --bg-card: #25262b;
  --bg-header: #1e1f23;
  --bg-input: #2c2d32;
  --text-primary: #e1e3e5;
  --text-secondary: #a6a7ab;
  --text-tertiary: #6b6d73;
  --border-color: #3a3b3f;
  --divider-color: #333438;
  --link-color: #8c9199;
  --link-hover: #c1c2c5;
  --primary: #5c5f66;
  --primary-hover: #7a7d85;
  --accent: #ff7b4d;
  color-scheme: dark;
  scrollbar-color: #4a4b4f #1a1b1e;
}
body.theme-dark::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body.theme-dark::-webkit-scrollbar-track {
  background: #1a1b1e;
}
body.theme-dark::-webkit-scrollbar-thumb {
  background: #4a4b4f;
  border-radius: 5px;
}
body.theme-dark::-webkit-scrollbar-thumb:hover {
  background: #5a5b5f;
}
body.theme-dark .box {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}
body.theme-dark input[type=text],
body.theme-dark input[type=password],
body.theme-dark input[type=email],
body.theme-dark input[type=url],
body.theme-dark input[type=number],
body.theme-dark input[type=search],
body.theme-dark textarea,
body.theme-dark select {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--border-color);
}
body.theme-dark input[type=text]::placeholder,
body.theme-dark input[type=password]::placeholder,
body.theme-dark input[type=email]::placeholder,
body.theme-dark input[type=url]::placeholder,
body.theme-dark input[type=number]::placeholder,
body.theme-dark input[type=search]::placeholder,
body.theme-dark textarea::placeholder,
body.theme-dark select::placeholder {
  color: var(--text-tertiary);
}
body.theme-dark input[type=text]:focus,
body.theme-dark input[type=password]:focus,
body.theme-dark input[type=email]:focus,
body.theme-dark input[type=url]:focus,
body.theme-dark input[type=number]:focus,
body.theme-dark input[type=search]:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
  border-color: var(--link-hover);
  box-shadow: 0 0 0 2px rgba(140, 145, 153, 0.2);
}
body.theme-dark button,
body.theme-dark .button,
body.theme-dark input[type=submit] {
  background-color: var(--primary);
  color: var(--text-primary);
}
body.theme-dark button:hover,
body.theme-dark .button:hover,
body.theme-dark input[type=submit]:hover {
  background-color: var(--primary-hover);
}
body.theme-dark button.primary,
body.theme-dark .button.primary,
body.theme-dark input[type=submit].primary {
  background-color: #4a9eff;
  color: #ffffff;
}
body.theme-dark button.primary:hover,
body.theme-dark .button.primary:hover,
body.theme-dark input[type=submit].primary:hover {
  background-color: #3d8ae6;
}
body.theme-dark .count-livid {
  background-color: #3a3b3f;
  color: var(--text-primary);
}
body.theme-dark .problem {
  background-color: rgba(220, 53, 69, 0.15);
  color: #ff6b6b;
  border-color: rgba(220, 53, 69, 0.3);
}
body.theme-dark .error-header.success .error-icon {
  color: #51cf66;
}
body.theme-dark .error-header.info .error-icon {
  color: #339af0;
}
body.theme-dark .error-header.danger .error-icon {
  color: #ff6b6b;
}
body.theme-dark .avatar {
  border-color: var(--border-color);
}
body.theme-dark .topics .item-meta .node {
  background-color: rgba(100, 108, 120, 0.2);
  color: var(--text-secondary);
}
body.theme-dark .topics .item-meta .node:hover {
  background-color: rgba(100, 108, 120, 0.3);
}
body.theme-dark .badge-pinned {
  background-color: rgba(255, 123, 77, 0.15);
  color: var(--accent);
}
body.theme-dark .badge-op {
  background-color: rgba(74, 158, 255, 0.15);
  color: #4a9eff;
}
body.theme-dark .floor {
  color: var(--text-tertiary);
}
body.theme-dark code,
body.theme-dark pre {
  background-color: #2c2d32;
  color: #e1e3e5;
  border-color: var(--border-color);
}
body.theme-dark blockquote {
  border-left-color: var(--border-color);
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.02);
}
body.theme-dark ::selection {
  background-color: rgba(74, 158, 255, 0.3);
  color: #ffffff;
}
body.theme-dark a {
  color: var(--link-color);
}
body.theme-dark a:hover {
  color: var(--link-hover);
}
body.theme-dark img {
  opacity: 0.95;
}
body.theme-dark .nodes-grid li a {
  background-color: var(--bg-input);
  color: var(--text-secondary);
}
body.theme-dark .nodes-grid li a:hover {
  background-color: var(--primary);
  color: var(--text-primary);
}
