/*
  Rin 风格精简 CSS (最终版)
  依赖页首 HTML: <div id="custom-hero"></div>
*/

/* === 字体 === */
@font-face {
    font-family: "Maple Mono NF CN";
    src: url("https://s.wishingqi.top/fonts/MapleMono-NF-CN-Regular/result.css");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Maple Mono NF CN";
    src: url("https://s.wishingqi.top/fonts/MapleMono-NF-CN-Bold/result.css");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Maple Mono NF CN";
    src: url("https://s.wishingqi.top/fonts/MapleMono-NF-CN-Italic/result.css");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Maple Mono NF CN";
    src: url("https://s.wishingqi.top/fonts/MapleMono-NF-CN-BoldItalic/result.css");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* === 变量 === */
:root {
    --hero-height-mobile: 10rem;
    --hero-height-desktop: 18rem;
    --hero-height: var(--hero-height-mobile);
    --hero-image-y: 30%;
    --hero-surface-top: rgba(141, 209, 210, 0.3);
    --hero-surface-bottom: rgba(244, 253, 253, 0);
    --hero-overlay-top: rgba(0, 0, 0, 0.18);
    --hero-overlay-bottom: rgba(255, 255, 255, 0);

    --rin-theme: #8dd1d2;
    --rin-background: #f4fdfd;
    --rin-text-primary: #1f3132;
    --rin-muted: #6b7280;
    --rin-card-shadow: 0 10px 15px -3px rgba(141, 209, 210, 0.1), 0 4px 6px -2px rgba(141, 209, 210, 0.05);

    --rin-avatar-url: url("https://pic.cnblogs.com/avatar/3791847/20260422163116.png");
    --rin-hero-image: url("https://img2024.cnblogs.com/blog/3791847/202605/3791847-20260506101310258-476480924.png");
}

@media (min-width: 768px) {
    :root {
        --hero-height: var(--hero-height-desktop);
    }
}

/* === 全局 === */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--rin-background);
    color: var(--rin-text-primary);
    font-family: "Maple Mono NF CN", "Source Han Serif CN VF", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

/* === 自定义 Hero (页首 HTML) === */
#header::before {
    content: none !important;
}

#custom-hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--hero-height);
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(to bottom, var(--hero-overlay-top), var(--hero-overlay-bottom)),
        linear-gradient(to bottom, var(--hero-surface-top), var(--hero-surface-bottom)),
        var(--rin-hero-image);
    background-size: cover, cover, contain;
    background-repeat: no-repeat;
    background-position: top center, top center, center var(--hero-image-y);
    background-color: var(--hero-surface-bottom);
    filter: brightness(0.98);
}

/* === 布局 === */
#home {
    max-width: 1200px;
    margin: 0 auto;
    padding: calc(var(--hero-height) + 1.5rem) 24px 40px;
    position: relative;
    z-index: 2;
}

#main {
    display: flex;
    gap: 32px;
}

#mainContent {
    flex: 1 1 auto;
    min-width: 0;
}

#sideBar {
    flex: 0 0 300px;
    width: 300px;
}

@media (max-width: 960px) {
    #main {
        flex-direction: column;
    }

    #sideBar {
        width: 100%;
        flex: 1 1 auto;
    }
}

/* === blogTitle 固定 === */
#blogTitle {
    position: fixed !important;
    top: 1.2rem;
    left: clamp(1rem, 6vw, 2.5rem);
    z-index: 2147483647 !important;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    align-items: center;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

#lnkBlogLogo {
    grid-row: 1 / span 2;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background-image: var(--rin-avatar-url);
    background-size: cover;
    background-position: center;
}

#blogLogo {
    display: none;
}

#blogTitle h1,
#blogTitle h2,
#blogTitle h1 a,
#Header1_HeaderTitle {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

#blogTitle h1 {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0.8 !important;
}

#blogTitle h1 a,
#Header1_HeaderTitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rin-text-primary);
}

#blogTitle h2 {
    margin: 0 !important;
    font-size: 0.75rem;
    color: var(--rin-muted);
    font-weight: 400;
}

/* === 导航 === */
#navigator {
    position: fixed;
    top: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483646 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

#navList {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0.35rem 1.2rem;
    list-style: none;
    background: #f3fafa;
    border: 1px solid rgba(141, 209, 210, 0.16);
    border-radius: 9999px;
    box-shadow: 0 6px 18px rgba(141, 209, 210, 0.12);
}

#navList li {
    display: contents;
}

#navList a {
    color: var(--rin-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.45rem 0.3rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

#navList a:hover,
#navList .current a {
    color: var(--rin-theme);
    transform: translateY(-1px);
}

#navigator .blogStats {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.9rem;
    font-size: 0.75rem;
    color: var(--rin-muted);
    background: #f3fafa;
    border: 1px solid rgba(141, 209, 210, 0.16);
    border-radius: 9999px;
    box-shadow: 0 6px 16px rgba(141, 209, 210, 0.1);
    white-space: nowrap;
}

@media (max-width: 767px) {
    #blogTitle {
        transform: scale(0.92);
        transform-origin: left top;
    }

    #navigator {
        width: calc(100% - 2rem);
    }

    #navList {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* === 列表卡片 === */
.day {
    background: #ffffff;
    border-radius: 1rem;
    border: 2px solid rgba(141, 209, 210, 0.1);
    padding: 1.8rem 2.5rem 2.2rem;
    box-shadow: var(--rin-card-shadow);
}

.forFlow .day {
    margin-bottom: 3rem;
}

.dayTitle {
    margin: 0 0 0.4rem;
    padding: 0;
}

.forFlow .day .postTitle {
    margin-top: 1.2rem;
}

.forFlow .day .postSeparator {
    margin: 1.2rem 0;
    border-top: 2px solid rgba(141, 209, 210, 0.2);
    height: 0;
}

.postTitle {
    margin: 0;
    padding: 0;
}

.postTitle a {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--rin-text-primary);
    line-height: 1.4;
}

.postCon {
    color: #556b6b;
    line-height: 1.8;
    margin-top: 0.8rem;
}

.postDesc {
    color: var(--rin-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* 预览摘要：阅读全文右侧同一行，遮罩挂到按钮自身 */
.c_b_p_desc {
    position: relative;
}

.c_b_p_desc_readmore {
    position: absolute;
    right: 0;
    bottom: 0;
    display: inline-block;
    padding-left: 0.4rem;
    background: #ffffff;
    color: var(--rin-theme);
    font-weight: 600;
    white-space: nowrap;
}

/* 遮罩挂到按钮：只覆盖按钮左侧一小段文本 */
.c_b_p_desc_readmore::before {
    content: "";
    position: absolute;
    left: -4rem;
    top: 0;
    width: 4rem;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff 70%);
    pointer-events: none;
}

/* === 侧边栏 === */
#sideBarMain {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.sidebar-block {
    background: #ffffff;
    border-radius: 1rem;
    padding: 0.9rem 1.4rem 1.2rem;
    border: 2px solid rgba(141, 209, 210, 0.12);
    box-shadow: var(--rin-card-shadow);
    margin: 10px 0;
}

.catListTitle {
    color: var(--rin-theme);
    font-weight: 700;
    margin: 0 0 0.8rem;
    border-left: 4px solid var(--rin-theme);
    padding-left: 0.6rem;
}

/* 常用链接圆点 */
#sidebar_shortcut ul {
    list-style: none;
    padding-left: 0;
}

#sidebar_shortcut li {
    position: relative;
    padding-left: 0.9rem;
    margin: 0.4rem 0;
}

#sidebar_shortcut li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--rin-theme);
}

/* 空侧栏模块不占位 */
.sidebar-block:empty,
.sidebar-block:not(:has(*)) {
    display: none !important;
}

#sidebar_search:not(:has(*)),
#sidebar_toptags:not(:has(*)),
#sidebar_recentcomments:not(:has(*)) {
    display: none !important;
}

/* 日历美化 */
#blog-calendar {
    background: #fff;
    border: 2px solid rgba(141, 209, 210, 0.12);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: var(--rin-card-shadow);
}

#blogCalendar {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#blogCalendar td,
#blogCalendar th {
    padding: 0.35rem 0.25rem;
    text-align: center;
    border: none;
    color: #4b5b5b;
}

#blogCalendar .CalTitle td {
    font-weight: 600;
    color: var(--rin-text-primary);
    padding: 0.4rem 0;
}

#blogCalendar .CalNextPrev a {
    color: var(--rin-theme);
    text-decoration: none;
}

#blogCalendar .CalWeekendDay {
    color: #6aa5a5;
}

#blogCalendar .CalTodayDay {
    background: rgba(141, 209, 210, 0.18);
    border-radius: 0.4rem;
    font-weight: 700;
}

#blogCalendar .CalOtherMonthDay {
    color: #a3b1b1;
}

/* === 文章页 === */
#post_detail {
    background: #ffffff;
    border-radius: 1rem;
    border: 2px solid rgba(141, 209, 210, 0.12);
    box-shadow: var(--rin-card-shadow);
    padding: 2.2rem 2.5rem;
    margin-bottom: 2.5rem;
}

#topics {
    margin: 0 !important;
    padding: 0 !important;
}

#post_detail .postTitle,
#post_detail .postTitle a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rin-text-primary);
    line-height: 1.4;
}

#post_detail .postTitle {
    margin: 0 !important;
    padding: 0 !important;
}

#cnblogs_post_body {
    color: #556b6b;
    line-height: 1.9;
    font-size: 1rem;
}

#cnblogs_post_body h1,
#cnblogs_post_body h2,
#cnblogs_post_body h3 {
    color: var(--rin-text-primary);
    margin: 2rem 0 1rem;
    font-weight: 700;
}

#cnblogs_post_body h1 {
    font-size: 1.8rem;
}

#cnblogs_post_body h2 {
    font-size: 1.5rem;
}

#cnblogs_post_body h3 {
    font-size: 1.2rem;
}

#cnblogs_post_body img {
    border-radius: 0.75rem;
    margin: 1.2rem auto;
}

#cnblogs_post_body blockquote {
    border-left: 4px solid var(--rin-theme);
    background: rgba(141, 209, 210, 0.08);
    padding: 0.8rem 1rem;
    border-radius: 0.6rem;
    color: #4a6464;
}

#cnblogs_post_body ul,
#cnblogs_post_body ol {
    padding-left: 1.25rem;
    margin: 1rem 0;
}

/* 行内 code */
#cnblogs_post_body p code,
#cnblogs_post_body li code,
#cnblogs_post_body h1 code,
#cnblogs_post_body h2 code,
#cnblogs_post_body h3 code,
#cnblogs_post_body h4 code,
#cnblogs_post_body h5 code,
#cnblogs_post_body h6 code,
#cnblogs_post_body blockquote code,
#cnblogs_post_body table code {
    background: #f1f5f9;
    padding: 0.15rem 0.35rem;
    border-radius: 0.35rem;
    color: #0f766e;
}

/* post info block 与正文分隔 */
#blog_post_info_block {
    margin-top: 2.2rem;
    padding-top: 1.4rem;
    border-top: 2px solid rgba(141, 209, 210, 0.2);
}

/* 标签区 */
#EntryTag a {
    display: inline-block;
    background: rgba(141, 209, 210, 0.12);
    color: #2b6b6b;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

/* 评论区 */
#comment_form {
    background: #ffffff;
    border: 2px solid rgba(141, 209, 210, 0.1);
    border-radius: 1rem;
    box-shadow: var(--rin-card-shadow);
    padding: 0;
    overflow: hidden;
    margin-top: 1.5rem;
}

#comment_nav {
    background: rgba(141, 209, 210, 0.06);
    padding: 0.6rem 1rem;
    border-bottom: 2px solid rgba(141, 209, 210, 0.15);
}

#comment_nav .comment-nav-right a {
    margin-left: 0.8rem;
    color: var(--rin-theme);
    text-decoration: underline;
    text-underline-offset: 2px;
    border-bottom: none;
    padding-bottom: 0;
}

#comment_form_container {
    margin: 0 !important;
    padding: 1.2rem 1.4rem !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* === 评论区按钮与输入框 === */
#commentform_title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    color: var(--rin-text-primary);
}

#commentform_title a {
    font-weight: 600;
    color: var(--rin-theme);
    border-bottom: 1px solid rgba(141, 209, 210, 0.8);
    padding-bottom: 1px;
}

.commentbox_tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-width: 56px;
    line-height: 1;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    border: 1px solid rgba(141, 209, 210, 0.3);
    color: var(--rin-text-primary);
    background: #ffffff;
    cursor: pointer;
}

.commentbox_tab.active {
    color: #0f4f4f;
    background: rgba(141, 209, 210, 0.18);
    border-color: rgba(141, 209, 210, 0.6);
}

.comment_icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(141, 209, 210, 0.25);
    background: #ffffff;
    cursor: pointer;
}

.comment_svg {
    width: 16px;
    height: 16px;
}

.commentbox_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.commentbox_title_left,
.commentbox_title_right {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.commentbox_title_left {
    margin-bottom: 5px;
}

.comment_icon:hover {
    background: rgba(141, 209, 210, 0.12);
    border-color: rgba(141, 209, 210, 0.5);
}

#tbCommentBody {
    width: 100%;
    min-height: 180px;
    border: 1px solid rgba(141, 209, 210, 0.3);
    border-radius: 12px;
    margin-top: 5px;
    padding: 0.8rem 0.9rem;
    font-family: "Maple Mono NF CN", "Source Han Serif CN VF", sans-serif;
    outline: none;
}

#tbCommentBody:focus {
    border-color: rgba(141, 209, 210, 0.7);
    box-shadow: 0 0 0 3px rgba(141, 209, 210, 0.15);
}

#commentbox_opt {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.8rem;
}

#btn_comment_submit,
.comment_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    line-height: 32px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--rin-theme);
    border: none;
    color: #0f4f4f;
    padding: 0 16px;
    min-width: 96px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}

#btn_comment_submit:hover,
.comment_btn:hover {
    filter: brightness(0.96);
}

#commentbox_opt a {
    color: var(--rin-theme);
    text-decoration: underline;
    text-underline-offset: 2px;
    border-bottom: none;
    padding-bottom: 0;
}

#comment_form>p#commentbox_opt {
    opacity: 1;
    font-size: inherit;
}

#tip_comment2+p {
    opacity: 0.5;
    font-size: 11px;
}

/* 编辑推荐隐形容器 + 链接样式 */
#under_post_card1 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-left: 0.6rem !important;
    padding: 0 !important;
}

#under_post_card1 .under-post-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-left: 0.6rem !important;
    padding: 0 !important;
}

#under_post_card1 a {
    color: var(--rin-theme);
    border-bottom: 1px solid rgba(141, 209, 210, 0.8);
    padding-bottom: 1px;
}

/* === Footer === */
/* 1. 彻底隐藏原生页脚 */
#footer {
    display: none !important;
}

/* 2. 统一页脚基础样式 */
#page_end_html,
#custom_footer {
    text-align: center;
    font-size: 12px;
    color: var(--rin-muted);
    line-height: 1.6;
}

/* 3. 为自定义页脚添加顶部虚线分隔 */
#custom_footer {
    margin-top: 32px;
    padding-top: 16px;
    padding-bottom: 16px;
    border-top: 2px dashed rgba(141, 209, 210, 0.6);
}

#custom_footer a {
    color: var(--rin-theme);
    text-decoration: none;
    border-bottom: 1px solid rgba(141, 209, 210, 0.8);
    padding-bottom: 1px;
    transition: color 0.2s ease;
}

#custom_footer a:hover {
    color: #5ba9aa;
}

/* 4. 手动增加的原生信息（降低视觉比重） */
#custom_footer .cnblogs-info {
    margin-top: 12px;
    font-size: 11px;
    color: #9ca3af;
}

#custom_footer .cnblogs-info a {
    color: #9ca3af;
    border-bottom: none;
    padding-bottom: 0;
}

#custom_footer .cnblogs-info a:hover {
    color: var(--rin-theme);
}

/* === 侧边栏搜索框 === */
#sidebar_search_box {
    margin-top: 0.6rem;
}

#sidebar_search_box .div_my_zzk {
    display: flex;
    align-items: center;
    width: 100%;
}

#sidebar_search_box .input_my_zzk {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    border: 1px solid rgba(141, 209, 210, 0.3);
    border-radius: 9999px;
    height: 36px;
    padding: 0.45rem 0.8rem;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
}

#sidebar_search_box .input_my_zzk:focus {
    border-color: rgba(141, 209, 210, 0.7);
    box-shadow: 0 0 0 3px rgba(141, 209, 210, 0.15);
}

#sidebar_search_box .btn_my_zzk {
    margin-top: 0;
    width: 72px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--rin-theme);
    color: #0f4f4f;
    border: none;
    border-radius: 9999px;
    height: 36px;
    padding: 0.45rem 0.9rem;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#sidebar_search_box .btn_my_zzk:hover {
    filter: brightness(0.96);
}

/* 单独设置 Copyright 符号的字体 */
.copyright-symbol {
    /* 这里我暂时使用了系统默认的无衬线字体作为示例，它通常能把 © 渲染得很清晰圆润 */
    font-family: Arial, sans-serif !important;

    /* 如果你觉得符号偏小或偏大，还可以单独调整它的大小 */
    font-size: 1.1em;
    vertical-align: baseline;
    /* 确保符号与旁边文字对齐 */
}

/* === 清理无关元素 === */
#blog_nav_rss,
#blog_nav_newpost {
    display: none;
}