:root {
    --bg-main: #f4f5f7; --bg-panel: #ffffff; --text-main: #333333; --accent: #ff4655; --border: #e1e1e1;
}
@media (prefers-color-scheme: dark) {
    :root { --bg-main: #0f1011; --bg-panel: #1a1b1e; --text-main: #e2e4e9; --border: #2a2b2e; }
}

/* 核心修复 1：移除全局的 overflow-x: hidden，彻底释放 Sticky 封印 */
body { margin: 0; background: var(--bg-main); color: var(--text-main); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; height: auto; display: block; }

/* ==========================================================
   1. 左侧边栏 & 左图右文 Logo 字体美化
========================================================== */
/* 核心修复 2：移除此处的 overflow-x: hidden，保留 100dvh 移动端高度修复 */
.pudiu-layout-wrapper { display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; max-width: 100vw; }

.pudiu-left-sidebar { 
    width: 260px; 
    height: 100%; height: 100vh; height: 100dvh; 
    position: fixed; left: 0; top: 0; 
    background: var(--bg-panel); border-right: 1px solid var(--border); 
    display: flex; flex-direction: column; z-index: 100; 
}
.sidebar-top { padding: 30px 20px 20px; flex-shrink: 0; }
.site-title { margin: 0 0 20px; text-align: left; }
.site-title a { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.logo-img-pc { max-height: 38px; width: auto; object-fit: contain; flex-shrink: 0; }
.logo-text { font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 26px; letter-spacing: -0.5px; background: linear-gradient(135deg, var(--text-main) 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .logo-text { background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; } }

.site-search { margin-bottom: 10px; }
.site-search form { display: flex; align-items: center; background: var(--bg-main); border-radius: 50px; padding: 2px 5px; border: 2px solid transparent; transition: all 0.3s ease; }
.site-search form:focus-within { border-color: rgba(255, 70, 85, 0.3); background: var(--bg-panel); box-shadow: 0 4px 15px rgba(255,70,85,0.08); }
.search-icon { background: none; border: none; color: #aaa; padding: 10px; display: flex; align-items: center; cursor: pointer; transition: color 0.3s; }
.site-search form:focus-within .search-icon { color: var(--accent); }
.site-search input[type="search"] { flex: 1; border: none; background: transparent; padding: 8px 10px 8px 0; color: var(--text-main); font-size: 14px; outline: none; }

/* ==========================================================
   2. 完美 Flex 菜单对齐 (防换行、排版抗污染)
========================================================== */
.sidebar-nav { flex-grow: 1; overflow-y: auto; padding: 10px 20px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin-bottom: 5px; }

.sidebar-nav > ul > li > a { display: flex; align-items: center; flex-wrap: nowrap; padding: 12px 15px; border-radius: 12px; color: var(--text-main); font-weight: 500; font-size: 15px; transition: all 0.3s ease; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sidebar-nav > ul > li > a:hover, .sidebar-nav > ul > li.current-menu-item > a { background: rgba(255, 70, 85, 0.08); color: var(--accent); font-weight: 600; }
.sidebar-nav > ul > li > a > i { font-size: 16px; margin-right: 12px; width: 20px; text-align: center; flex-shrink: 0; transition: transform 0.3s; }
.sidebar-nav > ul > li > a:hover > i { transform: scale(1.1); color: var(--accent); }

.menu-text { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: inherit; }
.menu-toggle-btn { margin-left: auto; flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 14px; transition: transform 0.3s ease, background 0.3s ease; cursor: pointer; color: #888; font-family: -apple-system, sans-serif; }
.menu-toggle-btn:hover { background: rgba(255, 70, 85, 0.1); color: var(--accent); }
.sidebar-nav li.menu-open > a .menu-toggle-btn { transform: rotate(-180deg); color: var(--accent); }

.sidebar-nav .sub-menu { display: none; padding-left: 15px; border-left: 2px solid var(--border); margin: 5px 0 10px 25px; }
.sidebar-nav li.menu-open > .sub-menu { display: block; animation: slideDown 0.3s ease-out; }
.sidebar-nav .sub-menu a { position: relative; display: block; padding: 10px 15px; font-size: 14px; color: #777; border-radius: 8px; transition: all 0.2s; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.sidebar-nav .sub-menu a::before { content: '•'; position: absolute; left: -2px; opacity: 0; color: var(--accent); transition: all 0.2s; font-size: 18px; line-height: 1; font-family: sans-serif; }
.sidebar-nav .sub-menu a:hover { background: rgba(255, 70, 85, 0.05); color: var(--accent); transform: translateX(5px); }
.sidebar-nav .sub-menu a:hover::before { opacity: 1; transform: translateX(5px); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.sidebar-bottom { padding: 20px; flex-shrink: 0; border-top: 1px solid var(--border); background: var(--bg-panel); }
.user-card-wrap { display: flex; flex-direction: column; gap: 15px; }
.user-card { display: flex; align-items: center; gap: 15px; padding: 10px; border-radius: 12px; transition: background 0.3s; }
.user-card:hover { background: var(--bg-main); }
.user-card img { border-radius: 50%; width: 44px; height: 44px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 15px; }
.user-role { font-size: 12px; color: #999; background: var(--bg-main); padding: 2px 8px; border-radius: 4px; display: inline-block; margin-top: 4px; }
.logged-in-actions, .user-actions { display: flex; gap: 10px; width: 100%; }
.btn { text-align: center; border-radius: 10px; font-weight: bold; font-size: 14px; transition: all 0.2s; flex: 1; padding: 10px 0; }
.login-btn, .logout-btn { background: var(--bg-main); color: var(--text-main); }
.login-btn:hover { background: #e2e4e9; color: #000; }
.logout-btn:hover { background: #fee2e2; color: #ef4444; }
.reg-btn, .admin-btn { background: var(--accent); color: #fff; }
.reg-btn:hover, .admin-btn:hover { opacity: 0.9; }

/* ==========================================================
   3. Grid 框架与右侧边栏跟随吸附 (统一 Widget 间距)
========================================================== */
.pudiu-content-wrapper { margin-left: 260px; width: calc(100% - 260px); padding: 30px; box-sizing: border-box; display: grid; gap: 30px; align-items: start; }
.layout-three-column .pudiu-content-wrapper { grid-template-columns: minmax(0, 1fr) 320px; }
.layout-two-column .pudiu-content-wrapper { grid-template-columns: minmax(0, 1fr); }
.layout-two-column .pudiu-right-sidebar { display: none !important; }

/* 侧边栏吸附代码 (已恢复生效) */
.pudiu-right-sidebar { position: sticky; top: max(100vh - 100%, 30px); padding-bottom: 30px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-inner-wrap { display: flex; flex-direction: column; gap: 20px; } 
.widget-area { display: flex; flex-direction: column; gap: 20px; }

.widget { background: var(--bg-panel); padding: 25px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: none; margin-bottom: 0 !important; }
.widget-title { margin: 0 0 20px 0; font-size: 18px; font-weight: 700; border-left: 4px solid var(--accent); padding-left: 14px; line-height: 1.2; color: var(--text-main); word-wrap: break-word; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 12px 0; border-bottom: 1px dashed var(--border); display: flex; align-items: center; }
.widget ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget ul li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--border); margin-right: 12px; transition: background 0.3s; flex-shrink: 0; }
.widget ul li:hover::before { background: var(--accent); }
.widget ul li a { color: var(--text-main); transition: color 0.3s; text-decoration: none; font-size: 14px; flex-grow: 1; }
.widget ul li a:hover { color: var(--accent); }

.sidebar-footer-copyright { padding: 20px; font-size: 13px; color: #888; line-height: 1.8; text-align: center; }
.designer-credit { display: block; margin-top: 5px; color: var(--accent); font-weight: 800; font-size: 14px; letter-spacing: 0.5px; }

/* ==========================================================
   4. 通用 UI 模块
========================================================== */
.borderless-card { border-radius: 12px; background: var(--bg-panel); overflow: hidden; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.03); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.borderless-card:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }

.section-heading-wrap { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 15px; margin: 40px 0 25px 0; }
.section-title { margin: 0; font-size: 22px; color: var(--text-main); font-weight: 800; border-left: 5px solid var(--accent); padding-left: 15px; line-height: 1; }
.section-more-btn { font-size: 14px; color: #888; display: flex; align-items: center; transition: color 0.2s; font-weight: 600; text-decoration: none; }
.section-more-btn:hover { color: var(--accent); }
.section-more-btn .arrow { margin-left: 5px; transition: transform 0.2s; }
.section-more-btn:hover .arrow { transform: translateX(4px); }

.section-keywords { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.keyword-pill { font-size: 13px; color: #666; background: rgba(0,0,0,0.04); padding: 6px 14px; border-radius: 20px; text-decoration: none; transition: all 0.3s ease; font-weight: 600; }
.keyword-pill:hover { background: var(--accent); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(255, 70, 85, 0.2); }

/* ==========================================================
   5. CMS 前台卡片大重构
========================================================== */
.pudiu-pro-slider-wrap { width: 100%; margin-bottom: 40px; }
.home-slider { width: 100%; aspect-ratio: 21 / 9; position: relative; overflow: hidden; border-radius: 12px; -webkit-mask-image: -webkit-radial-gradient(white, black); mask-image: radial-gradient(white, black); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.slider-wrapper { display: flex; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); }
.slide-item { flex: 0 0 100%; width: 100%; height: 100%; position: relative; }
.slide-item img, .slide-item video { width: 100%; height: 100%; object-fit: cover; }
.slide-hover-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.slide-item:hover .slide-hover-overlay { opacity: 1; pointer-events: auto; }
.slide-hover-content { text-align: center; transform: translateY(20px); transition: transform 0.4s ease; }
.slide-item:hover .slide-hover-content { transform: translateY(0); }
.slide-heading { margin: 0 0 20px 0; font-size: 28px; line-height: 1.2; color: #ffffff; font-weight: bold; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.slide-btn { background: var(--accent); color: #ffffff; padding: 12px 30px; border-radius: 8px; font-weight: bold; font-size: 15px; display: inline-block; transition: background 0.2s; }
.slide-btn:hover { background: #e03e4d; }

.home-cms-grid { margin-bottom: 40px; }
.cms-block { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 180px); gap: 15px; margin-bottom: 15px; }
.post-card { position: relative; border-radius: 12px; overflow: hidden; }
.card-bg { width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.3s; }
.post-card:hover .card-bg { transform: scale(1.05); }
.card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 15px 15px; background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.4) 60%, transparent); color:#fff; }
.card-info h3 { margin: 0; font-size: 13px; line-height: 1.4; color:#fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;}
.grid-layout-1-5 .card-large { grid-column: 1 / 3; grid-row: 1 / 3; }
.grid-layout-5-1 .card-large { grid-column: 3 / 5; grid-row: 1 / 3; }
.card-large h3 { font-size: 18px; }

/* 仅普通列表卡片开放溢出权限允许弹窗 */
.pudiu-list-card.borderless-card { overflow: visible !important; }

.pudiu-pro-list-wrap { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.pudiu-list-layout { display: flex; flex-direction: row; min-height: 210px; height: 100%; align-items: stretch; background: var(--bg-panel); border-radius: 12px; }

.pudiu-list-thumb { position: relative; width: 320px; flex-shrink: 0; display: block; border-radius: 12px 0 0 12px; overflow: hidden; }
.pudiu-list-thumb > a:not(.category-badge-img) { display: block; width: 100%; height: 100%; }
.pudiu-list-thumb > a > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; display: block; }
.pudiu-list-card:hover .pudiu-list-thumb > a > img { transform: scale(1.05); }

.category-badge-img { 
    position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; 
    padding: 4px 14px; font-size: 11px; font-weight: 800; border-radius: 50px; 
    z-index: 10; text-transform: uppercase; letter-spacing: 0.5px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); text-decoration: none; transition: all 0.2s; 
    display: inline-block !important; width: max-content !important; height: auto !important; line-height: 1.2;
}
.category-badge-img:hover { background: #000; transform: translateY(-2px); color: #fff; }

.pudiu-list-info { flex: 1; padding: 25px 30px; display: flex; flex-direction: column; justify-content: space-between; height: auto; min-width: 0; }
.info-top { flex-grow: 1; padding-bottom: 15px; }
.info-top a { text-decoration: none; color: var(--text-main); }
.pudiu-list-title { margin: 0 0 10px 0; font-size: 18px; font-weight: 700; line-height: 1.4; transition: color 0.2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pudiu-list-title:hover { color: var(--accent); }
.pudiu-list-desc { font-size: 14px; color: #777; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px; }

.title-tooltip-wrap { position: relative; display: inline-block; text-decoration: none; color: var(--text-main); z-index: 20; }
.title-tooltip-wrap::after {
    content: attr(data-tooltip); position: absolute; top: calc(100% + 8px); left: 0;
    background: rgba(15, 16, 17, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
    width: max-content; max-width: 280px; white-space: normal; line-height: 1.5; text-align: left;
    z-index: 100; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 10px 25px rgba(0,0,0,0.2); pointer-events: none;
}
.title-tooltip-wrap::before {
    content: ''; position: absolute; top: 100%; left: 20px;
    border-width: 0 6px 8px 6px; border-style: solid; border-color: transparent transparent rgba(15, 16, 17, 0.95) transparent;
    z-index: 100; opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); pointer-events: none;
}
.title-tooltip-wrap:hover::after, .title-tooltip-wrap:hover::before { opacity: 1; visibility: visible; transform: translateY(0); }

/* 精简版标签防撑爆定高截断法 */
.pudiu-list-tags-wrap { display: flex; gap: 8px; margin-top: 12px; margin-bottom: 8px; flex-wrap: wrap; height: 26px; overflow: hidden; }
.tag-pill { flex-shrink: 0; background: rgba(136, 136, 136, 0.08); color: #666; padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; transition: all 0.2s; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; height: 26px; line-height: 18px; display: inline-block; }
.tag-pill:hover { background: var(--accent); color: #fff; }

.info-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 15px; }
.pudiu-list-meta, .single-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; font-size: 13px; color: #888; font-weight: 500; }
.meta-item { display: flex; align-items: center; gap: 6px; }
.meta-item i { font-size: 14px; opacity: 0.8; }
.meta-item.author-link { color: var(--text-main); font-weight: 600; text-decoration: none; transition: color 0.2s; }
.meta-item.author-link:hover { color: var(--accent); }
.meta-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

.profile-list-layout { min-height: 160px; }
.profile-list-thumb { width: 220px; }

/* ==========================================================
   6. 文章详情正文排版
========================================================== */
.breadcrumbs { font-size: 13px; color: #888; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.breadcrumbs a { color: var(--text-main); font-weight: 500; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .separator { font-size: 10px; color: #ccc; }

.single-header { margin-bottom: 30px; text-align: left; border-bottom: 1px solid var(--border); padding-bottom: 30px; }
.single-title { font-size: 28px; font-weight: 800; line-height: 1.3; margin: 0 0 15px; color: var(--text-main); }
.single-featured-img { width: 100%; border-radius: 12px; overflow: hidden; margin-bottom: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.entry-content { font-size: 16px; line-height: 1.8; color: var(--text-main); word-wrap: break-word; overflow-wrap: break-word; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { color: var(--text-main); font-weight: 700; margin-top: 1.5em; margin-bottom: 0.8em; line-height: 1.4; word-wrap: break-word; }
.entry-content h1 { font-size: 2em; border-bottom: 2px solid var(--accent); padding-bottom: 10px; margin-top: 1em; }
.entry-content h2 { font-size: 1.6em; border-bottom: 1px dashed var(--border); padding-bottom: 8px; position: relative; }
.entry-content h2::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 60px; height: 1px; background: var(--accent); }
.entry-content h3 { font-size: 1.4em; border-left: 4px solid var(--accent); padding-left: 12px; background: rgba(0,0,0,0.02); padding-top: 4px; padding-bottom: 4px; border-radius: 0 4px 4px 0; }
@media (prefers-color-scheme: dark) { .entry-content h3 { background: rgba(255,255,255,0.05); } }
.entry-content h4 { font-size: 1.2em; position: relative; padding-left: 14px; }
.entry-content h4::before { content: '•'; position: absolute; left: 0; color: var(--accent); }
.entry-content h5 { font-size: 1em; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.entry-content h6 { font-size: 0.9em; color: #888; font-style: italic; }
.entry-content blockquote { margin: 1.5em 0; padding: 15px 20px; background: rgba(255, 70, 85, 0.05); border-left: 4px solid var(--accent); color: #666; font-style: italic; border-radius: 0 8px 8px 0; }
@media (prefers-color-scheme: dark) { .entry-content blockquote { color: #aaa; background: rgba(255,255,255,0.05); } }
.entry-content ul, .entry-content ol { margin-bottom: 1.5em; padding-left: 20px; }
.entry-content li { margin-bottom: 8px; }
.entry-content img { border-radius: 8px; max-width: 100%; height: auto; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }

.pudiu-pagination { margin-top: 40px; display: flex; justify-content: center; gap: 10px; }
.pudiu-pagination .page-numbers { padding: 8px 16px; background: var(--bg-panel); border-radius: 8px; color: var(--text-main); font-weight: bold; border: 1px solid var(--border); transition: all 0.3s; }
.pudiu-pagination .page-numbers:hover, .pudiu-pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-header.no-results { text-align: center; padding: 60px 20px; background: var(--bg-panel); border-radius: 12px; margin-bottom: 30px; }
.page-title.no-results { font-size: 32px; font-weight: 800; margin-bottom: 15px; }

/* 详情页底部标签网格间距防粘连 */
.pudiu-list-tags { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 40px; padding-top: 20px; border-top: 1px dashed var(--border); }

/* ==========================================================
   7. 评论系统
========================================================== */
.comments-area { margin-top: 40px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px 0; }
.comment-list .comment { margin-bottom: 30px; }
.comment-body { display: block; padding-bottom: 20px; border-bottom: 1px dashed var(--border); }
.comment-meta { display: flex; align-items: center; margin-bottom: 15px; }
.comment-author { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--text-main); }
.comment-author img.avatar { border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-right: 5px; }
.comment-metadata { margin-left: 15px; font-size: 12px; }
.comment-metadata a { color: #888; text-decoration: none; }
.comment-metadata a:hover { color: var(--accent); }
.comment-content { font-size: 15px; line-height: 1.6; color: var(--text-main); word-wrap: break-word; margin-bottom: 15px; }
.comment-content p { margin: 0 0 10px 0; }
.comment-list .children { list-style: none; border-left: 2px solid var(--border); padding-left: 20px; margin-left: 24px; margin-top: 20px; }
.comment-reply-link { display: inline-block; background: rgba(0,0,0,0.04); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; color: #666; transition: all 0.2s; }
.comment-reply-link:hover { background: var(--accent); color: #fff; }

#respond { margin-top: 30px; }
#reply-title { font-size: 20px; font-weight: 700; margin-bottom: 15px; color: var(--text-main); }
#reply-title small a { font-size: 14px; color: var(--accent); margin-left: 10px; font-weight: normal; }
.comment-notes { color: #888; font-size: 13px; margin-bottom: 20px; }
.comment-form-group { display: flex; gap: 20px; margin-bottom: 20px; }
.comment-form-author, .comment-form-email, .comment-form-url, .comment-form-comment { display: flex; flex-direction: column; flex: 1; }
.comment-form-comment { margin-bottom: 20px; }
#respond label { font-size: 13px; font-weight: 600; color: #666; margin-bottom: 8px; }
#respond .required { color: var(--accent); }
#respond input[type="text"], #respond input[type="email"], #respond input[type="url"], #respond textarea { background: var(--bg-main); border: 2px solid transparent; border-radius: 12px; padding: 12px 15px; color: var(--text-main); font-size: 14px; outline: none; transition: all 0.3s; font-family: inherit; width: 100%; box-sizing: border-box; }
#respond input:focus, #respond textarea:focus { border-color: rgba(255, 70, 85, 0.3); background: var(--bg-panel); box-shadow: 0 4px 15px rgba(255,70,85,0.05); }
#respond textarea { resize: vertical; }
.submit-btn { background: var(--accent); color: #fff; border: none; padding: 12px 30px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.submit-btn:hover { background: #e03e4d; }

/* ==========================================================
   8. OTP 弹窗
========================================================== */
.pudiu-auth-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.pudiu-auth-modal.active { opacity: 1; pointer-events: auto; }
.pudiu-auth-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.pudiu-auth-box { position: relative; z-index: 1; background: var(--bg-panel); width: 90%; max-width: 400px; padding: 40px; border-radius: 20px; box-shadow: 0 20px 40px rgba(0,0,0,0.15); transform: translateY(20px) scale(0.95); transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.pudiu-auth-modal.active .pudiu-auth-box { transform: translateY(0) scale(1); }
.pudiu-auth-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 28px; color: #888; cursor: pointer; transition: color 0.2s; }
.pudiu-auth-close:hover { color: var(--accent); }
.pudiu-auth-header { text-align: center; margin-bottom: 30px; }
.pudiu-auth-header h3 { margin: 0 0 10px 0; font-size: 24px; font-weight: 800; color: var(--text-main); }
.pudiu-auth-header p { margin: 0; font-size: 14px; color: #777; line-height: 1.5; }
.pudiu-auth-form .auth-input-group { margin-bottom: 15px; }
.pudiu-auth-form input { width: 100%; box-sizing: border-box; padding: 14px 15px; font-size: 15px; color: var(--text-main); background: var(--bg-main); border: 2px solid transparent; border-radius: 12px; outline: none; transition: all 0.3s; }
.pudiu-auth-form input:focus { border-color: rgba(255, 70, 85, 0.3); background: var(--bg-panel); }
.auth-code-group { display: flex; gap: 10px; }
.auth-code-group input { flex: 1; }
.auth-code-group button { flex-shrink: 0; width: 110px; background: rgba(255, 70, 85, 0.1); color: var(--accent); border: none; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.auth-code-group button:hover:not(:disabled) { background: var(--accent); color: #fff; }
.auth-code-group button:disabled { background: var(--bg-main); color: #aaa; cursor: not-allowed; }
.auth-submit-btn { width: 100%; padding: 14px; margin-top: 10px; background: var(--accent); color: #fff; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.auth-submit-btn:hover:not(:disabled) { background: #e03e4d; }
.auth-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.auth-message { margin: 10px 0; font-size: 13px; text-align: center; min-height: 18px; }
.auth-message.success { color: #10b981; }
.auth-message.error { color: #ef4444; }

/* ==========================================================
   9. 高级个人中心 (User Center) 与表单美化
========================================================== */
.profile-header { position: relative; margin-bottom: 40px; }
.profile-cover { height: 180px; background: linear-gradient(135deg, var(--accent) 0%, #ff8a95 100%); border-radius: 12px 12px 0 0; }
.profile-main-info { padding: 0 30px 30px; display: flex; align-items: flex-end; gap: 20px; position: relative; margin-top: -50px; }

.profile-avatar-wrap img { width: 120px; height: 120px; border-radius: 50%; border: 5px solid var(--bg-panel); background: var(--bg-panel); box-shadow: 0 4px 15px rgba(0,0,0,0.1); object-fit: cover; }
.profile-text-wrap { flex: 1; padding-bottom: 5px; }
.profile-name { margin: 0 0 5px 0; font-size: 26px; font-weight: 800; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.profile-role { font-size: 12px; font-weight: 600; background: rgba(255, 70, 85, 0.1); color: var(--accent); padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }
.profile-meta { font-size: 14px; color: #777; display: flex; gap: 20px; }

.profile-actions { padding-bottom: 10px; }
.edit-profile-btn { background: var(--bg-main); color: var(--text-main); border: 1px solid var(--border); padding: 10px 20px; border-radius: 10px; font-size: 14px; transition: all 0.2s; font-weight: bold; }
.edit-profile-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.follow-stats strong { color: var(--text-main); font-weight: 800; font-size: 16px; }
.follow-btn { background: var(--text-main); color: #fff; border: 2px solid var(--text-main); padding: 10px 25px; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); }
.follow-btn:hover { background: #000; border-color: #000; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.follow-btn.following { background: transparent; color: var(--text-main); }
.follow-btn.following:hover { background: rgba(0,0,0,0.05); color: #ef4444; border-color: #ef4444; content: "Unfollow"; }

.pudiu-switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0;}
.pudiu-switch input { opacity: 0; width: 0; height: 0; }
.pudiu-switch .slider { position: absolute; cursor: pointer; inset: 0; background-color: #ccc; transition: .4s; }
.pudiu-switch .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
.pudiu-switch input:checked + .slider { background-color: var(--accent); }
.pudiu-switch input:focus + .slider { box-shadow: 0 0 1px var(--accent); }
.pudiu-switch input:checked + .slider:before { transform: translateX(22px); }
.pudiu-switch .slider.round { border-radius: 34px; }
.pudiu-switch .slider.round:before { border-radius: 50%; }

.profile-comment-list { list-style: none; padding: 0; margin: 0; }
.profile-comment-list li { border-bottom: 1px dashed var(--border); padding: 20px 0; }
.profile-comment-list li:last-child { border-bottom: none; padding-bottom: 0; }
.pcm-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; }
.pcm-date { color: #999; }
.pcm-status { padding: 4px 10px; border-radius: 6px; font-weight: bold; font-size: 11px; text-transform: uppercase; }
.pcm-status.approved { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.pcm-status.pending { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.pcm-content { font-size: 14px; line-height: 1.6; color: var(--text-main); margin-bottom: 10px; padding: 12px; background: var(--bg-main); border-radius: 8px; border-left: 3px solid var(--border); }
.pcm-post { font-size: 13px; color: #777; }
.pcm-post a { color: var(--text-main); font-weight: 600; transition: color 0.2s; }
.pcm-post a:hover { color: var(--accent); }

.sys-notice { padding: 15px 20px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; text-align: center; }
.sys-notice.success { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.sys-notice.error { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

.profile-edit-section { padding: 0 30px 30px; border-top: 1px dashed var(--border); margin-top: 10px; animation: slideDown 0.3s ease-out; }
.form-row { margin-bottom: 20px; display: flex; flex-direction: column; }
.form-row-group { display: flex; gap: 20px; }
.form-row label { font-size: 13px; font-weight: bold; color: #666; margin-bottom: 8px; }
.form-row input[type="text"], .form-row input[type="password"] { background: var(--bg-main); border: 2px solid transparent; padding: 12px 15px; border-radius: 10px; color: var(--text-main); font-size: 15px; transition: all 0.3s; outline: none; width: 100%; box-sizing: border-box; }
.form-row input[type="text"]:focus, .form-row input[type="password"]:focus { border-color: rgba(255, 70, 85, 0.3); background: var(--bg-panel); box-shadow: 0 4px 15px rgba(255,70,85,0.05); }
.form-row .desc { font-size: 12px; color: #999; margin-top: 6px; }

input[type="file"].file-input { padding: 10px 15px; background: var(--bg-main); border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; font-size: 14px; color: #666; }
input[type="file"].file-input:hover { border-color: var(--accent); background: rgba(255, 70, 85, 0.02); }
input[type="file"].file-input::file-selector-button { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; color: var(--text-main); font-weight: 600; margin-right: 15px; cursor: pointer; transition: all 0.2s; }
input[type="file"].file-input::file-selector-button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.form-actions { display: flex; gap: 15px; justify-content: flex-end; margin-top: 10px; }
.btn-cancel, .btn-save { border: none; padding: 12px 25px; border-radius: 10px; font-weight: bold; cursor: pointer; transition: all 0.2s; font-size: 14px; }
.btn-cancel { background: var(--bg-main); color: #666; }
.btn-cancel:hover { background: #e2e4e9; color: #000; }
.btn-save { background: var(--accent); color: #fff; }
.btn-save:hover { background: #e03e4d; box-shadow: 0 4px 15px rgba(255,70,85,0.2); }

/* ==========================================================
   10. 移动端纯净排版与自适应 (大杀器：Grid 上大下小网格)
========================================================== */
.mobile-header { display: none; width: 100%; box-sizing: border-box; padding: 15px 20px; background: var(--bg-panel); align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 99; border-bottom: 1px solid var(--border); }
.mobile-logo a { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-img { max-height: 32px; width: auto; object-fit: contain; flex-shrink: 0; }
.hamburger-btn { background: none; border: none; font-size: 24px; color: var(--text-main); cursor: pointer; display: flex; align-items: center; }

.pudiu-mobile-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 95; opacity: 0; visibility: hidden; transition: all 0.3s ease; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.pudiu-mobile-overlay.active { opacity: 1; visibility: visible; }

/* 核心修复 3：移动端防溢出锁定区 (仅在此处设置 hidden，完美保留 PC 端的 sticky 侧栏) */
@media (max-width: 1024px) {
    body, html { overflow-x: hidden; }
    .pudiu-layout-wrapper { width: 100%; max-width: 100vw; overflow-x: hidden; }
    
    .mobile-header { display: flex; }
    .pudiu-left-sidebar .site-title { display: block; margin-bottom: 25px; text-align: left; }
    .pudiu-left-sidebar .site-title .logo-text { font-size: 24px; }
    .pudiu-left-sidebar .sidebar-top { padding: 40px 25px 20px; } 
    
    .pudiu-left-sidebar { transform: translateX(-100%); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 10px 0 40px rgba(0,0,0,0.15); width: 280px; z-index: 100; border-radius: 0 24px 24px 0; }
    .pudiu-left-sidebar.menu-open { transform: translateX(0); }
    
    .sidebar-nav { padding: 0 25px; }
    .sidebar-nav > ul > li { margin-bottom: 8px; }
    .sidebar-nav > ul > li > a { padding: 14px 16px; font-size: 16px; border-radius: 14px; }
    .sidebar-nav > ul > li > a > i { font-size: 18px; margin-right: 14px; }
    .sidebar-bottom { padding: 20px 25px calc(20px + env(safe-area-inset-bottom)); border-top-color: rgba(0,0,0,0.05); }
    .user-card { padding: 12px; }

    .pudiu-content-wrapper { margin-left: 0; width: 100%; box-sizing: border-box; padding: 20px; display: flex; flex-direction: column; gap: 20px;}
    .layout-three-column .pudiu-content-wrapper, .layout-two-column .pudiu-content-wrapper { display: flex; }
    .pudiu-right-sidebar { display: none !important; }
    
    .cms-block { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 160px 160px; }
    .grid-layout-1-5 .card-large, .grid-layout-5-1 .card-large { grid-column: 1 / 3; grid-row: 1 / 2; height: 100%; }
    
    .home-slider { aspect-ratio: 16 / 10; }
    
    .pudiu-list-layout, .profile-list-layout { flex-direction: column; min-height: auto; }
    .pudiu-list-thumb, .profile-list-thumb { width: 100%; height: 200px; border-radius: 12px 12px 0 0; }
    
    .pudiu-list-info { height: auto !important; padding: 20px; }
    .info-bottom { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 15px; padding-top: 15px; }
    
    article[style*="padding: 40px"], .borderless-card[style*="padding: 40px"] { padding: 20px !important; }
    .comments-area[style*="padding: 40px"] { padding: 20px !important; margin-top: 20px !important; }
    .error-404[style*="padding: 80px 40px"] { padding: 40px 20px !important; }
    .page-header[style*="padding: 30px"] { padding: 20px !important; }
    
    .single-title { font-size: 24px; margin-bottom: 10px; }
    .single-header { margin-bottom: 20px; padding-bottom: 20px; }
    .single-meta { gap: 10px; }
    
    .profile-main-info { flex-direction: column; align-items: center; text-align: center; margin-top: -60px; padding: 0 20px 20px; }
    .profile-meta { justify-content: center; flex-direction: column; gap: 5px; }
    .profile-actions { margin-top: 15px; width: 100%; }
    .edit-profile-btn { display: block; width: 100%; box-sizing: border-box; }
    
    .form-row-group { flex-direction: column; gap: 0; }
    .profile-edit-section { padding: 0 20px 20px; }
    .form-actions { flex-direction: column; }
    .btn-cancel, .btn-save { width: 100%; }
    .comment-list .children { margin-left: 10px; padding-left: 10px; }
}

@media (max-width: 768px) {
    /* 强行提至第一行的“上大下小”网格方案 */
    .cms-block { 
        display: grid; 
        grid-template-columns: repeat(2, 1fr); 
        grid-template-rows: 200px repeat(2, 140px); 
        gap: 10px; 
        height: auto; 
    }
    .grid-layout-1-5 .card-large, .grid-layout-5-1 .card-large { 
        grid-column: 1 / -1; 
        grid-row: 1 / 2;     
    }
    
    .home-slider { aspect-ratio: 4 / 3; }
    .slide-heading { font-size: 22px; }
}

/* ==========================================================
   11. AJAX 动态加载按钮
========================================================== */
.pudiu-load-more-wrap { text-align: center; margin: 40px 0; }
.load-more-btn { 
    background: var(--bg-panel); color: var(--text-main); 
    border: 1px solid var(--border); padding: 14px 50px; 
    border-radius: 50px; font-weight: 700; font-size: 15px; 
    cursor: pointer; transition: all 0.3s; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03); 
    display: inline-flex; align-items: center; justify-content: center;
}
.load-more-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(255, 70, 85, 0.2); }
.load-more-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; box-shadow: none; }
.load-more-btn .fa-spinner { margin-left: 10px; font-size: 16px; }

/* ==========================================================
   12. 自定义侧边栏小工具专属美化 (Widgets)
========================================================== */
.pudiu-widget-search form { position: relative; display: flex; align-items: center; }
.pudiu-widget-search input[type="search"] { width: 100%; background: var(--bg-main); border: 2px solid transparent; padding: 14px 45px 14px 15px; border-radius: 12px; color: var(--text-main); font-size: 14px; outline: none; transition: all 0.3s; }
.pudiu-widget-search input[type="search"]::placeholder { color: #999; }
.pudiu-widget-search input[type="search"]:focus { border-color: rgba(255, 70, 85, 0.4); background: var(--bg-panel); box-shadow: 0 4px 15px rgba(255, 70, 85, 0.08); }
.pudiu-widget-search button { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: transparent; border: none; color: #888; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.pudiu-widget-search button:hover { color: var(--accent); background: rgba(255, 70, 85, 0.1); }

.pudiu-widget-post-list { display: flex; flex-direction: column; gap: 16px; }
.pudiu-widget-post-item { display: flex; align-items: center; gap: 15px; text-decoration: none; padding: 8px; border-radius: 12px; transition: background 0.3s ease, transform 0.3s ease; margin-left: -8px; width: calc(100% + 16px); }
.pudiu-widget-post-item:hover { background: var(--bg-main); }
.pudiu-widget-thumb { width: 75px; height: 75px; border-radius: 10px; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: transform 0.3s ease; }
.pudiu-widget-post-item:hover .pudiu-widget-thumb { transform: scale(1.05); }
.pudiu-widget-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pudiu-widget-title { margin: 0 0 6px 0; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--text-main); transition: color 0.2s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pudiu-widget-post-item:hover .pudiu-widget-title { color: var(--accent); }
.pudiu-widget-meta { font-size: 12px; color: #888; display: flex; align-items: center; gap: 5px; }

.pudiu-widget-tags-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.pudiu-widget-tags-wrap a { display: inline-block; background: rgba(0,0,0,0.03); color: #555; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; border: 1px solid rgba(0,0,0,0.02); }
.pudiu-widget-tags-wrap a:hover { background: rgba(255, 70, 85, 0.05); color: var(--accent); border-color: rgba(255, 70, 85, 0.2); transform: translateY(-2px); }

@media (prefers-color-scheme: dark) {
    .pudiu-widget-tags-wrap a { background: rgba(255,255,255,0.05); color: #aaa; border-color: transparent; }
    .pudiu-widget-tags-wrap a:hover { background: rgba(255, 70, 85, 0.1); color: var(--accent); }
}

/* ==========================================================
   13. 文章详情页上下篇导航 (Post Navigation)
========================================================== */
.pudiu-post-navigation { display: flex; gap: 20px; margin-top: 40px; padding-top: 30px; border-top: 1px dashed var(--border); }
.pudiu-post-navigation .nav-item { flex: 1; display: flex; align-items: center; gap: 15px; background: rgba(0,0,0,0.02); padding: 12px; border-radius: 12px; text-decoration: none; transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); min-width: 0; border: 1px solid transparent; }
@media (prefers-color-scheme: dark) { .pudiu-post-navigation .nav-item { background: rgba(255,255,255,0.02); } }
.pudiu-post-navigation .nav-item.empty { background: transparent; pointer-events: none; border: none; }
.pudiu-post-navigation .nav-item:not(.empty):hover { background: var(--bg-panel); border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(255, 70, 85, 0.08); }
.pudiu-post-navigation .nav-thumb { width: 70px; height: 70px; flex-shrink: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.pudiu-post-navigation .nav-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pudiu-post-navigation .nav-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.pudiu-post-navigation .nav-next .nav-info { text-align: right; }
.pudiu-post-navigation .nav-label { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; margin-bottom: 6px; display: flex; align-items: center; gap: 5px; transition: color 0.2s; }
.pudiu-post-navigation .nav-next .nav-label { justify-content: flex-end; }
.pudiu-post-navigation .nav-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--text-main); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color 0.2s; }
.pudiu-post-navigation .nav-item:not(.empty):hover .nav-title, .pudiu-post-navigation .nav-item:not(.empty):hover .nav-label { color: var(--accent); }
@media (max-width: 768px) { .pudiu-post-navigation { flex-direction: column; gap: 15px; } .pudiu-post-navigation .nav-item { padding: 10px; } }