/* ===== 全局重置 & 亮色基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b;
    line-height: 1.7;
    min-height: 100vh;
    padding: 0;
    background: #f4f6f9 url('https://cdn.luogu.com.cn/upload/image_hosting/aij49ty6.png') no-repeat center center fixed;
    background-size: cover;
}

/* 背景图片上的浅色遮罩（减轻对比，让毛玻璃更自然） */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.20);
    z-index: 0;
    pointer-events: none;
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(79, 126, 179, 0.4);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 126, 179, 0.6);
}

/* ===== 链接 ===== */
a {
    color: #4f7eb3;
    text-decoration: none;
    transition: color 0.25s ease;
}
a:hover {
    color: #2b5b8c;
}

/* ===== 主容器（毛玻璃，透明度适中） ===== */
#main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 32px 28px 60px;
    background: rgba(255, 255, 255, 0.70);  /* 中间内容主背景：0.70 不透明度 */
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255,255,255,0.5);
    overflow: hidden;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== 博客标题 ===== */
#header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 20px;
    margin-bottom: 32px;
}
#blogTitle h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0;
    text-shadow: 0 2px 8px rgba(255,255,255,0.6);
}
#blogTitle h1 a {
    color: #0f172a;
    text-decoration: none;
}
#blogTitle h1 a:hover {
    color: #4f7eb3;
}
#blogTitle h2 {
    font-size: 1rem;
    font-weight: 400;
    color: #475569;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

/* ===== 导航（毛玻璃） ===== */
#navigator {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 12px 0;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.4);
}
#navList {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 0 12px;
    margin: 0;
}
#navList li {
    display: inline-block;
}
#navList a {
    display: inline-block;
    padding: 6px 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease;
    position: relative;
}
#navList a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #4f7eb3;
    transition: width 0.3s ease;
}
#navList a:hover {
    color: #0f172a;
}
#navList a:hover::after {
    width: 100%;
}

/* ===== 文章卡片、公告、日历、搜索框等所有中间内容（毛玻璃） ===== */
/* 覆盖博客园常见的内容容器 */
.post,
.day,
.blogpost,
.entry,
.post-item,
.post-list-item,
#blog-calendar,
#profile_block,
.newsItem,
.calendar,
#sidebar_search,
#sidebar_blogarchive,
#sidebar_about,
#sidebar_topviewedposts,
#sidebar_recentcomments,
#sidebar_categories,
#sidebar_links,
#sidebar_guestbook,
#sidebar_blogarchives,
#sidebar_toptracks,
#sidebar_friendlinks,
#sidebar_myotherblogs,
#sidebar_custom {
    background: rgba(255, 255, 255, 0.60) !important;  /* 内部卡片透明度：0.60 */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 20px !important;
    padding: 18px 22px !important;
    margin-bottom: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02) !important;
    transition: box-shadow 0.3s ease;
}

/* 针对文章卡片的不同类名，增加 post 的特殊处理 */
.post {
    padding: 20px 24px 24px !important;
}

/* 侧边栏和公告等略透明，突出主内容 */
.newsItem,
#profile_block,
#blog-calendar,
#sidebar_search,
#sidebar_blogarchive,
#sidebar_about,
#sidebar_topviewedposts,
#sidebar_recentcomments,
#sidebar_categories {
    background: rgba(255, 255, 255, 0.50) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

/* 文章悬停效果（极轻微） */
.post:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

/* ===== 文章标题、摘要 ===== */
.postTitle {
    font-size: 1.6rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}
.postTitle a {
    color: #0f172a;
    transition: color 0.2s;
}
.postTitle a:hover {
    color: #4f7eb3;
}

.postDesc {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    align-items: center;
}
.postDesc a {
    color: #64748b;
}
.postDesc a:hover {
    color: #4f7eb3;
}

.postBody {
    font-size: 1rem;
    color: #1e293b;
    line-height: 1.8;
}
.postBody p {
    margin-bottom: 1.2em;
}
.postBody h2, .postBody h3, .postBody h4 {
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    font-weight: 650;
    color: #0f172a;
}
.postBody img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 12px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.postBody blockquote {
    border-left: 4px solid #4f7eb3;
    padding: 12px 22px;
    margin: 1.2em 0;
    background: rgba(245, 249, 255, 0.5);
    backdrop-filter: blur(4px);
    border-radius: 0 16px 16px 0;
    color: #1e293b;
}
.postBody code {
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #1e293b;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.postBody pre {
    background: rgba(0, 0, 0, 0.03);
    color: #1e293b;
    padding: 18px 22px;
    border-radius: 16px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 1.2em 0;
    border: 1px solid rgba(0,0,0,0.04);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.postBody pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* ===== 分页 ===== */
.pager {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pager a, .pager span {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
    color: #334155;
    border: 1px solid rgba(255,255,255,0.25);
    transition: background 0.25s ease, color 0.25s ease;
}
.pager a:hover {
    background: #4f7eb3;
    color: #ffffff;
    border-color: #4f7eb3;
    text-decoration: none;
}
.pager .current {
    background: #4f7eb3;
    color: #ffffff;
    border-color: #4f7eb3;
}

/* ===== 评论区（毛玻璃） ===== */
#commentform,
.commentform {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
#commentform textarea,
.commentform textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #1e293b;
    transition: border 0.3s ease, box-shadow 0.3s ease;
    resize: vertical;
}
#commentform textarea:focus,
.commentform textarea:focus {
    outline: none;
    border-color: #4f7eb3;
    box-shadow: 0 0 0 4px rgba(79, 126, 179, 0.1);
    background: rgba(255, 255, 255, 0.60);
}
#commentform input[type="submit"],
.commentform input[type="submit"] {
    background: #4f7eb3;
    border: none;
    color: #ffffff;
    padding: 10px 32px;
    border-radius: 40px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s;
    margin-top: 10px;
}
#commentform input[type="submit"]:hover,
.commentform input[type="submit"]:hover {
    background: #3a6390;
    transform: scale(1.02);
}

/* ===== 页脚 ===== */
#footer {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    padding: 20px 0 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 40px;
}
#footer a {
    color: #64748b;
}
#footer a:hover {
    color: #4f7eb3;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    #main {
        padding: 20px 16px 40px;
        border-radius: 20px;
        margin: 16px;
    }
    #blogTitle h1 {
        font-size: 1.6rem;
    }
    .postTitle {
        font-size: 1.3rem;
    }
    #navList {
        gap: 4px 12px;
    }
    #navList a {
        font-size: 0.85rem;
        padding: 4px 2px;
    }
    .postBody pre {
        padding: 12px 14px;
        font-size: 0.8rem;
    }
    /* 移动端毛玻璃不变，但内边距缩小 */
    .post, .day, .blogpost, .entry, .post-item, .post-list-item,
    #blog-calendar, #profile_block, .newsItem, .calendar,
    #sidebar_search, #sidebar_blogarchive, #sidebar_about,
    #sidebar_topviewedposts, #sidebar_recentcomments, #sidebar_categories,
    #sidebar_links, #sidebar_guestbook, #sidebar_blogarchives,
    #sidebar_toptracks, #sidebar_friendlinks, #sidebar_myotherblogs,
    #sidebar_custom {
        padding: 14px 16px !important;
    }
}
@media (max-width: 480px) {
    #main {
        padding: 14px 12px 30px;
        border-radius: 16px;
    }
    #blogTitle h1 {
        font-size: 1.3rem;
    }
    .postTitle {
        font-size: 1.1rem;
    }
    .postDesc {
        font-size: 0.75rem;
        gap: 4px 10px;
    }
    .post, .day, .blogpost, .entry, .post-item, .post-list-item,
    #blog-calendar, #profile_block, .newsItem, .calendar,
    #sidebar_search, #sidebar_blogarchive, #sidebar_about,
    #sidebar_topviewedposts, #sidebar_recentcomments, #sidebar_categories,
    #sidebar_links, #sidebar_guestbook, #sidebar_blogarchives,
    #sidebar_toptracks, #sidebar_friendlinks, #sidebar_myotherblogs,
    #sidebar_custom {
        padding: 12px 14px !important;
        border-radius: 16px !important;
    }
}

/* ===== 加载遮罩（毛玻璃） ===== */
#loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    flex-direction: column;
    gap: 20px;
}
#loading-mask.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ===== 原神加载动画 ===== */
.genshin-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.genshin-loader .loading-gif {
    width: min(65vw, 450px);
    height: auto;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(79, 126, 179, 0.15);
}
.genshin-loader .loading-text {
    color: #475569;
    font-size: 1.1rem;
    letter-spacing: 6px;
    animation: pulseText 1.8s ease-in-out infinite;
}
@keyframes pulseText {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ===== 页首横幅（透明度更低，更实） ===== */
.blog-banner {
    background: rgba(255, 255, 255, 0.85);  /* 最上方：0.85 不透明度，更实 */
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    border-radius: 24px;
    padding: 24px 32px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}
.blog-banner::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(79, 126, 179, 0.06), transparent 70%);
    animation: pulseGlow 6s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.8); opacity: 0.6; }
}
.blog-banner .greeting {
    font-size: 1.2rem;
    font-weight: 500;
    color: #0f172a;
    z-index: 1;
}
.blog-banner .greeting span {
    color: #4f7eb3;
}
.blog-banner .badge {
    background: rgba(79, 126, 179, 0.12);
    color: #1e293b;
    padding: 6px 20px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.4);
    z-index: 1;
}

/* ===== 页脚自定义（毛玻璃） ===== */
.blog-footer {
    text-align: center;
    padding: 12px 0 6px;
    font-size: 0.85rem;
    color: #64748b;
}
.blog-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.blog-footer .footer-links a {
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.3s;
}
.blog-footer .footer-links a:hover {
    color: #4f7eb3;
    text-decoration: none;
}
.blog-footer .heart {
    color: #e74c6f;
    animation: heartbeat 1.5s ease-in-out infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}