:root {
    --bg-body: #f0f2f5;
    --bg-card: #fff;
    --bg-header: #fff;
    --bg-input: #f5f5f5;
    --bg-badge: #f0f2f5;
    --bg-badge-item: #f6f7f9;
    --text-main: #333;
    --text-secondary: #555;
    --text-muted: #999;
    --text-placeholder: #666;
    --border-color: #ddd;
    --border-divider: #eee;
    --primary-color: #007bff;
    --hover-bg: #e2effd;
    --active-bg: #d0e7ff;
    --shadow-light: rgba(0,0,0,0.05);
    --shadow-hover: rgba(0,0,0,0.08);
    --form-radius: 6px;
    --form-height: 40px;
    --form-padding-y: 10px;
    --form-padding-x: 12px;
    --btn-radius: 6px;
    --btn-height: 36px;
    --btn-padding-y: 8px;
    --btn-padding-x: 16px;
}

body.dark-mode {
    --bg-body: #18191a;
    --bg-card: #242526;
    --bg-header: #242526;
    --bg-input: #3a3b3c;
    --bg-badge: #3a3b3c;
    --bg-badge-item: #3a3b3c;
    --text-main: #e4e6eb;
    --text-secondary: #b0b3b8;
    --text-muted: #b0b3b8;
    --text-placeholder: #b0b3b8;
    --border-color: #3e4042;
    --border-divider: #3e4042;
    --primary-color: #4599ff;
    --hover-bg: #303030;
    --active-bg: #3a3b3c;
    --shadow-light: rgba(0,0,0,0.2);
    --shadow-hover: rgba(0,0,0,0.3);
    background-image: none !important;
}

html { overflow-y: scroll; }
body { font-family: "Microsoft YaHei", sans-serif; background-color: var(--bg-body); color: var(--text-main); margin: 0; padding: 0; line-height: 1.6; transition: background-color 0.3s, color 0.3s; background-position: center center; }

/* Site background image */
body {
    background-image: url('/bj.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
a { text-decoration: none; color: var(--text-main); transition: color 0.2s; }
a:hover { color: var(--primary-color); }
ul, ol { list-style: none; padding: 0; margin: 0; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; box-sizing: border-box; }
.clearfix::after { content: ""; display: table; clear: both; }

/* Global form controls */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
select {
    height: var(--form-height);
    padding: var(--form-padding-y) var(--form-padding-x);
    border: 1px solid var(--border-divider);
    border-radius: var(--form-radius);
    background: var(--bg-input);
    color: var(--text-main);
    box-sizing: border-box;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,123,255,0.12);
}
textarea {
    width: 100%;
    min-height: 90px;
    padding: var(--form-padding-y) var(--form-padding-x);
    border: 1px solid var(--border-divider);
    border-radius: var(--form-radius);
    background: var(--bg-input);
    color: var(--text-main);
    box-sizing: border-box;
    outline: none;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Global button defaults */
button,
.btn,
input[type="button"],
input[type="submit"] {
    display: inline-block;
    height: var(--btn-height);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    border-radius: var(--btn-radius);
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

/* Button semantic variants */
.btn-primary {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}
.btn-primary:hover { filter: brightness(0.95); box-shadow: 0 2px 8px rgba(0,123,255,0.25); }

.btn-secondary {
    --secondary-color: #6c757d;
    background: var(--secondary-color);
    color: #fff;
    border: 1px solid var(--secondary-color);
}
.btn-secondary:hover { filter: brightness(0.95); box-shadow: 0 2px 8px rgba(108,117,125,0.25); }

.btn-danger {
    --danger-color: #ff4d4f;
    background: var(--danger-color);
    color: #fff;
    border: 1px solid var(--danger-color);
}
.btn-danger:hover { filter: brightness(0.95); box-shadow: 0 2px 8px rgba(255,77,79,0.25); }

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-outline-primary:hover { background: rgba(0,123,255,0.08); }

.btn-outline-secondary {
    --secondary-color: #6c757d;
    background: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}
.btn-outline-secondary:hover { background: rgba(108,117,125,0.08); }

.btn-outline-danger {
    --danger-color: #ff4d4f;
    background: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}
.btn-outline-danger:hover { background: rgba(255,77,79,0.08); }

.site-header { background: var(--bg-header); box-shadow: 0 1px 3px var(--shadow-light); padding: 15px 0; margin-bottom: 20px; position: sticky; top: 0; z-index: 1000; transition: background-color 0.3s; }
.site-header .container { display: flex; align-items: center; }
.logo { font-size: 24px; font-weight: bold; display: flex; align-items: center; width: 140px; margin-right: 20px; flex-shrink: 0; padding-left: 25px; box-sizing: border-box; }
.logo a { color: var(--primary-color); display: flex; align-items: center; gap: 10px; }
.logo img { height: 40px; }
.main-nav ul { display: flex; gap: 16px; }
.main-nav li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 4px;
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    font-family: SimHei, "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.2;
    background: transparent;
    border: none;
    border-radius: 0;
}
.main-nav li a:hover,
.main-nav li.on a,
.main-nav li.active a {
    color: #34495e;
    background: transparent;
    border-color: transparent;
}
.main-nav li a i { color: currentColor; }
.search-box { margin-left: auto; display: flex; align-items: center; }
.search-box form { display: flex; border: 1px solid var(--border-color); border-radius: 20px; overflow: hidden; background: var(--bg-input); }
.search-box input { border: none; padding: 8px 15px; outline: none; background: transparent; width: 200px; color: var(--text-main); }
.search-box button { background: transparent; color: var(--text-placeholder); border: none; padding: 8px 15px; cursor: pointer; }

.dark-mode-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
    padding: 5px;
    margin-left: 15px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}
.dark-mode-toggle:hover {
    color: var(--primary-color);
}

.main-wrapper { display: flex; gap: 20px; align-items: flex-start; padding-top: 20px; }
.left-sidebar { width: 140px; flex-shrink: 0; position: sticky; top: 90px; }
.center-content { flex: 1; min-width: 0; }
.right-sidebar { width: 280px; flex-shrink: 0; }

.left-nav-card { background: var(--bg-card); border-radius: 8px; padding: 10px; box-shadow: 0 1px 2px var(--shadow-light); }
.left-nav-list { padding: 5px 0; }
.left-nav-list li { margin-bottom: 2px; }
.left-nav-list li a { 
    display: flex; 
    align-items: center; 
    padding: 8px 10px; 
    border-radius: 6px; 
    color: var(--text-secondary); 
    font-size: 14px; 
    font-weight: 500;
    transition: all 0.2s ease;
}
.left-nav-list li a:hover { 
    background-color: var(--hover-bg); 
    color: var(--primary-color); 
}
.left-nav-list li.active a { 
    background-color: var(--active-bg); 
    color: var(--primary-color); 
    font-weight: bold;
}
.left-nav-list li a i { 
    width: 20px; 
    text-align: center; 
    margin-right: 8px; 
    font-size: 15px;
}
.left-nav-list li a .nav-icon {
    width: 20px; 
    text-align: center; 
    margin-right: 8px;
    display: inline-block;
}
.left-nav-list li a .nav-icon i {
    margin-right: 0;
}

.nav-divider {
    height: 1px;
    background-color: var(--border-divider);
    margin: 8px 10px;
}

.post-list { display: flex; flex-direction: column; gap: 8px; }
.post-list-item { background: var(--bg-card); border-radius: 6px; padding: 12px; display: flex; gap: 12px; box-shadow: 0 1px 2px var(--shadow-light); transition: all 0.2s; align-items: center; }
.post-list-item:hover { transform: translateY(-1px); box-shadow: 0 4px 12px var(--shadow-hover); }

.post-avatar { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; overflow: hidden; background: var(--bg-input); }
.post-avatar img { width: 100%; height: 100%; object-fit: cover; }

.post-info { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.post-title { font-size: 15px; margin: 0 0 4px; font-weight: normal; line-height: 1.4; display: flex; align-items: center; }
.post-title a { color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.post-title a:hover { color: var(--primary-color); }

.cate-prefix { color: var(--text-secondary); margin-right: 5px; font-size: 14px; }

.post-meta { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.post-meta-item { display: flex; align-items: center; gap: 4px; background: var(--bg-badge-item); padding: 2px 8px; border-radius: 10px; }
.tag-badge { background: var(--bg-badge); color: var(--text-placeholder); padding: 2px 8px; border-radius: 4px; font-size: 12px; }

.post-action { margin-left: auto; flex-shrink: 0; }
.post-action .btn {
    height: auto;
    padding: 2px 12px;
    font-size: 12px;
    border-radius: 999px;
    line-height: 1.2;
    border-width: 1px;
    box-shadow: 0 1px 3px rgba(0,123,255,0.12);
}
.post-action .btn:hover { box-shadow: 0 2px 6px rgba(0,123,255,0.18); }
.btn-visit { 
    display: inline-block; 
    padding: 3px 12px; 
    border: 1px solid var(--primary-color); 
    color: var(--primary-color); 
    border-radius: var(--btn-radius); 
    font-size: 12px; 
    transition: all 0.2s; 
    background: rgba(0, 123, 255, 0.05);
    line-height: 1.2;
}
.btn-visit:hover { 
    background: var(--primary-color); 
    color: #fff; 
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.25);
    transform: translateY(-1px);
}

.widget { background: var(--bg-card); padding: 20px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 1px 2px var(--shadow-light); }
.widget-title { font-size: 16px; font-weight: bold; border-left: 4px solid var(--primary-color); padding-left: 10px; margin-bottom: 15px; color: var(--text-main); }
.widget ul li { padding: 8px 0; border-bottom: 1px dashed var(--border-divider); font-size: 14px; color: var(--text-placeholder); }
.widget ul li:last-child { border-bottom: none; }
.widget-wechat .wechat-qr { text-align: center; }
.widget-wechat .wechat-qr img { width: 100%; max-width: 240px; height: auto; display: block; margin: 0 auto; border-radius: 8px; background: var(--bg-input); padding: 8px; box-sizing: border-box; }
.widget-wechat .wechat-qr-copy img { cursor: pointer; }
.widget-wechat .wechat-qr-tips { margin-top: 10px; font-size: 14px; color: var(--text-secondary); font-weight: 500; text-align: center; line-height: 1.6; }
.widget-tags .tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.widget-tags .tag-item { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 3px; border: 1px solid var(--border-color); color: var(--text-secondary); font-size: 13px; line-height: 1.2; background: transparent; transition: all 0.2s; }
.widget-tags .tag-item:hover { background: var(--hover-bg); border-color: currentColor; color: var(--primary-color); }
.widget-tags .tag-count { font-size: 12px; opacity: 0.9; }
.widget-tags .tag-item:nth-child(6n+1) { color: #2f7cf6; border-color: currentColor; }
.widget-tags .tag-item:nth-child(6n+2) { color: #ff4d4f; border-color: currentColor; }
.widget-tags .tag-item:nth-child(6n+3) { color: #52c41a; border-color: currentColor; }
.widget-tags .tag-item:nth-child(6n+4) { color: #fa8c16; border-color: currentColor; }
.widget-tags .tag-item:nth-child(6n+5) { color: #722ed1; border-color: currentColor; }
.widget-tags .tag-item:nth-child(6n) { color: #13c2c2; border-color: currentColor; }
.widget-hot .hot-list li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--border-divider); }
.widget-hot .hot-list li:last-child { border-bottom: none; }
.widget-hot .hot-index { width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 50%; background: #f0f0f0; color: #999; font-size: 12px; flex-shrink: 0; margin-top: 2px; }
.widget-hot .hot-list li:nth-child(1) .hot-index { background: #ff4d4f; color: #fff; }
.widget-hot .hot-list li:nth-child(2) .hot-index { background: #ff7a45; color: #fff; }
.widget-hot .hot-list li:nth-child(3) .hot-index { background: #ffc53d; color: #fff; }
.widget-hot .hot-list li:nth-child(4) .hot-index { background: #73d13d; color: #fff; }
.widget-hot .hot-list li:nth-child(5) .hot-index { background: #40a9ff; color: #fff; }
.widget-hot .hot-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.widget-hot .hot-user { font-size: 12px; color: var(--text-muted); text-align: left; line-height: 1.4; }
.widget-hot .hot-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text-main); line-height: 1.5; }
.widget-hot .hot-title:hover { color: var(--primary-color); }

.pagination { margin-top: 30px; text-align: center; padding-bottom: 30px; }
.pagination .now-page, .pagination a { 
    display: inline-block; 
    vertical-align: middle;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    line-height: 28px;
    padding: 0;
    text-align: center;
    background: var(--bg-card); 
    margin: 0 3px; 
    border-radius: 4px; 
    color: var(--text-secondary); 
    font-size: 13px;
    border: 1px solid var(--border-divider);
    box-shadow: none;
    transition: all 0.2s;
}
.pagination .now-page { 
    background: var(--primary-color); 
    color: #fff; 
    border-color: var(--primary-color);
}
.pagination a:hover { 
    background: var(--hover-bg); 
    color: var(--primary-color); 
    border-color: var(--primary-color);
}

.site-footer { background: var(--bg-header); color: var(--text-placeholder); padding: 40px 0; text-align: center; font-size: 14px; margin-top: 40px; border-top: 1px solid var(--border-divider); transition: background-color 0.3s; }

.filter-item {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    color: var(--text-placeholder);
    transition: all 0.2s;
}
.filter-item:hover {
    color: var(--primary-color);
    background: var(--hover-bg);
}
.filter-item.active {
    background: var(--primary-color);
    color: #fff;
}

.site-notice-box {
    background: var(--hover-bg);
    border-radius: 6px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--primary-color);
    font-size: 14px;
    box-sizing: border-box;
    flex-wrap: wrap;
}
.site-notice-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    line-height: 1.5;
}
.site-notice-content i {
    font-size: 16px;
    flex-shrink: 0;
}
.site-notice-close {
    color: var(--primary-color);
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 16px;
    padding: 0 5px;
    cursor: pointer;
    flex-shrink: 0;
}
.site-notice-close:hover {
    opacity: 1;
}

.global-ad-box {
    overflow: hidden;
}
.global-ad-box img,
.global-ad-box iframe,
.global-ad-box video {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.top-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5253);
    color: #fff;
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 6px;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
    line-height: 1.4;
}

.single-post, .single-page {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 2px var(--shadow-light);
    margin-bottom: 20px;
}
.single-header {
    border-bottom: 1px solid var(--border-divider);
    padding-bottom: 20px;
    margin-bottom: 20px;
}
.single-title {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: bold;
}
.single-meta {
    font-size: 13px;
    color: var(--text-muted);
}
.single-meta span {
    margin-right: 15px;
}
.single-meta a {
    color: var(--text-secondary);
}
.single-meta a:hover {
    color: var(--primary-color);
}
.single-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}
.single-content p {
    margin-bottom: 15px;
}
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}
.download-box {
    background: var(--bg-input);
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    border: 1px dashed var(--border-color);
}
.download-box h3 {
    margin: 0 0 15px;
    font-size: 16px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}
.download-box p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-divider);
    color: var(--text-secondary);
    font-size: 14px;
}
.post-tags a {
    display: inline-block;
    background: var(--bg-badge);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
    margin: 0 5px;
    font-size: 12px;
    transition: all 0.2s;
}
.post-tags a:hover {
    color: var(--primary-color);
    background: var(--hover-bg);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-divider);
    font-size: 14px;
}
.post-nav-prev, .post-nav-next {
    width: 48%;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}
.post-nav-prev span:first-child, .post-nav-next span:first-child {
    color: var(--text-muted);
    font-size: 12px;
}
.post-nav-prev a, .post-nav-next a {
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
}
.post-nav-prev a:hover, .post-nav-next a:hover {
    color: var(--primary-color);
}
.post-nav-next {
    text-align: right;
    align-items: flex-end;
}
.nav-none {
    color: var(--text-placeholder);
}

.related-articles {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-divider);
}
.related-articles h3 {
    font-size: 16px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}
.related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}
.related-articles li {
    width: 50%;
    padding: 0 10px;
    margin-bottom: 4px;
    line-height: 1.5;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-size: 13px;
}
.related-index {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 6px;
    flex-shrink: 0;
}
.related-articles li a {
    color: var(--text-main);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}
.related-articles li a:hover {
    color: var(--primary-color);
}

.friend-links {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-divider);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 14px;
}
.friend-links-label {
    font-weight: bold;
    margin-right: 10px;
    color: var(--text-main);
}
.friend-links-items {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.friend-links-items li {
    margin: 0;
}
.friend-links-items li a {
    color: var(--text-secondary);
    text-decoration: none;
}
.friend-links-items li a:hover {
    color: var(--primary-color);
}

.mobile-menu-icon { display: none; }

@media (max-width: 992px) {
    .site-header { padding: 10px 0; position: static; }
    .site-header .container { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; }

    .logo { width: auto; flex: 0 0 auto; margin-right: 0; padding-left: 0; justify-content: flex-start; order: 1; }
    .logo a { justify-content: flex-start; }

    .search-box { margin-left: 0; width: auto; flex: 0 0 auto; order: 3; }
    .search-box form { flex: 1; }
    .search-box input { width: 100%; min-width: 0; padding: 7px 12px; font-size: 14px; }
    .search-box button { padding: 7px 12px; min-width: 56px; white-space: nowrap; font-size: 14px; }

    .user-avatar { display: none !important; }
    .mobile-menu-icon { display: block !important; font-size: 20px; color: var(--text-color); padding: 8px; }

    .dark-mode-toggle {
        position: fixed;
        bottom: 80px;
        right: 20px;
        z-index: 9999;
        background: transparent;
        color: #ff4d4f;
        border: none;
        box-shadow: none;
        border-radius: 0;
        width: auto;
        height: auto;
        justify-content: center;
        margin-left: 0;
        padding: 10px;
        font-size: 40px;
        transition: transform 0.3s;
    }
    .dark-mode-toggle:hover { 
        transform: scale(1.1);
        box-shadow: none;
        background: transparent;
        color: #ff4d4f;
    }
    .dark-mode-toggle:active { transform: scale(0.95); }
    body.dark-mode .dark-mode-toggle {
        background: transparent;
        color: #ff4d4f;
        border: none;
        box-shadow: none;
    }
    body.dark-mode .dark-mode-toggle:hover {
        color: #ff4d4f;
        background: transparent;
    }

    .main-nav { width: auto; flex: 1; order: 2; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .main-nav ul { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 0; justify-content: flex-start; }
    .main-nav li { flex: 0 0 auto; }

    .main-wrapper { flex-direction: column; padding-top: 10px; }
    .left-sidebar, .right-sidebar, .center-content { width: 100%; position: static; top: auto; }

    .left-nav-card { padding: 10px; }
    .left-nav-list { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; scroll-behavior: smooth; }
    .left-nav-list::-webkit-scrollbar { height: 0; display: none; }
    .left-nav-list li { margin-bottom: 0; flex: 0 0 auto; }
    .left-nav-list li a { padding: 8px 12px; white-space: nowrap; justify-content: center; gap: 6px; font-size: 13px; line-height: 1.1; background: var(--bg-input); border: 1px solid var(--border-divider); border-radius: 999px; }
    .left-nav-list li a i { font-size: 14px; margin-right: 0; }
    .left-nav-list li a .nav-icon { width: auto; margin-right: 0; }
    .left-nav-list li.active a { background: var(--active-bg); border-color: var(--primary-color); }
    .nav-divider { display: none; }

    .post-list-item { align-items: center; position: relative; padding-right: 76px; }
    .post-info { flex: 1 1 auto; min-width: 0; }
    .post-title a { white-space: normal; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
    .post-action { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); margin-left: 0; display: flex; align-items: center; justify-content: center; }

    .single-post, .single-page, .widget { padding: 18px; }
    .post-navigation { flex-direction: column; gap: 12px; }
    .post-nav-prev, .post-nav-next { width: 100%; }
    .post-nav-next { align-items: flex-start; text-align: left; }

    .related-articles li { width: 100%; }

    .category-header-box {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 99;
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0 !important;
        padding: 15px 15px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
        border-bottom: 1px solid var(--border-divider);
    }

    .site-footer {
        padding: 20px 0;
        margin-top: 20px;
    }
    .site-footer p {
        margin: 5px 0;
        line-height: 1.5;
        word-wrap: break-word;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .logo { font-size: 20px; }
    .search-box input { padding: 8px 12px; }
    .search-box button { min-width: 52px; }
    .post-list-item { padding: 10px; padding-right: 70px; }
    .post-title { font-size: 14px; }
    .single-title { font-size: 17px; }
    .post-action { top: 50%; right: 10px; transform: translateY(-50%); }
    .left-nav-list { gap: 6px; }
    .left-nav-list li a { padding: 7px 10px; font-size: 12px; }
    
    .category-header-box {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .site-footer {
        padding: 15px 0;
        font-size: 12px;
    }
}

/* Single content heading styles */
html { scroll-behavior: smooth; }
.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5 {
    margin: 10px 0 8px;
    line-height: 1.35;
    scroll-margin-top: 80px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    position: relative;
    padding: 6px 12px 6px 22px;
}
.single-content h1 { font-size: 22px; color: #0d6efd; border-left: 14px solid #0d6efd; border-radius: 14px; box-shadow: 0 6px 16px rgba(13,110,253,.66); }
.single-content h2 { font-size: 20px; color: #6610f2; border-left: 12px solid #6610f2; border-radius: 12px; box-shadow: 0 6px 16px rgba(102,16,242,.66); }
.single-content h3 { font-size: 18px; color: #198754; border-left: 10px solid #198754; border-radius: 10px; box-shadow: 0 6px 16px rgba(25,135,84,.66); }
.single-content h4 { font-size: 16px; color: #fd7e14; border-left: 8px solid #fd7e14; border-radius: 8px; box-shadow: 0 6px 16px rgba(253,126,20,.66); }
.single-content h5 { font-size: 14px; color: #6c757d; border-left: 6px solid #6c757d; border-radius: 6px; box-shadow: 0 6px 16px rgba(108,117,125,.66); }
@media (max-width: 576px) {
    .post-meta .meta-author, .post-meta .meta-date, .post-meta .meta-cate, .post-meta .meta-extcate { display: none !important; }
    .single-content h1 { box-shadow: 0 3px 8px rgba(13,110,253,.72); }
    .single-content h2 { box-shadow: 0 3px 8px rgba(102,16,242,.72); }
    .single-content h3 { box-shadow: 0 3px 8px rgba(25,135,84,.72); }
    .single-content h4 { box-shadow: 0 3px 8px rgba(253,126,20,.72); }
    .single-content h5 { box-shadow: 0 3px 8px rgba(108,117,125,.72); }
}

/* Version card */
.version-card-section .ver-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid #cfe2ff;
    background: #f1f8ff;
    border-left: 4px solid #0d6efd;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(13,110,253,.06);
}
.version-card-section .ver-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0b5ed7;
    font-size: 15px;
}
.version-card-section .ver-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #0d6efd;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s;
}
.version-card-section .ver-btn:hover {
    background: #0b5ed7;
}
.version-card-section .ver-icon {
    font-size: 16px;
}

/* Minor utilities */
.version-card-section { margin-top: 16px; }
.text-danger { color: #d9534f !important; }
.note-muted { font-size: 12px; color: #999; }
.post-list-item .post-thumb { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 6px; overflow: hidden; background: var(--bg-input); }
.post-thumb-link { display: block; width: 100%; height: 100%; }
.post-thumb-img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.post-icon-fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #fff; border-radius: 6px; font-size: 22px; }
.post-meta-accent { color: var(--primary-color); }

/* Index search hero */
.index-search-box { margin-top: 20px; }
.index-search-hero {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #fff;
}
.index-search-title { font-size: 32px; margin: 0 0 10px 0; font-weight: normal; }
.index-search-desc { font-size: 16px; margin: 0 0 30px 0; opacity: 0.9; }
.index-search-form { max-width: 600px; margin: 0 auto; display: flex; gap: 10px; }
.index-search-input {
    flex: 1; padding: 12px 15px; border: none; border-radius: 6px;
    outline: none; font-size: 16px; height: 48px; box-sizing: border-box;
}
.index-search-input:focus { box-shadow: 0 0 0 2px rgba(0,123,255,0.3); }
.index-search-button {
    padding: 0 30px; background: #007bff; color: #fff; border: none; border-radius: 6px;
    font-size: 16px; cursor: pointer; height: 48px; transition: background 0.2s;
}
.index-search-button:hover { background: #0069d9; }

/* Full-bleed index search section */
.index-search-section {
    margin-top: 20px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 15px;
    padding-right: 15px;
}

/* Header gaps */
.global-ad-box { margin-top: 20px; margin-bottom: -10px; }
.site-notice-container { margin-top: 20px; margin-bottom: -10px; }

/* Header user menu */
.user-action-menu { position: relative; margin-left: 15px; display: inline-block; }
.user-info-trigger { display: flex; align-items: center; cursor: pointer; padding: 4px; border-radius: 999px; transition: background 0.2s; }
.user-info-trigger:hover { background: var(--hover-bg); }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--bg-input); border: 1px solid var(--border-divider); display: flex; align-items: center; justify-content: center; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-avatar-guest i { font-size: 16px; color: var(--text-muted); }
.user-action-menu .user-dropdown-content { display: none; position: absolute; right: 0; top: 100%; background: var(--bg-card); min-width: 180px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); z-index: 1000; border-radius: 6px; padding: 5px 0; border: 1px solid var(--border-divider); margin-top: 10px; }
.user-action-menu .user-dropdown-content::after { content: ''; position: absolute; top: -15px; left: 0; width: 100%; height: 15px; background: transparent; }
.user-action-menu:hover .user-dropdown-content { display: block; }
.user-dropdown-content::before { content: ''; position: absolute; top: -6px; right: 12px; width: 12px; height: 12px; background: var(--bg-card); border-left: 1px solid var(--border-divider); border-top: 1px solid var(--border-divider); transform: rotate(45deg); }
.user-dropdown-content a { color: var(--text-main); padding: 10px 16px; text-decoration: none; display: block; font-size: 14px; transition: background 0.2s; }
.user-dropdown-content a:hover { background: var(--bg-body); color: var(--color-primary); }
.user-dropdown-header { padding: 15px 16px; border-bottom: 1px solid var(--border-divider); margin-bottom: 5px; display: flex; align-items: center; gap: 10px; }
.user-dropdown-header img { width: 36px; height: 36px; border-radius: 50%; }
.auth-buttons { display: flex; justify-content: space-evenly; padding: 10px 5px; }
.auth-buttons a { display: inline-block !important; width: auto; padding: 6px 20px; border-radius: 20px; text-align: center; font-size: 14px; }
.guest-actions { display: flex; gap: 10px; align-items: center; }
.guest-actions a { text-decoration: none; font-size: 14px; padding: 6px 15px; border-radius: 20px; transition: all 0.3s; line-height: 1.5; }
.btn-login { color: var(--text-main); background: transparent; }
.btn-login:hover { color: var(--color-primary); }
.btn-register { background: var(--color-primary); color: #fff; }
.btn-register:hover { opacity: 0.9; }

/* Guest avatar placeholder */
.guest-avatar-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}
.guest-avatar-icon { font-size: 20px; }

/* User name text and auth links */
.user-name-text { font-weight: bold; font-size: 14px; }
.link-register { color: var(--color-primary); text-decoration: none; font-size: 14px; margin-right: 10px; }
.link-forgot, .link-back-login { color: #999; text-decoration: none; font-size: 14px; }

/* Login modal title */
.pan-modal-title { margin-top: 0; margin-bottom: 20px; text-align: center; font-size: 20px; }

/* Login/Forgot layout utilities */
.pan-form-flex-between { display: flex; justify-content: space-between; align-items: center; }
.pan-check-label { margin: 0; cursor: pointer; font-size: 14px; }
.pan-form-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.flex-1 { flex: 1; }
.btn-plain { padding: var(--btn-padding-y) var(--btn-padding-x); border: 1px solid var(--border-divider,#ddd); border-radius: var(--btn-radius); background: var(--bg-body,#f9f9f9); cursor: pointer; white-space: nowrap; }
.pan-reset-tip { margin-top: 6px; font-size: 13px; color: #999; }

/* Login modal base */
.pan-modal { display: none; position: fixed; z-index: 10001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(5px); animation: panFadeIn 0.3s; }
.pan-modal-content { background-color: var(--bg-card, #fff); margin: 10% auto; padding: 30px; border: 1px solid var(--border-divider, #eee); width: 90%; max-width: 360px; border-radius: 12px; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.2); animation: panSlideIn 0.3s; }
.pan-close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; line-height: 1; margin-top: -10px; margin-right: -10px; transition: color 0.2s; }
.pan-close:hover { color: var(--text-main, #333); }
.pan-form-group { margin-bottom: 20px; }
.pan-form-group label { display: block; margin-bottom: 8px; color: var(--text-main, #333); font-weight: 500; font-size: 14px; }
.pan-form-group input[type="text"], .pan-form-group input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid var(--border-divider, #ddd); border-radius: 6px; background: var(--bg-body, #f9f9f9); color: var(--text-main, #333); box-sizing: border-box; outline: none; transition: border-color 0.2s; font-size: 14px; }
.pan-form-group input:focus { border-color: var(--color-primary, #007bff); }
.pan-btn-submit { width: 100%; padding: 12px; background: var(--color-primary, #007bff); color: #fff; border: none; border-radius: var(--btn-radius); cursor: pointer; font-size: 16px; font-weight: bold; transition: opacity 0.2s; }
.pan-btn-submit:hover { opacity: 0.9; }
@keyframes panFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panSlideIn { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
