:root {
    --bg: #fff;
    --pin: #4facfe;
    --rec: #ff6b6b;
    --lock: #667eea;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.6; color: #333; background: #f5f5f5; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
header { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); margin-bottom: 20px; }
.header-content { display: flex; align-items: center; padding: 15px 0; }
.header-content .logo { margin-right: 30px; }
.header-content nav { flex: 1; }
.logo { font-size: 24px; font-weight: bold; color: #333; text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 20px; }
nav a { color: #666; text-decoration: none; transition: color 0.3s; }
nav a:hover { color: #007bff; }
nav li { position: relative; }
nav li ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.15); min-width: 150px; z-index: 1000; flex-direction: column; gap: 0; padding: 10px 0; }
nav li:hover > ul { display: flex; }
nav li ul li { width: 100%; }
nav li ul a { display: block; padding: 8px 20px; color: #666; }
nav li ul a:hover { background: #f5f5f5; color: #007bff; }
nav .has-children > a::after { content: ' ▼'; font-size: 10px; margin-left: 5px; }
main { display: flex; gap: 20px; }
.content { flex: 1; min-width: 0; }
.sidebar { width: 300px; }
.sidebar-category { list-style: none; padding-left: 0; }
.sidebar-category li { margin-bottom: 8px; }
.sidebar-category a { color: #666; text-decoration: none; display: block; padding: 4px 0; }
.sidebar-category a:hover { color: #007bff; }
.sidebar-category ul { list-style: none; padding-left: 20px; margin-top: 8px; }
.sidebar-category ul li { margin-bottom: 6px; }
.sidebar-category ul a { font-size: 14px; color: #888; }
.sidebar-category ul a:hover { color: #007bff; }
.sidebar-category li { position: relative; }
.sidebar-category .cat-item { display: flex; align-items: center; }
.sidebar-category .cat-item > a { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.sidebar-category .cat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-category .cat-count { 
    background: #f0f0f0; 
    color: #999; 
    font-size: 12px; 
    padding: 2px 8px; 
    border-radius: 10px; 
    margin-left: 8px;
    flex-shrink: 0;
}
.sidebar-category a:hover .cat-count { background: #007bff; color: #fff; }
.sidebar-category .cat-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.sidebar-category .cat-toggle:hover { color: #007bff; }
.sidebar-category .cat-toggle.expanded { transform: rotate(180deg); }
.sidebar-category .cat-children { 
    display: none; 
    list-style: none; 
    padding-left: 15px; 
    margin-top: 5px;
}
.sidebar-category .cat-children.show { display: block; }
.sidebar-category .cat-children a { display: flex; justify-content: space-between; align-items: center; }
.card { background: #fff; border-radius: 4px; padding: 20px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); overflow: hidden; }
.card-title { font-size: 18px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
footer { background: #333; color: #fff; padding: 20px 0; margin-top: 40px; text-align: center; }
.article-item { padding: 15px 0; border-bottom: 1px solid #eee; position: relative; }
.article-item:last-child { border-bottom: none; }
.article-cover { 
    margin: 15px 0; 
    border-radius: 4px; 
    overflow: hidden; 
    background: #f8f9fa;
}
.article-cover img { 
    width: 100%; 
    height: 240px; 
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease;
}
.article-cover img:hover {
    transform: scale(1.05);
}

.article-title-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}
.badge-wrap {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 0;
    margin-top: 4px;
    margin-right: 4px;
}
.badge-float {
    position: absolute;
    top: -4px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.badge-tag {
    position: relative;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    line-height: 1.5;
}
.badge-tag.ft-rec {
    background: var(--rec);
    color: #fff;
}
.badge-tag.ft-pin {
    background: var(--pin);
    color: var(--bg);
}
.badge-tag.ft-lock {
    background: var(--lock);
    color: #fff;
}
.badge-tag.ft-rec::after,
.badge-tag.ft-pin::after,
.badge-tag.ft-lock::after {
    content: '';
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
}
.badge-tag.ft-rec::after {
    border-left-color: var(--rec);
    border-top-color: var(--rec);
    border-bottom-color: var(--rec);
}
.badge-tag.ft-pin::after {
    border-left-color: var(--pin);
    border-top-color: var(--pin);
    border-bottom-color: var(--pin);
}
.badge-tag.ft-lock::after {
    border-left-color: var(--lock);
    border-top-color: var(--lock);
    border-bottom-color: var(--lock);
}

.article-title {
    font-size: 18px;
    margin: 0;
    flex: 1;
    min-width: 0;
}
.article-title a { color: #333; text-decoration: none; }
.article-title a:hover { color: #007bff; }
.article-meta {
    font-size: 14px;
    color: #999;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.article-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.article-meta-item i {
    font-size: 16px;
    color: #666;
}
.article-desc { margin-top: 10px; color: #666; }

.like-btn {
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.like-btn:hover { color: #ff6b6b; }
.like-btn:hover i { color: #ff6b6b; }
.like-btn.liked { color: #ff6b6b; }
.like-btn.liked i { color: #ff6b6b; }
.like-btn.liked .heart { animation: heartBeat 0.3s ease-in-out; }

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 20px; list-style: none; padding: 0; }
.pagination li { display: inline-block; }
.pagination li a, .pagination li span { display: block; padding: 8px 12px; border: 1px solid #ddd; text-decoration: none; color: #333; border-radius: 4px; transition: all 0.3s; }
.pagination li a:hover { background: #007bff; color: #fff; border-color: #007bff; }
.pagination li.active span { background: #007bff; color: #fff; border-color: #007bff; }
.pagination li.disabled span { color: #999; cursor: not-allowed; background: #f5f5f5; }

.article-content { 
    line-height: 1.8; 
    font-size: 16px; 
    word-wrap: break-word; 
    overflow-wrap: break-word;
}
.article-content > *:first-child { margin-top: 0; }
.article-content > *:last-child { margin-bottom: 0; }
.article-content p { margin-bottom: 16px; }
.article-content h1, .article-content h2, .article-content h3, 
.article-content h4, .article-content h5, .article-content h6 { margin: 24px 0 16px; font-weight: 600; }
.article-content h1 { font-size: 28px; }
.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 20px; }
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote { margin: 16px 0; padding: 12px 20px; border-left: 4px solid #007bff; background: #f8f9fa; color: #666; }
.article-content pre { 
    margin: 16px 0; 
    padding: 16px; 
    background: #282c34; 
    border-radius: 6px; 
    overflow-x: auto; 
    white-space: pre;
    max-width: 100%;
}
.article-content pre code { 
    display: block;
    color: #abb2bf; 
    background: transparent; 
    padding: 0; 
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace; 
    font-size: 14px;
    white-space: pre;
}
.article-content code { font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 14px; }
.article-content p code, .article-content li code { background: #f0f0f0; padding: 2px 6px; border-radius: 4px; color: #e83e8c; }
.article-content img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 16px auto; 
    border-radius: 4px; 
}
.article-content a { color: #007bff; text-decoration: none; }
.article-content a:hover { text-decoration: underline; }
.article-content table { width: 100%; margin: 16px 0; border-collapse: collapse; display: block; overflow-x: auto; }
.article-content th, .article-content td { padding: 12px; border: 1px solid #ddd; text-align: left; }
.article-content th { background: #f8f9fa; font-weight: 600; }
.article-content hr { margin: 24px 0; border: none; border-top: 1px solid #eee; }
.article-content .w-e-textarea-video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 16px 0; }
.article-content .w-e-textarea-video-container video, 
.article-content .w-e-textarea-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.user-nav { display: flex; align-items: center; gap: 10px; }
.user-nav .user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid #e0e0e0; }
.user-nav .user-name { font-size: 14px; color: #333; font-weight: 500; margin-right: 10px; }
.user-nav .btn-logout { cursor: pointer; background: none; border: none; font-size: 14px; color: #666; padding: 0; transition: color 0.3s; }
.user-nav .btn-logout:hover { color: #ff6b6b; }
.user-nav .btn-login { padding: 6px 16px; border-radius: 4px; font-size: 14px; background: #007bff; color: #fff !important; text-decoration: none; }
.user-nav .btn-login:hover { background: #0056b3; }

.comment-item .comment-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-right: 10px; }
.comment-header { display: flex; align-items: center; margin-bottom: 8px; }
.comment-header .comment-user-info { flex: 1; }
.comment-header .comment-user-name { font-weight: 600; color: #333; }
.comment-header .comment-time { font-size: 12px; color: #999; }

.site-closed { text-align: center; padding: 100px 20px; }
.site-closed-icon { font-size: 80px; color: #667eea; margin-bottom: 20px; }
.site-closed-title { font-size: 28px; color: #333; margin-bottom: 15px; }
.site-closed-msg { font-size: 16px; color: #666; line-height: 1.8; max-width: 500px; margin: 0 auto; }

.article-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee; }
.article-nav-item { max-width: 45%; }
.article-nav-item a { color: #666; text-decoration: none; }
.article-nav-item a:hover { color: #007bff; }
.article-nav-item .nav-label { font-size: 12px; color: #999; margin-bottom: 5px; }
.article-nav-item .nav-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-nav-item.next { text-align: right; }
