@charset "UTF-8";
/*
Theme Name: Minimalist Single Column
Author: Gemini
Description: 极简单栏自适应 Typecho 主题，灵感源自阅读型清爽排版。
Version: 1.5.0
*/

/* --- 基础重置 --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #111;
    background-color: #fff;
    line-height: 1.85;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation; /* 禁用双击缩放，消除 300ms 点击延迟 */
}

a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
      /* 设置为透明即可移除点击时的蓝色/灰色背景高亮 */
    -webkit-tap-highlight-color: transparent;
}

a:hover {
    color: #555;
}

/* --- 容器布局 --- */
.site-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 页眉 Header 吸顶与样式 --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.site-title a {
    display: flex;
    align-items: center;
    gap: 6px;
}
.icon-text {
    width: 34px;
    height: 34px;
    background-color: #0b1329;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    overflow: hidden;
}
/* 汉堡菜单按钮（移动端显示） */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    color: #111;
}

/* 导航菜单 */
.site-nav {
    display: flex;
    gap: 20px;
}

.site-nav a {
    font-size: 0.95rem;
    color: #555;
}

.site-nav a.current {
    font-weight: 600;
    color: #111;
}

/* --- 导航栏搜索框与 SVG 放大镜 --- */
.nav-search-form {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 5px;
}

.nav-search-input {
    width: 110px;
    padding: 4px 28px 4px 10px;
    font-size: 14px; /* 移动端已通过 viewport 限制防放大，此处保持清爽小字号 */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    background-color: #fafafa;
    transition: width 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nav-search-input:focus {
    width: 150px;
    border-color: #111;
    background-color: #fff;
}

.nav-search-btn {
    position: absolute;
    right: 6px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    color: #666;
    transition: color 0.2s ease;
}

.nav-search-btn:hover {
    color: #111;
}

.search-icon {
    display: block;
}

/* 移动端抽屉菜单中的搜索框适配 */
@media (max-width: 640px) {
    .nav-search-form {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .nav-search-input {
        width: 100%;
        padding: 8px 32px 8px 12px;
        font-size: 16px; /* 移动端拉起键盘时保持 16px */
    }

    .nav-search-input:focus {
        width: 100%;
    }

    .nav-search-btn {
        right: 10px;
    }
}


/* --- 主内容区 --- */
.site-main {
    padding: 40px 0;
}

/* --- 文章列表 (index.php / archive.php) --- */
.post-list {
    list-style: none;
}

.post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: none;
}

.post-item-title {
    font-size: 1.05rem;
    font-weight: 500;
    flex: 1;
    padding-right: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-item-date {
    font-size: 0.88rem;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- 文章归档页面 (page-archive.php) 样式 --- */
.archive-tree {
    margin-top: 20px;
}

.archive-year {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin-top: 35px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.archive-year .year-number {
    line-height: 1;
}

.archive-year .year-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888;
    margin-left: 4px;
    top: -0.4em;
}

.archive-post-list {
    list-style: none;
    padding-left: 10px;
}

.archive-post-list .post-item {
    padding: 10px 0;
}

.archive-post-list .post-item-title {
    font-size: 1rem;
}

/* --- 404 页面样式 --- */
.error-page {
    padding: 50px 0 70px;
    text-align: center;
}

.error-code {
    font-size: 4rem;
    font-weight: 800;
    color: #e0e0e0;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 15px;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 12px;
}

.error-description {
    font-size: 0.98rem;
    color: #666;
    margin-bottom: 30px;
}

/* 404 搜索框组合组件 */
.error-search-form {
    display: flex;
    max-width: 380px;
    margin: 0 auto 30px;
    gap: 8px;
}

.error-search-input {
    flex: 1;
    padding: 9px 14px;
    font-size: 16px; /* 必须保持 16px，防止 iOS 自动聚焦拉近/放大页面 */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    background-color: #fafafa;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.error-search-input:focus {
    border-color: #111;
    background-color: #fff;
}

.error-search-button {
    padding: 9px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    background-color: #111;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.error-search-button:hover {
    background-color: #333;
}

/* 404 底部返回按钮 */
.error-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    background-color: #f5f5f5;
    border-radius: 12px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    color: #111;
    background-color: #eaeaea;
}

/* --- 文章详情标头 (post.php / page.php) --- */
.post-header {
    margin-bottom: 30px;
}

.post-meta {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* --- 正文排版与 Markdown 丰富区块 (post-content) --- */
.post-content {
    font-size: 1.05rem;
    color: #2b2b2b;
    line-height: 1.85;
}

.post-content p {
    margin-bottom: 1.6em;
}

.post-content a {
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #aaa;
    padding-bottom: 1px;
}

.post-content a:hover {
    color: #000;
    border-bottom-color: #000;
}

.post-content h1, 
.post-content h2, 
.post-content h3, 
.post-content h4 {
    color: #111;
    font-weight: 700;
    line-height: 1.35;
    margin: 1em 0 0.8em;
    background-color: #f9fbfd;
    border-left: 4px solid #4a6b82;
    padding-left: 8px;
}

.post-content blockquote {
    margin: 1.8em 0;
    padding: 14px 20px;
    background-color: #f9fbfd;
    border-left: 4px solid #4a6b82;
    border-radius: 0 6px 6px 0;
    color: #555;
    font-style: normal;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content code {
    background-color: #f3f4f6;
    color: #d6336c;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

.post-content pre {
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 1.8em 0;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.6;
}

.post-content pre code {
    background-color: transparent;
    color: #333;
    padding: 0;
    border-radius: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2em auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.post-content ul, 
.post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.6em;
}

.post-content li {
    margin-bottom: 0.4em;
}

.post-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2.5em 0;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8em 0;
    font-size: 0.95rem;
}

.post-content th, 
.post-content td {
    padding: 10px 14px;
    border: 1px solid #eee;
    text-align: left;
}

.post-content th {
    background-color: #f9f9f9;
    font-weight: 600;
}

/* --- 文章底部分类与标签 --- */
.post-footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
    font-size: 0.88rem;
    color: #666;
}

.post-footer-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-footer-meta .meta-label {
    color: #888;
    font-weight: 500;
}

.post-footer-meta a {
    color: #444;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-footer-meta a:hover {
    color: #000;
    text-decoration: underline;
}

/* 移动端间距调整 */
@media (max-width: 640px) {
    .post-footer-meta {
        gap: 12px;
        font-size: 0.85rem;
    }
}


/* --- 分页导航 --- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px dashed #e0e0e0;
    font-size: 0.9rem;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #444;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.pagination a:hover {
    color: #000;
}

.pagination .prev-link:hover {
    transform: translateX(-3px);
}

.pagination .next-link:hover {
    transform: translateX(3px);
}

/* --- 页脚 Footer --- */
.site-footer {
    padding: 30px 0;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* --- 移动端自适应 CSS 媒体查询 --- */
@media (max-width: 640px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
        z-index: 1000;
    }

    .site-nav.active {
        display: flex;
    }

    .post-item {
        flex-direction: row !important;
        align-items: baseline !important;
        justify-content: space-between !important;
    }

    .archive-post-list {
        padding-left: 5px;
    }

    .post-title {
        font-size: 1.6rem;
    }

    .error-code {
        font-size: 3rem;
    }

    .error-search-form {
        max-width: 100%;
    }
}
/* --- 回到顶部小方形按钮 --- */
.back-to-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 38px;
    height: 38px;
    background-color: #111;
    color: #fff;
    border: none;
    border-radius: 16px; /* 微圆角小方形 */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #333;
    color: #fff;
}

.back-to-top:active {
    transform: translateY(0) scale(0.95);
}

/* 移动端安全边距适配 */
@media (max-width: 640px) {
    .back-to-top {
        right: 15px;
        bottom: 20px;
        width: 36px;
        height: 36px;
    }
}
