/* ------------------------------------
 * Typecho Default Theme - 小菜云配色
 * @author  Typecho Team
 * @link  http://typecho.org/
 * @update  2026-10-02
 * --------------------------------- */

/* ------------------
 * Global style
 * --------------- */
:root {
  --bg-page: #f7f9fc;
  --bg-card: #ffffff;
  --border-light: #e8edf4;
  --text-primary: #1a2233;
  --text-secondary: #5a6a80;
  --text-muted: #8896a8;
  --accent: #3b6fe0;
  --accent-soft: #eaf1ff;
  --gradient: linear-gradient(135deg, #3b6fe0, #6b5ce0);
  --shadow-sm: 0 2px 8px rgba(26, 34, 51, 0.05);
  --shadow-md: 0 8px 24px rgba(26, 34, 51, 0.08);
}

* { box-sizing: border-box; }

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}

a { color: var(--accent); text-decoration: none; transition: color 0.25s; }
a:hover, a:active { color: #1a56c9; }

pre, code {
  background: #f0f3f9;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.88em;
  border-radius: 6px;
}
code { padding: 2px 6px; color: #d6336c; }
pre { padding: 12px 16px; overflow: auto; max-height: 420px; }
pre code { display: block; padding: 0; color: #2d3a4d; }

blockquote {
  margin: 1.5em 0;
  padding: 1.2em 1.5em;
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: #2d3a4d;
}

table {
  border: 1px solid var(--border-light);
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5em 0;
}
table th, table td { padding: 10px 14px; border-top: 1px solid var(--border-light); }
table th { background: #f0f5ff; color: var(--text-primary); font-weight: 700; }
table tr:nth-child(even) td { background: #fafbfd; }

h1, h2, h3, h4, h5, h6 {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text-primary);
  line-height: 1.4;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  width: 100%;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.25s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 111, 224, 0.1);
}
textarea { resize: vertical; }

/* 链接下划线风格 */
.post-meta a, .post-content a, .widget a, .comment-content a {
  border-bottom: 1px solid #d3e0ff;
}
.post-meta a:hover, .post-content a:hover, .widget a:hover, .comment-content a:hover {
  border-bottom-color: transparent;
}

/* ------------------
 * Layout container
 * --------------- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ------------------
 * Header
 * --------------- */
#header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

#logo {
  color: var(--text-primary);
  font-size: 1.5em;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
#logo img { max-height: 40px; }

#logo::before {
  content: "\26A1";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(59, 111, 224, 0.3);
}

.description {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-style: normal;
  font-size: 13px;
}

/* Navigation menu */
#nav-menu {
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#nav-menu a {
  display: inline-block;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  height: auto;
  line-height: 1.5;
  color: var(--text-secondary);
  background: white;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.25s;
}
#nav-menu a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
#nav-menu .current {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 111, 224, 0.25);
}

/* Search */
#search {
  position: relative;
  margin-top: 15px;
}
#search input { padding-right: 36px; border-radius: 8px; }
#search button {
  position: absolute;
  right: 6px;
  top: 6px;
  border: none;
  padding: 0;
  width: 28px;
  height: 28px;
  background: transparent url(img/icon-search.png) no-repeat center center;
  background-size: 18px 18px;
  text-indent: -9999em;
  cursor: pointer;
}

/* ------------------
 * Main content
 * --------------- */
#main { padding: 0; }
#main .container { padding-top: 30px; }

/* 文章卡片 */
.post {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #d3e0ff;
}

.post-title {
  margin: 0 0 12px;
  font-size: 1.35em;
  font-weight: 800;
  line-height: 1.45;
}
.post-title a { color: var(--text-primary); }
.post-title a:hover { color: var(--accent); }

.post-meta {
  margin: 0 0 16px;
  padding: 0;
  color: var(--text-muted);
  font-size: 13px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.post-meta li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: none;
}
.post-meta li:first-child { margin-left: 0; padding-left: 0; border: none; }

.post-content {
  line-height: 1.8;
  color: #2d3a4d;
  font-size: 15px;
}
.post-content h2 {
  font-size: 1.3em;
  margin: 1.8em 0 0.8em;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.post-content h3 { font-size: 1.1em; margin: 1.4em 0 0.6em; }
.post-content p { margin: 0 0 1em; }
.post-content ul, .post-content ol { margin: 1em 0 1.5em 1.5em; }
.post-content li { margin-bottom: 0.4em; }
.post-content img { max-width: 100%; border-radius: 10px; margin: 1em 0; }
.post-content hr {
  margin: 2em auto;
  width: 100px;
  border: none;
  border-top: 2px solid var(--border-light);
}

.post .tags { clear: both; margin-top: 16px; }
.post .tags a {
  display: inline-block;
  padding: 3px 12px;
  margin: 0 6px 6px 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  border: none;
}
.post .tags a:hover { background: var(--accent); color: white; }

/* 阅读更多 */
.more { text-align: center; margin-top: 20px; }
.more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  transition: all 0.25s;
}
.more a:hover {
  background: var(--gradient);
  color: white;
  transform: translateY(-2px);
}

/* 分类标题 */
.archive-title {
  margin: 1em 0;
  padding: 20px 0 10px;
  color: var(--text-primary);
  font-size: 1.4em;
  font-weight: 800;
  border-bottom: 2px solid var(--border-light);
}

/* 分页 */
.page-navigator {
  list-style: none;
  margin: 30px 0;
  padding: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.page-navigator li { display: inline-block; margin: 0; }
.page-navigator a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s;
}
.page-navigator a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.page-navigator .current a {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 111, 224, 0.25);
}

/* ------------------
 * Sidebar
 * --------------- */
#secondary {
  padding-top: 30px;
  word-wrap: break-word;
}
.widget {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.widget-list li {
  margin: 8px 0;
  line-height: 1.6;
  font-size: 14px;
}
.widget-list li a { color: var(--text-secondary); }
.widget-list li a:hover { color: var(--accent); }
.widget-list li ul { margin-left: 15px; }

/* ------------------
 * Comment
 * --------------- */
#comments {
  padding-top: 15px;
}
.comment-list, .comment-list ol { list-style: none; margin: 0; padding: 0; }
.comment-list li {
  padding: 18px;
  margin-top: 12px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 12px;
}
.comment-list li.comment-level-odd { background: #fafbfd; }
.comment-list li.comment-level-even { background: #fff; }
.comment-list li.comment-by-author { background: #fff8f3; border-color: #ffe1cc; }
.comment-list li .comment-reply { text-align: right; font-size: 13px; }
.comment-meta a { color: var(--text-muted); font-size: 13px; }
.comment-author { display: block; margin-bottom: 6px; color: var(--text-primary); font-weight: 600; }
.comment-author .avatar { float: left; margin-right: 10px; border-radius: 50%; }
.comment-author cite { font-weight: 700; font-style: normal; }

.comment-list .respond { margin-top: 15px; border-top: 1px solid var(--border-light); }
.respond .cancel-comment-reply { float: right; margin-top: 15px; font-size: 13px; }
#comment-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
#comment-form .required:after { content: " *"; color: #e53e3e; }

/* ------------------
 * Footer
 * --------------- */
#footer {
  background: #1a2233;
  color: #8b98ab;
  padding: 3em 0;
  line-height: 1.6;
  text-align: center;
  margin-top: 40px;
  font-size: 14px;
}
#footer a { color: #6b9aff; }
#footer a:hover { color: #9bb8ff; }

/* ------------------
 * Error page
 * -------------- */
.error-page { margin: 100px 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: 14px; }
  #nav-menu { justify-content: center; }
  #nav-menu a { display: inline-block; margin: 0; }
  #logo { display: flex; justify-content: center; }
  .description { text-align: center; }
}

@media (max-width: 768px) {
  #header { text-align: center; }
  .post-title, .post-meta { text-align: left; }
  .container { padding: 0 16px; }
  .post { padding: 20px; }
}

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

/* Utility */
.hidden { display: none !important; visibility: hidden; }
.sr-only { border: 0; height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.invisible { visibility: hidden; }
/* ===== 卡片式文章列表 ===== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.article-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: #d3e0ff;
}

.article-tag {
    display: inline-block;
    align-self: flex-start;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.article-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 12px;
}

.article-title a {
    color: var(--text-primary);
    border: none;
}

.article-title a:hover {
    color: var(--accent);
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    flex-grow: 1;
    margin: 0 0 18px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}

.article-meta .read-more {
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
}

.article-meta .read-more:hover {
    gap: 8px;
}

/* 移动端单列 */
@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}.article-card {
    min-height: 280px;
}/*/* 修复侧边栏和主内容顶部对齐 */
#main {
    padding-top: 30px;
}

#secondary {
    padding-top: 30px;
    margin-top: 0;
}

/* 确保两栏顶部对齐 */
.container > .col-mb-12 {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}
/* ===== 文章底部 CTA ===== */
.post-cta {
    background: linear-gradient(135deg, #eaf1ff, #f0f5ff);
    border: 1px solid #d3e0ff;
    border-radius: 16px;
    padding: 2rem 1.8rem;
    margin: 2.5rem 0;
    text-align: center;
}

.post-cta h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.post-cta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
}

.post-cta .cta-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.post-cta .cta-btn {
    padding: 0.75rem 1.6rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
}

.cta-btn-aliyun {
    background: #ff6a00;
    color: white;
    box-shadow: 0 6px 18px rgba(255,106,0,0.28);
}
.cta-btn-aliyun:hover { background: #e55c00; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(255,106,0,0.4); }

.cta-btn-tencent {
    background: #0084ff;
    color: white;
    box-shadow: 0 6px 18px rgba(0,132,255,0.28);
}
.cta-btn-tencent:hover { background: #0073e6; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,132,255,0.4); }

.cta-btn-baidu {
    background: #4a6bff;
    color: white;
    box-shadow: 0 6px 18px rgba(74,107,255,0.28);
}
.cta-btn-baidu:hover { background: #3a56e0; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(74,107,255,0.4); }

/* 移动端：按钮全宽 */
@media (max-width: 768px) {
    .post-cta .cta-buttons {
        flex-direction: column;
    }
    .post-cta .cta-btn {
        width: 100%;
        justify-content: center;
    }
}