/* ------------------------------------
 * Typecho Modern Light Blue Hover Theme
 *
 * @author   Typecho Team / Customized
 * @update   2026
 * --------------------------------- */

/* ------------------
 * Global Style
 * --------------- */
body {
  color: #333;
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  background-color: #f4f5f7; /* 全局浅灰背景 */
  margin: 0;
  padding: 0;
}

a {
  color: #333;
  text-decoration: none;
}
a:hover, a:active {
  color: #1890ff;
}

pre, code { 
  background: #F3F3F3;
  font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
  font-size: .92857em;
}
code { padding: 2px 4px; color: #B94A48; }
pre {
  padding: 8px;
  overflow: auto;
  max-height: 400px;
}
pre code {
  padding: 3px;
  color: #000;
}

blockquote {
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 4px solid #eee;
  color: #000;
}

table {
  border: 1px solid #ddd;
  width: 100%;
}
table th, table td {
  padding: 5px 10px;
  border: 1px solid #eee;
}
table th {
  background: #f3f3f3;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 5px;
  border: 1px solid #999999;
  width: 100%;
  border-radius: 4px;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
}

/* Clearfix */
.fl { float: left; }
.fr { float: right; }
.clearfix { zoom: 1; }
.clearfix:before, .clearfix:after { content: " "; display: table; }
.clearfix:after { clear: both; }

/* 最外层容器 */
.wrap {
  margin: 20px auto;
  box-shadow: none !important;
  background: transparent !important;
}

.post-meta a,
.post-content a,
.widget a,
.comment-content a {
  border-bottom-color: transparent;
}
.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
  border-bottom: 1px solid #5e5e5e;
}

/* ------------------
 * Header (顶栏)
 * --------------- */
#header {
  display: block;
  position: relative;
  background: #ffffff;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
}
.site-name, .site-search {
  margin-top: 10px;
}
.site-search { margin-right: 0px; }

#logo {
  color: #000;
  font-size: 2.2em;
  font-weight: bold;
  margin-left: 5px;
}
#logo img {
  max-height: 64px;
}

.description {
  margin: 5px 10px;
  color: #666;
}

/* 导航菜单 */
#nav-menu {
  margin: 15px 0 0;
  padding: 0;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  display: flex;
}
#nav-menu a {
  display: block;
  margin-right: 0px;
  padding: 10px 18px;
  color: #fff;
  float: left;
  font-weight: bold;
  border-bottom: 0;
  font-size: 15px;
  white-space: nowrap;
}
#nav-menu a:hover,
#nav-menu .current {
  background: #333;
  color: #fff;
}

/* 顶部横幅广告位 */
.site-banner-ads {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.banner-ad-item {
  display: block;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  transition: opacity 0.2s;
}
.banner-ad-item:hover {
  opacity: 0.9;
}
.banner-ad-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* 搜索框 */
#search {
  position: relative;
  margin-top: 5px;
}
#search input {
  padding: 8px 12px;
  border: 2px solid #000000;
  width: 100%;
  border-radius: 30px;
}
#search button {
  position: absolute;
  right: 5px;
  top: 5px;
  border: none;
  padding: 0;
  width: 25px;
  height: 25px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  direction: ltr;
  text-indent: -9999em;
  cursor: pointer;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #search button {
    background-image: url(img/icon-search@2x.png);
    background-size: 24px 24px;
  }
}

/* ------------------
 * Main (PC 端文章列表)
 * --------------- */
#body { margin: 0; overflow: hidden; }
#main {
  padding: 0;
  width: calc(100% - 320px);
  min-width: 300px;
  box-sizing: border-box;
}

/* PC 端文章基础白色卡片 */
.post {
  display: block;
  padding: 18px 20px;
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

/* 保证文章内部包装层透明 */
.post .post-text {
  background: transparent;
}

/* PC 端悬停（Hover）：浅蓝色背景与边框 */
.post:hover {
  background-color: #e6f7ff !important;
  border-color: #91d5ff !important;
}

/* 缩略图 */
.post .fm {
  width: 140px;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 4 / 2.5;
  border: 1px solid #eee;
  position: relative;
  margin-right: 15px;
  float: left;
}
.post .fm img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* 标题 */
.post-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: bold;
  line-height: 24px;
}
h1.post-title {
  font-size: 22px;
}
.post-title a {
  color: #222;
}
.post-title a:hover {
  color: #1890ff;
}

/* 文章详细文本/摘要 */
.post-content {
  line-height: 1.6;
  color: #555;
  font-size: 14px;
}

/* 文章日期左对齐 */
.post-date-meta {
  clear: both;
  text-align: left;
  color: #8c8c8c;
  font-size: 13px;
  margin-top: 10px;
  display: block;
  font-weight: normal;
}

/* 分页导航 */
.page-navigator {
  list-style: none;
  margin: 20px 0 30px;
  padding: 0;
  text-align: center;
}
.page-navigator li {
  display: inline-block;
  margin: 0 2px;
  border-radius: 4px;
  overflow: hidden;
}
.page-navigator a {
  display: inline-block;
  padding: 0 15px;
  height: 35px;
  line-height: 35px;
  font-weight: bold;
  color: #fff;
  background: #000;
}
.page-navigator a:hover {
  background: #1890ff;
  text-decoration: none;
}
.page-navigator .current a {
  color: #fff;
  background: #1890ff;
}

/* ------------------
 * Comment List
 * --------------- */
#comments {
  padding: 20px;
  background: #ffffff;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.comment-list, .comment-list ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-list li {
  padding: 14px;
  margin-top: 10px;
  border: 1px solid #EEE;
  border-radius: 4px;
}

/* ------------------
 * Secondary / Sidebar (侧边栏)
 * --------------- */
#secondary {
  padding: 0;
  word-wrap: break-word;
  width: 300px;
  box-sizing: border-box;
}

.widget, .side-ad-widget {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
  box-sizing: border-box;
  overflow: hidden;
}

.side-ad-link {
  display: block;
  width: 100%;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.side-ad-link:hover {
  transform: translateY(-2px);
}
.side-ad-link img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.widget-title, .relative-title {
  text-transform: uppercase;
  position: relative;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: bold;
}
.widget-list {
  list-style: none;
  padding: 0;
  margin: 5px 0;
}
.widget-list li {
  margin: 5px 0;
  line-height: 1.6;
  border-bottom: 1px dashed #eee;
  padding: 5px 0;
}

/* 侧边栏 3 列标签云网格样式 */
.widget-tags {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid #f0f0f0;
  box-sizing: border-box;
}
.tag-cloud {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.tag-cloud a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  padding: 0 4px !important;
  background-color: #fcfcfc !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 2px !important;
  color: #333333 !important;
  font-size: 12px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}
.tag-cloud a:hover {
  background-color: #e6f7ff !important;
  border-color: #1890ff !important;
  color: #1890ff !important;
}

/* ------------------
 * Footer 
 * --------------- */
#footer {
  margin-top: 20px;
}
.copyright {
  padding: 15px;
  background: #2a2a2a;
  border-radius: 8px;
  color: #aaa;
  text-align: center;
  font-size: 13px;
}
.copyright a {
  color: #ccc;
}

/* ----------------------------------
 * 移动端适配 (屏宽 < 768px)
 * 极简紧凑流：纯白背景、无卡片边框、仅保留标题与图片
 * ------------------------------- */
@media (max-width: 767px) {
  
  /* 1. 铺满屏幕，全局背景纯白 */
  body {
    background-color: #ffffff !important;
  }
  .wrap, #main, #secondary {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 2. 顶栏铺满 */
  #header {
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    box-shadow: none !important;
    padding: 10px 15px !important;
    margin-bottom: 0 !important;
  }

  /* 3. 文章卡片改为无边框极简横向 Flex 布局 */
  .post {
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #f0f0f0 !important; /* 仅保留底部分割线 */
    box-shadow: none !important;
    padding: 12px 15px !important;
    margin-bottom: 0 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: row-reverse !important; /* 插图右置，文字左置 */
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* 4. 缩略图固定靠右 */
  .post .fm {
    float: none !important;
    width: 100px !important;
    min-width: 100px !important;
    height: 70px !important;
    margin: 0 0 0 12px !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
    border: none !important;
  }
  .post .fm img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  /* 5. 左侧文字区域与标题 */
  .post .post-text {
    flex: 1 !important;
    width: auto !important;
  }
  .post-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    font-weight: 600 !important;
  }

  /* 6. 隐藏详细文本/摘要内容 */
  .post-content,
  .post p,
  .post-excerpt {
    display: none !important;
  }

  /* 7. 手机端日期控制 */
  .post-date-meta {
    margin-top: 6px !important;
    font-size: 12px !important;
    color: #999999 !important;
  }

  /* 8. 广告通栏 */
  .site-banner-ads, .banner-ad-item {
    border-radius: 0 !important;
    margin: 0 !important;
  }
}

@media (min-width: 1200px) {
  .container { max-width: 1100px; }
}

.hidden { display: none !important; visibility: hidden; }
.sr-only { border: 0; height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }