/* ==================================================
   Fwindpeak 经典 Apple 拟物风 - 居中完美版
   ================================================== */

:root {
    --bg-body: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23e0e3e6"/><path d="M0 0L4 4ZM4 0L0 4Z" stroke="%23d0d3d6" stroke-width="1"/></svg>');
    --panel-bg: linear-gradient(180deg, #f5f6f8 0%, #d8dadd 100%);
    --panel-border: #a1a5ab;
    --panel-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.8), 3px 0 10px rgba(0, 0, 0, 0.25);

    --text-main: #222;
    --text-muted: #555;
    --text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);

    --card-bg: #fdfdfd;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 15px 25px -5px rgba(0, 0, 0, 0.1), inset 0 0 2px rgba(255, 255, 255, 1);
    --card-border: #c5c5c5;

    --btn-bg: linear-gradient(180deg, #ffffff 0%, #e0e0e0 48%, #cfcfcf 52%, #e8e8e8 100%);
    --btn-border: #999;
    --btn-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.9), 0 2px 4px rgba(0, 0, 0, 0.2);

    --input-bg: #fff;
    --input-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-theme="dark"] {
    --bg-body: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%231a1a1a"/><path d="M0 0L4 4ZM4 0L0 4Z" stroke="%23222222" stroke-width="1"/></svg>');
    --panel-bg: linear-gradient(180deg, #3a3c3e 0%, #1c1d1f 100%);
    --panel-border: #0a0a0a;
    --panel-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.1), 3px 0 15px rgba(0, 0, 0, 0.8);

    --text-main: #dfdfdf;
    --text-muted: #999;
    --text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.9);

    --card-bg: linear-gradient(180deg, #2a2a2a 0%, #202020 100%);
    --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.08);
    --card-border: #111;

    --btn-bg: linear-gradient(180deg, #444 0%, #2a2a2a 48%, #1f1f1f 52%, #333 100%);
    --btn-border: #000;
    --btn-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 2px 5px rgba(0, 0, 0, 0.5);

    --input-bg: #0a0a0a;
    --input-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ================== 基础重置与大屏居中布局 ================== */
body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0 0 0 280px;
    /* 全局左侧留出 280px 空间给侧边栏 */
    transition: background 0.5s ease, color 0.5s ease;
    box-sizing: border-box;
}

a {
    color: var(--text-main);
    text-decoration: none;
}

/* 彻底隐藏博客园自带的多余元素 */
#top_nav,
#sideBarMain,
#blog_stats_place_holder,
.clear,
.postSeparator {
    display: none !important;
}

/* ================== 左侧拟物金属面板 ================== */
#header {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: var(--panel-bg);
    border-right: 1px solid var(--panel-border);
    box-shadow: var(--panel-shadow);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

#blogTitle {
    padding: 50px 20px 10px;
    text-align: center;
}

.HeaderMainTitle {
    font-size: 26px;
    font-weight: bold;
    text-shadow: var(--text-shadow);
}

#blogTitle h2 {
    font-size: 13px;
    color: var(--text-muted);
    text-shadow: var(--text-shadow);
    margin-top: 10px;
}

/* ================== 搜索框（内凹设计） ================== */
#sidebar_search {
    padding: 10px 20px 20px;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.catListTitle {
    display: none;
}

#sidebar_search_box {
    display: flex;
    justify-content: center;
}

.div_my_zzk {
    display: flex;
    gap: 8px;
    width: 100%;
}

.input_my_zzk {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--input-shadow);
    border-radius: 15px;
    padding: 8px 12px;
    color: var(--text-main);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.btn_my_zzk {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    box-shadow: var(--btn-shadow);
    border-radius: 15px;
    padding: 0 15px;
    color: var(--text-main);
    text-shadow: var(--text-shadow);
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.btn_my_zzk:active {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* ================== 统计信息与管理按钮 (沉底) ================== */
.blogStats {
    margin-top: auto;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    text-shadow: var(--text-shadow);
    padding: 0 15px;
}

#navList {
    list-style: none;
    padding: 10px 0 20px 0;
    margin: 0;
    text-align: center;
}

#navList a#blog_nav_admin {
    background: transparent;
    border: none;
    box-shadow: none;
    text-shadow: var(--text-shadow);
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.5;
    padding: 5px;
    font-weight: normal;
}

#navList a#blog_nav_admin:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ================== 右侧正文：纸质卡片 (完美居中) ================== */
#home,
#main {
    width: 100%;
    display: block;
}

#mainContent {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    /* 在右侧剩余区域完美居中 */
    padding: 40px 20px;
    box-sizing: border-box;
}

.day {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 30px 40px;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    position: relative;
}

.day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px 8px 0 0;
}

.dayTitle {
    margin-bottom: 10px;
}

.dayTitle a {
    font-size: 12px;
    color: var(--text-muted);
    text-shadow: var(--text-shadow);
}

.postTitle2 {
    font-size: 22px;
    font-weight: bold;
    text-shadow: var(--text-shadow);
    color: var(--text-main);
    line-height: 1.4;
}

.c_b_p_desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-top: 15px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

.postDesc {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px dashed rgba(150, 150, 150, 0.4);
}

/* 分页按钮居中 */
.topicListFooter {
    text-align: center;
    margin-top: 20px;
}

/* ================== Footer ================== */
#footer {
    width: 100%;
    max-width: 850px;
    margin: 0 auto 40px;
    /* 在右侧空间居中 */
    padding: 20px;
    text-align: center;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    /* 给 footer 加一点圆角 */
    box-shadow: var(--card-shadow);
    color: var(--text-main);
    text-shadow: var(--text-shadow);
    font-size: 13px;
    box-sizing: border-box;
}

/* ================== 悬浮玻璃切换按钮 ================== */
#sk-theme-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#sk-theme-btn:active {
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.6);
}

.glass-dome {
    position: absolute;
    top: 2px;
    left: 10%;
    width: 80%;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50px 50px 0 0;
    pointer-events: none;
}

#sk-theme-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--text-main);
    position: relative;
    z-index: 2;
}

body[data-theme="light"] .icon-moon {
    display: block;
}

body[data-theme="light"] .icon-sun {
    display: none;
}

body[data-theme="dark"] .icon-moon {
    display: none;
}

body[data-theme="dark"] .icon-sun {
    display: block;
}

/* ================== 移动端完美适配 ================== */
@media screen and (max-width: 768px) {
    body {
        padding-left: 0;
        /* 手机端取消左侧保留空间 */
    }

    #header {
        position: relative;
        /* 取消固定定位，跟随页面滚动 */
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--panel-border);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

    #mainContent {
        padding: 20px 15px;
    }

    #footer {
        max-width: calc(100% - 30px);
        margin: 0 auto 20px;
    }

    .day {
        padding: 20px;
    }

    #sk-theme-btn {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}