/* ------------------------------------
 * Ouyang Tech Notebook Theme
 * Based on Typecho Default Theme
 * --------------------------------- */

/* ------------------
 * Global Reset & Typography
 * --------------- */
body {
    background: url(img/bj.webp) no-repeat center center fixed;
    background-size: cover;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* 隐藏滚动条但保留功能 (更像App) */
body::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
}
body::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.1);
    border-radius: 3px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #ddd;
    transition: all 0.2s ease;
}

a:hover {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* 布局容器 - 强制单栏居中 - 卡片式设计 */
.container {
    max-width: 800px !important;
    margin: 80px auto 30px; /* 增加顶部间距，实现视觉居中 */
    padding: 30px;
    width: auto !important;
    background: rgba(255, 255, 255, 0.3); /* 30% 透明度 */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); /* 柔和阴影 */
    /* backdrop-filter: blur(10px); 移除磨砂效果 */
    animation: fadeIn 0.8s ease-out; /* 进场动画 */
}

#header .container {
    animation: none;
    transform: none;
}

/* 增强文字可读性 (因为背景透明了) */
.post-title a, .post-content, .description, #footer, #nav-menu a {
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* 移动端适配 (H5) */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px; /* 移动端留边 */
        border-radius: 8px;
        width: auto !important;
    }
    
    #header {
        padding: 30px 0 20px;
    }
}

/* 覆盖 Grid 系统可能带来的影响 */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.col-mb-12, .col-12 {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
}

/* ------------------
 * Header
 * --------------- */
#header {
    padding: 0; /* Container 已经有 padding 了 */
    margin-bottom: 0; /* 由 container margin 控制 */
}

/* Logo 区域 */
.site-name {
    text-align: center;
    margin-bottom: 20px;
}

#logo {
    font-size: 2.2em;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    border: none;
    display: inline-block;
    letter-spacing: 1px;
}
#logo:hover {
    color: #000;
    transform: scale(1.02);
}
#logo img {
    max-height: 80px;
}

.description {
    color: #666;
    font-size: 1em;
    margin: 10px 0 0;
    font-weight: 300;
}

#nav-menu {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 99999;
}

#nav-menu .nav-list {
    list-style: none;
    padding: 8px 0 0;
    margin: 0;
}

#nav-menu .nav-list .nav-search {
    margin-bottom: 8px;
}

#nav-menu .nav-list li {
    margin: 4px 0;
}

#nav-menu .nav-list a {
    display: block;
    float: none;
    width: 100%;
    font-weight: 500;
    color: #555;
    border: none;
    font-size: 1.05em;
    padding: 6px 10px;
    border-radius: 4px;
}

#nav-menu .nav-list a:hover,
#nav-menu .nav-list a.current {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

#search {
    width: 100%;
}

#search input {
    border: 1px solid #eee;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    background: #fff;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#search input:focus {
    border-color: #999;
}

/* ------------------
 * Main Content
 * --------------- */
.post {
    padding: 0 0 40px;
    margin-bottom: 40px;
    border-bottom: 1px dashed #eee;
}

.post-title {
    font-size: 1.8em;
    margin: 0 0 15px;
    line-height: 1.3;
    font-weight: 700;
}

.post-title a {
    color: #000;
    border: none;
}

.post-meta {
    margin: 0 0 20px;
    padding: 0;
    color: #999;
    font-size: 0.85em;
    list-style: none;
}

.post-meta li {
    display: inline-block;
    margin-right: 15px;
}

.post-content {
    color: #444;
}

/* 标题样式增强 */
.post-content h1,
.post-content h2,
.post-content h3 {
    color: #111;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    font-weight: 600;
}

.post-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.post-content h3 {
    font-size: 1.25em;
}

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

.post-content blockquote {
    margin: 1.5em 0;
    padding-left: 20px;
    border-left: 4px solid #ddd;
    color: #666;
    font-style: italic;
    background: transparent;
}

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

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

/* ------------------
 * Code Blocks (Prism.js overrides)
 * --------------- */
/* 让代码块背景稍微柔和一点，如果主题自带背景，这里可以调整圆角和边距 */
:not(pre) > code[class*="language-"], 
pre[class*="language-"] {
    background: #f4f6f8; /* 淡蓝灰色背景 */
    border-radius: 6px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

/* 行内代码 */
code {
    background: #f0f0f0;
    color: #d63384; /* 醒目的洋红色 */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

/* ------------------
 * Pagination & Footer
 * --------------- */
.page-navigator {
    list-style: none;
    padding: 0;
    text-align: center;
    margin: 40px 0;
}
.page-navigator li {
    display: inline-block;
    margin: 0 5px;
}
.page-navigator a {
    padding: 8px 16px;
    border: 1px solid #eee;
    border-radius: 4px;
    background: #fff;
    color: #666;
    border-bottom: 1px solid #eee; /* 统一边框 */
}
.page-navigator a:hover,
.page-navigator .current a {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

#footer {
    padding: 30px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8); /* 白色半透明文字，适应背景图 */
    font-size: 0.9em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* 文字阴影增加可读性 */
}

#footer a {
    color: #fff;
    border-bottom: 1px dashed rgba(255,255,255,0.5);
}
#footer a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* ------------------
 * Comments
 * --------------- */
#comments {
    padding-top: 40px;
    border-top: 1px solid #eee;
    margin-top: 60px;
}
.comment-list, .comment-list ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-list li {
    padding: 20px 0;
    border-bottom: 1px solid #f9f9f9;
}
.comment-author {
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}
.comment-meta {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 10px;
    display: block;
}
.respond {
    margin-top: 30px;
}
/* 评论区输入框布局 */
.respond p {
    margin-bottom: 10px;
}

.comment-form-author,
.comment-form-mail,
.comment-form-url {
    display: flex;
    align-items: center;
}

.comment-form-author label,
.comment-form-mail label,
.comment-form-url label {
    display: inline-block;
    width: 60px; /* 固定标签宽度实现对齐 */
    min-width: 60px;
    margin-right: 10px;
    text-align: right; /* 标签文字右对齐 */
}

.respond input[type="text"],
.respond input[type="email"],
.respond input[type="url"] {
    width: 25%;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0; /* 由 p 标签控制间距 */
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.respond textarea {
    width: 50%;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.respond button {
    background: #333;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.respond button:hover {
    background: #000;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .comment-form-author,
    .comment-form-mail,
    .comment-form-url {
        display: block; /* 移动端改为上下排列 */
    }
    
    .comment-form-author label,
    .comment-form-mail label,
    .comment-form-url label {
        display: block;
        width: 100%;
        text-align: left;
        margin-bottom: 5px;
    }

    .respond input[type="text"],
    .respond input[type="email"],
    .respond input[type="url"],
    .respond textarea {
        width: 100%;
    }

    #nav-menu .nav-list li {
        margin: 8px 0;
    }
    #nav-menu .nav-list a {
        padding: 8px 12px;
    }
    #nav-menu .nav-list .nav-search {
        margin-bottom: 10px;
    }
}
