/* ------------------------------------
 * Typecho Default Theme - TDBeta Style
 *
 * Color Scheme (matching homepage):
 *   primary:  #1985DB
 *   secondary:#4080FF
 *   neutral:  #F5F7FA
 *   dark:     #1D2129
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  background-color: #FFFFFF;
  color: #1D2129;
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei", "Microsoft Yahei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #1985DB;
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover, a:active {
  color: #4080FF;
}

pre, code {
  background: #F5F7FA;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .875em;
  border-radius: 6px;
}
code {
  padding: 2px 6px;
  color: #E53E3E;
}
pre {
  padding: 16px;
  overflow: auto;
  max-height: 400px;
  border-radius: 8px;
}
pre code {
  display: block;
  padding: 12px;
  color: #1D2129;
  background: transparent;
}

blockquote {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 4px solid #1985DB;
  background: #F5F7FA;
  border-radius: 0 8px 8px 0;
  color: #6B7280;
}

table {
  border: 1px solid #E5E7EB;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border-collapse: collapse;
}
table th,
table td {
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
}
table th {
  background: #F5F7FA;
  font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei", "Microsoft Yahei", sans-serif;
  color: #1D2129;
  font-weight: 600;
  line-height: 1.3;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  background: #FFFFFF;
  color: #1D2129;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #1985DB;
  box-shadow: 0 0 0 3px rgba(25, 133, 219, 0.1);
}
textarea {
  resize: vertical;
}


/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid rgba(25, 133, 219, 0.2);
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: #1985DB;
}

/* ------------------
 * Header
 * --------------- */

#header {
  background: #FFFFFF;
  padding: 16px 0;
  border-bottom: 1px solid #E5E7EB;
  position: sticky;
  top: 0;
  z-index: 100;
}

#header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

#logo {
  color: #1D2129;
  font-size: 1.5em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
#logo img {
  max-height: 40px;
}

.description {
  margin: 0;
  color: #6B7280;
  font-size: 0.85em;
}

/* Navigation menu */
#nav-menu {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
#nav-menu a {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  height: auto;
  line-height: 1.5;
  color: rgba(29, 33, 41, 0.7);
  float: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.3s, background-color 0.3s;
}
#nav-menu a:hover,
#nav-menu .current {
  color: #1985DB;
  background: #F5F7FA;
}

/* Search */
#search {
  position: relative;
  margin: 0;
}
#search input {
  padding-right: 40px;
  border-radius: 8px;
  background: #F5F7FA;
  border: 1px solid transparent;
  font-size: 14px;
}
#search input:focus {
  background: #FFFFFF;
  border-color: #1985DB;
}
#search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  padding: 0;
  width: 20px;
  height: 20px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  background-size: 20px 20px;
  cursor: pointer;
  direction: ltr;
  text-indent: -9999em;
  opacity: 0.5;
  transition: opacity 0.2s;
}
#search button:hover {
  opacity: 0.8;
}

@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
  }
}


/* ------------------
 * Main
 * --------------- */

#body {
  padding: 40px 0 60px;
}

.post {
  background: #FFFFFF;
  padding: 28px 32px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s;
}
.post:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}
.post-title {
  margin: 0 0 12px;
  font-size: 1.5em;
  line-height: 1.4;
}
.post-title a {
  color: #1D2129;
  border-bottom: none;
}
.post-title a:hover {
  color: #1985DB;
}
.post-meta {
  margin: 0 0 16px;
  padding: 0;
  color: #6B7280;
  font-size: 0.85em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.post-meta li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: none;
}
.post-meta li + li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #D1D5DB;
  margin-right: 4px;
}
.post-content {
  line-height: 1.75;
  color: #374151;
}
.post .tags {
  clear: both;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #F3F4F6;
}

.post-near {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  color: #6B7280;
  font-size: 0.9em;
}
.post-near li {
  margin: 8px 0;
  padding: 10px 16px;
  background: #F5F7FA;
  border-radius: 8px;
}

.archive-title {
  margin: 0 0 16px;
  padding: 0;
  color: #6B7280;
  font-size: 1em;
  font-weight: 500;
}
.more {
  text-align: center;
}
.more a {
  border: none;
}
.protected .text {
  width: 50%;
}

/* Page nav */
.page-navigator {
  list-style: none;
  margin: 32px 0;
  padding: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.page-navigator li {
  display: inline-block;
  margin: 0;
}
.page-navigator a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  height: 36px;
  line-height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  border: 1px solid #E5E7EB;
  transition: all 0.2s;
}
.page-navigator a:hover {
  background: #F5F7FA;
  color: #1985DB;
  border-color: #1985DB;
  text-decoration: none;
}
.page-navigator .current a {
  color: #FFFFFF;
  background: #1985DB;
  border-color: #1985DB;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 24px;
}
#comments h3 {
  font-size: 1.1em;
  margin-bottom: 16px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 16px;
  margin-top: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  background: #FFFFFF;
}
.comment-list li.comment-level-odd {
  background: #F5F7FA;
}
.comment-list li.comment-level-even {
  background: #FFFFFF;
}
.comment-list li.comment-by-author {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: 0.85em;
}
.comment-meta a {
  color: #6B7280;
  font-size: 0.85em;
}
.comment-author {
  display: block;
  margin-bottom: 6px;
  color: #1D2129;
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
  border-radius: 50%;
}
.comment-author cite {
  font-weight: 600;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #E5E7EB;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 16px;
  font-size: 0.85em;
}
#comment-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9em;
}
#comment-form .required:after {
  content: " *";
  color: #EF4444;
}
#comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #1985DB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
#comment-form .submit:hover {
  background: #4080FF;
}
#comment-form .submit:active {
  transform: scale(0.97);
}

/* ------------------
 * Sidebar / Secondary
 * --------------- */
#secondary {
  padding-top: 0;
  word-wrap: break-word;
}
.widget {
  background: #FFFFFF;
  margin-bottom: 20px;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
}
.widget-title {
  font-size: 1em;
  font-weight: 600;
  color: #1D2129;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1985DB;
}
.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget-list li {
  margin: 0;
  line-height: 1.6;
}
.widget-list li a {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: #6B7280;
  border-bottom: none;
  transition: color 0.2s, background-color 0.2s;
}
.widget-list li a:hover {
  color: #1985DB;
  background: #F5F7FA;
}
.widget-list li ul {
  margin-left: 12px;
}


/* ------------------
 * Footer
 * --------------- */
#footer {
  padding: 24px 0;
  line-height: 1.6;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
  background-color: #F5F7FA;
  border-top: 1px solid #E5E7EB;
}
#footer a {
  color: #9CA3AF;
  border-bottom: none;
  transition: color 0.3s;
}
#footer a:hover {
  color: #1985DB;
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  text-align: center;
  margin: 80px 0;
}
.error-page h2 {
  font-size: 2em;
  margin-bottom: 16px;
  color: #6B7280;
}
.error-page p {
  margin-bottom: 24px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.75;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.3em;
  margin: 1.5em 0 0.5em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
  border-radius: 8px;
}
.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: none;
  border-top: 2px solid #E5E7EB;
}

.post-content p, .comment-content p {
  margin: 1em 0;
}
.post-content ul, .post-content ol,
.comment-content ul, .comment-content ol {
  padding-left: 1.5em;
}
.post-content li, .comment-content li {
  margin: 0.4em 0;
}


/* -----------------
 * Submit button global
 *--------------- */
button.submit,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: #1985DB;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
button.submit:hover,
input[type="submit"]:hover {
  background: #4080FF;
}
button.submit:active,
input[type="submit"]:active {
  transform: scale(0.97);
}


/* -----------------
 * Misc
 *--------------- */
.aligncenter, div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.alignleft {
  float: left;
}
.alignright {
  float: right;
}
img.alignleft {
  margin: 0 16px 0 0;
  border-radius: 8px;
}
img.alignright {
  margin: 0 0 0 16px;
  border-radius: 8px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 14px;
  }
  #header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  #nav-menu {
    flex-wrap: wrap;
  }
  #nav-menu a {
    padding: 6px 12px;
  }
  .post {
    padding: 20px;
    border-radius: 10px;
  }
  .post-title {
    font-size: 1.25em;
  }
  .widget {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
  #header .container {
    align-items: center;
  }
  #nav-menu {
    justify-content: center;
  }
  .post-meta {
    justify-content: center;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 960px;
  }
}


/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
  display: none !important;
  visibility: hidden;
}

/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
}

/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
  visibility: hidden;
}
