/* ------------------------------------
 * Typecho Default Theme
 *
 * @author  Typecho Team
 * @link  http: //typecho.org/
 * @update  2013-10-28
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
body {
  background-color: #f7f3e8;
  color: #444;
  /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
  font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei","Microsoft Yahei", serif;
  font-size: 87.5%;
}

a {
  color: #8b2e1f;
  text-decoration: none;
}
a:hover, a:active {
  color: #6b1f12;
}
pre, code { 
  background: #ede8d8;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { padding: 2px 4px; color: #8b2e1f; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
  border-radius: 8px;
}
pre code {
  padding: 3px;
  color: #3a3a3a;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid #d4c5a9;
  color: #5a4a38;
  background: #f5f0e3;
  border-radius: 0 8px 8px 0;
  padding: 12px 1.5em;
}

table {
  border: 1px solid #d4c5a9;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}
table th,
table td {
  padding: 8px 12px;
  border: 1px solid #e0d8c8;
}
table th {
  background: #ede8d8;
  font-weight: 600;
  color: #3a3a3a;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 8px 12px;
  border: 1px solid #d4c5a9;
  width: 100%;
  background: #faf6ed;
  border-radius: 8px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  color: #3a3a3a;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #8b2e1f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 46, 31, 0.1);
}
textarea {
  resize: vertical;
}


/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom: 1px solid #e0d8c8;
}

.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Header
 * --------------- */

#header {
  padding-top: 35px;
  border-bottom: 1px solid #e0d8c8;
}

#logo {
  color: #333;
  font-size: 2.5em;
}
#logo img {
    max-height: 64px;
}

.description {
  margin: .5em 0 0;
  color: #4a4a4a;
  font-style: italic;
}

/* Navigation menu */
#nav-menu {
  margin: 25px 0 0;
  padding: 0;
}
#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 20px;
  border: 1px solid #EEE;
  border-bottom: none;
  height: 32px;
  line-height: 32px;
  color: #444;
  float: left;
}
#nav-menu a:hover,
#nav-menu .current {
  background: #F6F6F6;
}

/* 首页按钮 - 朱红底色白字国风配色 */
#nav-menu a.nav-home {
  background: #a63d2f;
  border-color: #a63d2f;
  color: #ffffff;
  font-weight: 600;
}
#nav-menu a.nav-home:hover,
#nav-menu a.nav-home.current {
  background: #8b2e1f;
  border-color: #8b2e1f;
  color: #ffffff;
}

/* 关于按钮 - 靛蓝底色白字国风配色 */
#nav-menu a.nav-about {
  background: #2d5a7c;
  border-color: #2d5a7c;
  color: #ffffff;
  font-weight: 600;
}
#nav-menu a.nav-about:hover,
#nav-menu a.nav-about.current {
  background: #1a4060;
  border-color: #1a4060;
  color: #ffffff;
}

/* Search */
#search {
  position: relative;
  margin-top: 15px;
}
#search input {
  padding-right: 30px;
}
#search button {
  position: absolute;
  right: 4px;
  top: 2px;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  direction: ltr; /* fix RTL language */
  text-indent: -9999em;
}

@media 
(-webkit-min-device-pixel-ratio: 2), 
(min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
    -webkit-background-size: 24px 24px;
    -moz-background-size: 24px 24px;
    -o-background-size: 24px 24px;
    background-size: 24px 24px;
  }
}


/* ------------------
 * Main
 * --------------- */

.post {
  padding: 15px 0 20px;
  border-bottom: 1px solid #e0d8c8;
}
.post-title {
  margin: .83em 0;
  font-size: 1.6em;
  font-weight: 600;
  color: #1a1a1a;
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  letter-spacing: 1px;
}
.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: #8a7a68;
  font-size: .92857em;
}
.post-meta li {
  display: inline-block;
  margin: 0 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid #e0d8c8;
}
.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}
.post-content {
  line-height: 1.8;
  color: #3a3a3a;
}
.post .tags {
  clear: both;
}

.post-near {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  color: #8a7a68;
}
.post-near li {
  margin: 10px 0;
}

.archive-title {
  margin: 1em 0 -1em;
  padding-top: 20px;
  color: #8a7a68;
  font-size: 1em;
}
.more {
  text-align: center;
}
.more a {
  border: none;
}
.protected .text {
  width: 50%;
}

/* Page nav */

.page-navigator {
  list-style: none;
  margin: 25px 0;
  padding: 0;
  text-align: center;
}
.page-navigator li {
  display: inline-block;
  margin: 0 4px;
}
.page-navigator a {
  display: inline-block;
  padding: 0 10px;
  height: 30px;
  line-height: 30px;
}
.page-navigator a:hover {
  background: #EEE;
  text-decoration: none;
}

.page-navigator .current a {
  color: #444;
  background: #EEE;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 16px;
  margin-top: 12px;
  border: 1px solid #e0d8c8;
  border-radius: 12px;
}
.comment-list li.comment-level-odd {
  background: #f5f0e3;
}
.comment-list li.comment-level-even {
  background: #faf6ed;
}
.comment-list li.comment-by-author {
  background: #f0e8d6;
  border-color: #d4c5a9;
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
}
.comment-meta a {
  color: #8a7a68;
  font-size: .92857em;
}
.comment-author {
  display: block;
  margin-bottom: 3px;
  color: #3a3a3a;
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
  border-radius: 50%;
}
.comment-author cite {
  font-weight: bold;
  font-style: normal;
  color: #1a1a1a;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 15px;
  border-top: 1px solid #e0d8c8;
}
.respond .cancel-comment-reply {
  float: right;
  margin-top: 15px;
  font-size: .92857em;
}
#comment-form label {
  display: block;
  margin-bottom: .5em;
  font-weight: bold;
}
#comment-form .required:after {
  content: " *";
  color: #8b2e1f;
}

/* 按钮样式 */
input[type="submit"],
button[type="submit"],
.btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #8b2e1f 0%, #a64835 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(139, 46, 31, 0.2);
}
input[type="submit"]:hover,
button[type="submit"]:hover,
.btn:hover {
  background: linear-gradient(135deg, #6b1f12 0%, #8b2e1f 100%);
  box-shadow: 0 4px 12px rgba(139, 46, 31, 0.3);
  transform: translateY(-1px);
}
input[type="submit"]:active,
button[type="submit"]:active,
.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(139, 46, 31, 0.2);
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #faf6ed 0%, #f5f0e3 100%);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.widget-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #d4c5a9;
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
}
.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget-list li {
  margin: 8px 0;
  line-height: 1.6;
  padding: 6px 0;
  border-bottom: 1px dashed #e0d8c8;
}
.widget-list li:last-child {
  border-bottom: none;
}
.widget-list li a {
  color: #5a4a38;
  transition: color 0.2s;
}
.widget-list li a:hover {
  color: #8b2e1f;
}

.widget-list li ul {
  margin-left: 15px;
  margin-top: 5px;
}


/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 2em 0;
  line-height: 1.5;
  text-align: center;
  color: #8a7a68;
  font-size: 0.85em;
  border-top: 1px solid #e0d8c8;
}

#footer .footer-content {
  max-width: 100%;
  padding: 0 15px;
  word-wrap: break-word;
}

#footer a {
  color: #8a7a68;
  text-decoration: none;
  border-bottom: none;
}

#footer a:hover {
  color: #5a4a38;
}


/* -----------------
 * Error page
 * -------------- */
.error-page {
  margin-top: 100px;
  margin-bottom: 100px;
}


/* -----------------
 * Content format
 *--------------- */
.post-content, .comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
  font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
  max-width: 100%;
}
.post-content a img,
.comment-content a img {
  background: #FFF;
  position: relative;
  bottom: -4px;  /* hidden img parent link border  */
}
.post-content hr, .comment-content hr {
  margin: 2em auto;
  width: 100px;
  border: 1px solid #E9E9E9;
  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 15px 0 0;
}
img.alignright {
  margin: 0 0 0 15px;
}


/* -----------------
 * Responsive
 *--------------- */
@media (max-width: 767px) {
  body {
    font-size: 81.25%;
  }
  #nav-menu a {
    float: none;
    display: inline-block;
    margin: 0 -2px;
  }
}

@media (max-width: 768px) {
  #header,
  .post-title,
  .post-meta {
    text-align: center;
  }
}

@media (min-width: 992px) {

}

@media (min-width: 1200px) {
  .container {
    max-width: 952px;
  }
}


/*
* 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; }

/* -----------------
 * Category Grid (首页分类卡片 - 中式古典风格)
 *--------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.category-card {
  display: block;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  min-height: 220px;
  padding: 32px 24px 28px;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-bottom: none;
}

/* 纸质纹理 */
.category-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.35;
  z-index: 1;
}

.category-card .inner {
  position: relative;
  z-index: 2;
}

.category-card .title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  letter-spacing: 1px;
}

.category-card .desc {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.category-card .count {
  display: inline-block;
  font-size: 12px;
  opacity: 0.6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 装饰图案 */
.category-card .pattern {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 160px;
  height: 160px;
  opacity: 0.08;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
}

/* 印章 */
.category-card .seal {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 1px solid;
  border-radius: 4px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "SimSun", serif;
  letter-spacing: 2px;
  transform: rotate(2deg);
  z-index: 3;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .category-card {
    min-height: 180px;
    padding: 24px 20px;
  }
  
  .category-card .title {
    font-size: 18px;
  }
  
  .category-card .desc {
    font-size: 12px;
  }
  
  .category-card .pattern {
    width: 120px;
    height: 120px;
  }
}

/* -----------------
 * Post Grid (文章卡片列表 - 国风风格)
 *--------------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #faf6ed 0%, #f5f0e3 100%);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  border-bottom: none;
  padding: 20px;
  box-sizing: border-box;
  min-height: 380px;
}

/* 纸质纹理 */
.post-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.3;
  z-index: 1;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-bottom: none;
}

.post-card .post-title {
  margin: 0 0 16px;
  font-size: 18px;
  color: #1a1a1a;
  line-height: 1.5;
  font-weight: 600;
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  letter-spacing: 0.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 2;
  text-align: center;
}

.post-card .post-cover {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #ede8d8;
  position: relative;
  z-index: 2;
  border-radius: 8px;
  margin-bottom: 16px;
}

.post-card .post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-cover img {
  transform: scale(1.05);
}

.post-card .post-excerpt {
  margin: 0 0 16px;
  color: #5a4a38;
  font-size: 13px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 2;
  flex-grow: 1;
  text-align: justify;
}

.post-card .post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  font-size: 12px;
  color: #8a7a68;
  position: relative;
  z-index: 2;
  padding-top: 12px;
  border-top: 1px dashed #d4c5a9;
}

.post-card .post-meta time {
  color: #8a7a68;
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
  letter-spacing: 1px;
}

/* -----------------
 * Post Cover Large (文章详情页封面)
 *--------------- */
.post-cover-large {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.post-cover-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -----------------
 * Audio Player (音频播放器 - 国风配色)
 *--------------- */
.audio-player {
  margin: 20px 0;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f5f0e3 0%, #ede8d8 100%);
  border: 1px solid #d4c5a9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(139, 46, 31, 0.08);
  position: relative;
}

/* 播放器左侧装饰线 */
.audio-player::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: linear-gradient(180deg, #a63d2f 0%, #2d5a7c 100%);
  border-radius: 0 4px 4px 0;
}

.audio-player audio {
  width: 100%;
  margin-left: 8px;
}

/* 音频播放器控件样式覆盖 */
.audio-player audio::-webkit-media-controls-panel {
  background: #f5f0e3;
}

.audio-player audio::-webkit-media-controls-current-time-display,
.audio-player audio::-webkit-media-controls-time-remaining-display {
  color: #5a4a38;
  font-family: "Songti SC", "SimSun", serif;
}

/* -----------------
 * Responsive adjustments
 *--------------- */
@media (max-width: 768px) {
  .category-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------
 * About Page (关于页面)
 *--------------- */
.page-about {
  max-width: 720px;
  margin: 30px auto;
  padding: 0;
}

.page-about .page-content {
  background: #faf8f3;
  padding: 40px 50px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  line-height: 2;
  color: #5a5a5a;
  font-size: 1.05em;
  letter-spacing: 0.5px;
}

.page-about .page-content p {
  margin-bottom: 1.5em;
  text-align: justify;
}

.page-about .page-content p:last-child {
  margin-bottom: 0;
}

.page-about .page-content h1,
.page-about .page-content h2,
.page-about .page-content h3 {
  color: #4a4a4a;
  margin: 1.5em 0 0.8em;
  font-weight: 500;
}

.page-about .page-content h1 {
  font-size: 1.6em;
  text-align: center;
  margin-bottom: 1em;
}

.page-about .page-content h2 {
  font-size: 1.3em;
}

.page-about .page-content h3 {
  font-size: 1.1em;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .page-about {
    margin: 20px auto;
  }
  
  .page-about .page-content {
    padding: 25px 20px;
    font-size: 1em;
    line-height: 1.9;
  }
}

/* ============================================
 * 跨浏览器兼容性修复
 * 针对微信 X5 内核、百度浏览器等老旧内核
 * ============================================ */

/* -----------------
 * 全局图片自适应规则
 *--------------- */
img {
  max-width: 100%;
  height: auto;
  -ms-interpolation-mode: bicubic; /* IE 图片缩放优化 */
}

/* 文章内容图片强制自适应 */
.post-content img,
.comment-content img,
.page-content img,
.widget img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
  margin: 10px auto;
}

/* 防止图片溢出容器 */
.post-content,
.comment-content,
.page-content {
  overflow-x: hidden;
}

/* -----------------
 * CSS Grid Fallback (微信 X5 兼容)
 * 使用 float 布局作为降级方案
 *--------------- */

/* 检测不支持 Grid 的浏览器，使用 float 布局 */
@supports not (display: grid) {
  .category-grid,
  .post-grid {
    display: block;
    margin: 20px -10px;
  }
  
  .category-grid::after,
  .post-grid::after {
    content: "";
    display: table;
    clear: both;
  }
  
  .category-card,
  .post-card {
    float: left;
    width: calc(50% - 20px);
    margin: 10px;
    box-sizing: border-box;
  }
  
  /* 移动端单列 */
  @media (max-width: 768px) {
    .category-card,
    .post-card {
      float: none;
      width: 100%;
      margin: 10px 0;
    }
  }
}

/* -----------------
 * Flexbox 兼容性前缀
 *--------------- */
.post-card {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
  flex-direction: column;
}

.post-card .post-meta {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
}

/* -----------------
 * Border Radius 兼容性
 *--------------- */
.category-card,
.post-card,
.post-cover-large,
.audio-player,
.page-about .page-content {
  -webkit-border-radius: 8px;
  -moz-border-radius: 8px;
  -ms-border-radius: 8px;
  -o-border-radius: 8px;
  border-radius: 8px;
}

/* -----------------
 * Box Shadow 兼容性
 *--------------- */
.category-card,
.post-card {
  -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  -moz-box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  -ms-box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  -o-box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.category-card:hover,
.post-card:hover {
  -webkit-box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  -moz-box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  -ms-box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  -o-box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* -----------------
 * Transition 兼容性
 *--------------- */
.category-card,
.post-card,
.category-cover img,
.post-card .post-cover img {
  -webkit-transition: all 0.2s ease;
  -moz-transition: all 0.2s ease;
  -ms-transition: all 0.2s ease;
  -o-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

/* -----------------
 * Transform 兼容性
 *--------------- */
.category-card:hover,
.post-card:hover {
  -webkit-transform: translateY(-4px);
  -moz-transform: translateY(-4px);
  -ms-transform: translateY(-4px);
  -o-transform: translateY(-4px);
  transform: translateY(-4px);
}

.category-card:hover .category-cover img,
.post-card:hover .post-cover img {
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  -ms-transform: scale(1.05);
  -o-transform: scale(1.05);
  transform: scale(1.05);
}

/* -----------------
 * Object-fit Fallback (微信 X5 不支持)
 * 使用 background-image 模拟 cover 效果
 *--------------- */
@supports not (object-fit: cover) {
  .category-cover,
  .post-card .post-cover,
  .post-cover-large {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  
  .category-cover img,
  .post-card .post-cover img,
  .post-cover-large img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 对于完全不支持的浏览器，图片会被裁剪但不会变形 */
  }
}

/* -----------------
 * Line Clamp 兼容性 (多行文本截断)
 *--------------- */
.post-card .post-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3.2em;
  line-height: 1.6;
}

.post-card .post-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.8em;
  line-height: 1.8;
}

/* -----------------
 * 微信浏览器特殊修复
 *--------------- */

/* 修复微信中 input 默认样式 */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-border-radius: 2px;
  border-radius: 2px;
}

/* 修复微信中按钮样式 */
button,
input[type="submit"],
.btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* 修复微信中长文本换行 */
body {
  word-wrap: break-word;
  word-break: break-word;
  -webkit-overflow-scrolling: touch;
}

/* -----------------
 * 响应式增强
 *--------------- */

/* 小屏手机 */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  .category-grid,
  .post-grid {
    margin: 10px 0;
  }
  
  .category-card,
  .post-card {
    margin-bottom: 15px;
  }
  
  .post-card {
    min-height: 320px;
    padding: 16px;
  }
  
  .post-card .post-cover {
    height: 140px;
  }
  
  .post-card .post-title {
    font-size: 16px;
  }
  
  .category-cover {
    height: 140px;
  }
}

/* 平板横屏 */
@media (min-width: 769px) and (max-width: 1024px) {
  .category-grid,
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -----------------
 * 打印样式优化
 *--------------- */
@media print {
  .category-card,
  .post-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
}
