/* ------------------------------------
 * Typecho Default Theme
 * 配色方案: 医疗级海蓝清新风
 * 主色 #0077BE / 亮冰蓝 #00BFFF / 背景 #F0F8FF
 * 文字 #1D3557 / 跳色 #00B8D4
 * @author  Typecho Team
 * @update  2026-08-03
 * --------------------------------- */

:root {
  --c-primary: #0077BE;
  --c-primary-light: #00BFFF;
  --c-bg: #F0F8FF;
  --c-bg-card: #FFFFFF;
  --c-bg-hover: #E8F4FC;
  --c-text: #1D3557;
  --c-text-muted: #6a9ac0;
  --c-accent: #00B8D4;
  --c-border: #d0e3f7;
  /* 中文优先字体栈：微软雅黑 -> 黑体 -> 宋体 -> 系统默认字体 */
  --c-font: "Microsoft YaHei", "微软雅黑", SimHei, "黑体", SimSun, "宋体",
            system-ui, -apple-system, "Segoe UI", Roboto,
            "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN",
            "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
}

/* ------------------
 * Global style
 * --------------- */
body {
  background-color: #F0F8FF;
  color: #1D3557;
  /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
  font-family: var(--c-font);
  font-size: 87.5%;
}

a {
  color: #0077BE;
  text-decoration: none;
}
a:hover, a:active {
  color: #00BFFF;
}
pre, code {
  background: #E8F4FC;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { padding: 2px 4px; color: #0077BE; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
}
pre code {
  display: block;
  padding: 3px;
  color: #1D3557;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid #00B8D4;
  color: #5a7a9a;
}

table {
  border: 1px solid #d0e3f7;
  width: 100%;
}
table th,
table td {
  padding: 5px 10px;
  border: 1px solid #d0e3f7;
}
table th {
  background: #E8F4FC;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--c-font);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 5px;
  border: 1px solid #d0e3f7;
  width: 100%;

  border-radius: 2px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
}


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

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

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

#header {
  padding-top: 23px;
  padding-bottom: 10px;
  background-color: #0077BE;
  border-bottom: none;
  text-align: center;
  /* 固定在页面顶部，随滚动保持可见 */
  position: sticky;
  top: 0;
  z-index: 1000;
}

#logo {
  color: #FFF;
  font-size: clamp(1.2em, 5vw, 2.5em);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  max-width: 100%;
}
#logo img {
    max-height: 64px;
}

.description {
  margin: .5em 0 0;
  color: rgba(255,255,255,0.8);
  font-style: italic;
}

/* Navigation menu */
#nav-menu {
  margin: 17px 0 0;
  padding: 0;
}
#nav-menu a {
  display: block;
  margin-right: -1px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,0.3);
  border-bottom: none;
  height: 32px;
  line-height: 32px;
  color: #FFF;
  float: left;
}
#nav-menu a:hover,
#nav-menu .current {
  background: rgba(255,255,255,0.15);
  color: #FFF;
}

/* 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: 0;
  border-bottom: 1px solid #d0e3f7;
}
.post-title {
  margin: 10px 0;
  font-size: 1.4em;
}
.post-meta {
  margin-top: -0.5em;
  padding: 0;
  color: #6a9ac0;
  font-size: .92857em;
}
.post-meta li {
  display: inline-block;
  margin: 0 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid #d0e3f7;
}
.post-meta li:first-child {
  margin-left: 0;
  padding-left: 0;
  border: none;
}
.post-content {
  line-height: 1.5;
}
.post .tags {
  clear: both;
}

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

.archive-title {
  margin: 0 0 0;
  padding: 15px 0;
  color: #1D3557;
  font-size: 1.5em;
  font-weight: 700;
  text-align: center;
}
.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: #E8F4FC;
  text-decoration: none;
}

.page-navigator .current a {
  color: #0077BE;
  background: #E8F4FC;
}

/* ------------------
 * Comment list
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #d0e3f7;
}
.comment-list li.comment-level-odd {
  background: #F0F8FF;
}
.comment-list li.comment-level-even {
  background: #FFFFFF;
}
.comment-list li.comment-by-author {
  background: #E8F4FC;
}
.comment-list li .comment-reply {
  text-align: right;
  font-size: .92857em;
}
.comment-meta a {
  color: #6a9ac0;
  font-size: .92857em;
}
.comment-author {
  display: block;
  margin-bottom: 3px;
  color: #1D3557;
}
.comment-author .avatar {
  float: left;
  margin-right: 10px;
}
.comment-author cite {
  font-weight: bold;
  font-style: normal;
}

/* Comment reply */
.comment-list .respond {
  margin-top: 15px;
  border-top: 1px solid #d0e3f7;
}
.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: #C00;
}

/* ------------------
 * secondary
 * --------------- */
#secondary {
  padding-top: 15px;
  word-wrap: break-word;
}
.widget {
  margin-bottom: 30px;
}
.widget-list {
  list-style: none;
  padding: 0;
}
.widget-list li {
  margin: 5px 0;
  line-height: 1.6;
}

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


/* ------------------
 * Footer 
 * --------------- */
#footer {
  padding: 3em 0;
  line-height: 1.5;
  text-align: center;
  color: #6a9ac0;
}


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


/* -----------------
 * Category Masonry (Waterfall)
 *--------------- */
.category-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6a9ac0;
  font-size: 1.1em;
}

/* -----------------
 * Article Card List (WeChat-style)
 *--------------- */
.article-card-list {
  padding: 0;
}

.article-card {
  display: flex;
  align-items: flex-start;
  margin: 0 0 14px;
  padding: 14px;
  background: #FFFFFF;
  border: 1px solid #d0e3f7;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0,119,190,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.article-card:hover {
  box-shadow: 0 4px 14px rgba(0,119,190,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.article-card-thumb {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #E8F4FC;
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-noimg {
  width: 100%;
  height: 100%;
  background: #E8F4FC;
}

.article-card-body {
  flex: 1;
  min-width: 0;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100px;
  padding-top: 0;
}

.article-card-title {
  margin: 0 0 8px;
  font-size: 1.5em;
  font-weight: 600;
  line-height: 1.5;
  color: #1D3557;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-card-desc {
  margin: 0;
  font-size: 1.1em;
  color: #6a7a8a;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 首页竖排分类卡片 */
.category-card-list {
  padding: 10px 0 0;
}

.category-card {
  position: relative;
  display: block;
  height: 240px;
  margin: 0 0 14px;
  background: #FFFFFF;
  border: 1px solid #d0e3f7;
  border-radius: 12px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,119,190,0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
  box-shadow: 0 4px 14px rgba(0,119,190,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

.category-card-thumb {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #E8F4FC;
}

.category-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.category-card:hover .category-card-thumb img {
  transform: scale(1.05);
}

.category-card-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 14px;
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: #FFFFFF;
  background: #0077BE;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .category-card {
    height: 180px;
  }
  .category-card-title {
    font-size: 1.5em;
    padding: 8px 12px;
  }
  /* 手机端：图片顶部对齐、向下铺满，仅裁剪底部(不裁顶部)，随分辨率自适应 */
  .category-card-thumb img {
    object-fit: cover;
    object-position: top center;
  }
}

    width: 80px;
    height: 80px;
  }
  .article-card-body {
    min-height: 80px;
  }
  .article-card-title {
    font-size: 1.3em;
  }
  .article-card-desc {
    font-size: 1em;
  }
}

/* -----------------
 * 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: 768px) {
  .container {
    max-width: 750px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 750px;
  }
}

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


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