/* ------------------------------------
 * Typecho Theme for Buddhist Scripture Reading
 *
 * @author  Typecho Team, modified by Grok for xAI
 * @link  http://typecho.org/
 * @update  2025-09-15
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
body {
  background: linear-gradient(to bottom, #FFF8E7 0%, #F4E4BC 100%);
  color: #4A4A4A;
  font-family: "Noto Serif CJK SC", "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  line-height: 1.8;
  letter-spacing: 1.8px;
}

a {
  color: #8B6F47;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:active {
  color: #6B4E31;
}

pre,
code {
  background: #F9F2E7;
  font-family: "Noto Sans Mono CJK SC", "Source Code Pro", monospace;
  font-size: 0.95rem;
}

code {
  padding: 3px 6px;
  color: #8B6F47;
}

pre {
  padding: 12px;
  overflow: auto;
  max-height: 500px;
  border-left: 3px solid #E8DDB5;
}

pre code {
  padding: 0;
  color: #4A4A4A;
}

blockquote {
  margin: 1.5em 0;
  padding: 1em 1.5em;
  border-left: 3px solid #E8DDB5;
  color: #5A5A5A;
  background: #FFF8E7;
}

table {
  border: 1px solid #E8DDB5;
  width: 100%;
}

table th,
table td {
  padding: 8px 12px;
  border: 1px solid #E8DDB5;
}

table th {
  background: #F9F2E7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Lora", "Noto Serif CJK SC", "Helvetica Neue", Arial, sans-serif;
  color: #4A4A4A;
  margin: 1.2em 0 0.8em;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 8px;
  border: 1px solid #E8DDB5;
  width: 100%;
  border-radius: 4px;
  box-sizing: border-box;
  background: #FFF;
}

textarea {
  resize: vertical;
}

/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid #E8DDB5;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */
#header {
  padding-top: 2rem;
  border-bottom: 1px solid #E8DDB5;
  background: #FFF8E7;
}

#logo {
  color: #4A4A4A;
  font-size: 2.8rem;
  font-weight: 500;
}

#logo img {
  max-height: 72px;
}

.description {
  margin: 0.8em 0 0;
  color: #6B4E31;
  font-style: normal;
  font-size: 1rem;
}

/* Navigation menu */
#nav-menu {
  margin: 1.5rem 0 0;
  padding: 0;
}

#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 25px;
  border: 1px solid #E8DDB5;
  border-bottom: none;
  height: 36px;
  line-height: 36px;
  color: #4A4A4A;
  float: left;
}

#nav-menu a:hover,
#nav-menu .current {
  background: #F9F2E7;
}

/* Search */
#search {
  position: relative;
  margin-top: 20px;
}

#search input {
  padding-right: 35px;
}

#search button {
  position: absolute;
  right: 6px;
  top: 4px;
  border: none;
  padding: 0;
  width: 28px;
  height: 28px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  text-indent: -9999em;
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
    background-size: 28px 28px;
  }
}

/* ------------------
 * Main
 * --------------- */
.post {
  padding: 20px 0 25px;
  border-bottom: 1px solid #E8DDB5;
}

.post-title {
  margin: 1em 0;
  font-size: 1.6rem;
  font-weight: 500;
}

.post-meta {
  margin-top: -0.8em;
  padding: 0;
  color: #6B4E31;
  font-size: 0.95rem;
}

.post-meta li {
  display: inline-block;
  margin: 0 10px 0 0;
  padding-left: 15px;
  border-left: 1px solid #E8DDB5;
}

.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}

.post .tags {
  clear: both;
}

.post-near {
  color: #6B4E31;
}

.text-end {
  text-align: end;
}

.archive-title {
  margin: 1.5em 0 -1.2em;
  padding-top: 25px;
  color: #6B4E31;
  font-size: 1.1rem;
}

.more {
  text-align: center;
}

.more a {
  border: none;
}

.protected .text {
  width: 60%;
}

/* Page nav */
.page-navigator {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  text-align: center;
}

.page-navigator li {
  display: inline-block;
  margin: 0 6px;
}

.page-navigator a {
  display: inline-block;
  padding: 0 12px;
  height: 34px;
  line-height: 34px;
}

.page-navigator a:hover {
  background: #F9F2E7;
  text-decoration: none;
}

.page-navigator .current a {
  color: #4A4A4A;
  background: #F9F2E7;
}

/* ------------------
 * Comment list
 * --------------- */
.comment-list,
.comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list li {
  padding: 16px;
  margin-top: 12px;
  border: 1px solid #E8DDB5;
}

.comment-list li.comment-level-odd {
  background: #FFF8E7;
}

.comment-list li.comment-level-even {
  background: #FFF;
}

.comment-list li.comment-by-author {
  background: #F4E4BC;
}

.comment-list li .comment-reply {
  text-align: right;
  font-size: 0.95rem;
}

.comment-meta a {
  color: #6B4E31;
  font-size: 0.95rem;
}

.comment-author {
  display: block;
  margin-bottom: 5px;
  color: #4A4A4A;
}

.comment-author .avatar {
  float: left;
  margin-right: 12px;
}

.comment-author cite {
  font-weight: bold;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 20px;
  border-top: 1px solid #E8DDB5;
}

.respond .cancel-comment-reply {
  float: right;
  margin-top: 20px;
  font-size: 0.95rem;
}

#comment-form label {
  display: block;
  margin-bottom: 0.6em;
  font-weight: bold;
}

#comment-form .required:after {
  content: " *";
  color: #8B6F47;
}

/* ------------------
 * Secondary
 * --------------- */
#secondary {
  padding-top: 20px;
  word-wrap: break-word;
}

.widget {
  margin-bottom: 35px;
}

.widget-list {
  list-style: none;
  padding: 0;
}

.widget-list li {
  margin: 8px 0;
  line-height: 1.8;
}

.widget-list li ul {
  margin-left: 20px;
}

/* ------------------
 * Footer 
 * --------------- */
#footer {
  margin-top: 2rem;
  padding: 4em 0;
  line-height: 1.8;
  text-align: center;
  color: #6B4E31;
  border-top: 1px solid #E8DDB5;
  background: #FFF8E7;
}

/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 120px;
  margin-bottom: 120px;
}

/* -----------------
 * Content format
 *--------------- */
.post-content,
.comment-content {
  line-height: 2;
  word-wrap: break-word;
}

.post-content h2,
.comment-content h2 {
  font-size: 1.4rem;
}

.post-content img,
.comment-content img,
.post-content video,
.comment-content video {
  max-width: 100%;
}

.post-content p img {
  border: 1px solid #E8DDB5;
}

.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;
}

.post-content hr,
.comment-content hr {
  margin: 2.5em auto;
  width: 120px;
  border: 1px solid #E8DDB5;
  border-width: 2px 0 0 0;
}

/* -----------------
 * Misc
 *--------------- */
.aligncenter,
div.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
}

.alignright {
  float: right;
}

img.alignleft {
  margin: 0 20px 0 0;
}

img.alignright {
  margin: 0 0 0 20px;
}

/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 1rem;
  }

  #nav-menu a {
    float: none;
    display: inline-block;
    margin: 0 -2px;
  }

  .post-title {
    font-size: 1.4rem;
  }

  .post-content,
  .comment-content {
    line-height: 1.9;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
}

/*
* 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;
}

.container-md {
  width: auto !important;
}