/* =============================================
   BQLinux CSDN 风格样式
   ============================================= */

.csdn-nav {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.csdn-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.csdn-nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.csdn-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e8912d;
    text-decoration: none;
    white-space: nowrap;
}

.csdn-menu {
    display: flex !important;
    gap: 0 !important;
    flex-direction: row !important;
}

.csdn-menu a {
    display: block;
    padding: 0 14px;
    height: 56px;
    line-height: 56px;
    color: #3c3c3c;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color .2s;
    border-bottom: 2px solid transparent;
}

.csdn-menu a:hover,
.csdn-menu a.active {
    color: #e8912d;
    border-bottom-color: #e8912d;
}

.csdn-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.csdn-search {
    display: flex;
    align-items: center;
    background: #f3f3f3;
    border-radius: 18px;
    padding: 4px 12px;
    gap: 4px;
}

.csdn-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    width: 120px;
    color: #555;
}

.csdn-search button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
}

.csdn-time {
    font-size: 0.78rem;
    color: #999;
    white-space: nowrap;
}

/* 横幅 */
.csdn-banner {
    background: linear-gradient(135deg, #e8912d 0%, #f0a050 50%, #e8a030 100%);
    color: #fff;
    padding: 32px 20px;
    text-align: center;
}

.csdn-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.csdn-banner h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.csdn-banner p {
    font-size: 1rem;
    opacity: 0.9;
}

/* 三栏布局 */
.csdn-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    gap: 20px;
    align-items: start;
}

/* 侧边栏 */
.csdn-sidebar-left { grid-column: 1; }
.csdn-main { grid-column: 2; }
.csdn-sidebar-right { grid-column: 3; }

.csdn-sidebox {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    margin-bottom: 16px;
    overflow: hidden;
}

.csdn-sidebox-title {
    padding: 12px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #3c3c3c;
    font-weight: 600;
}

/* 分类列表 */
.csdn-cat-list {
    list-style: none;
}

.csdn-cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid #f5f5f5;
    transition: background .15s, color .15s;
}

.csdn-cat-list li:last-child a { border-bottom: none; }

.csdn-cat-list li a:hover {
    background: #fff8f0;
    color: #e8912d;
}

.csdn-cat-list li a span {
    background: #f0f0f0;
    color: #888;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 8px;
}

/* 排行榜 */
.csdn-rank-list {
    list-style: none;
    padding: 8px 0;
}

.csdn-rank-list li {
    counter-increment: rank;
    padding: 7px 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.82rem;
}

.csdn-rank-list li:last-child { border-bottom: none; }

.csdn-rank-list li::before {
    content: counter(rank);
    min-width: 16px;
    height: 16px;
    background: #e8912d;
    color: #fff;
    border-radius: 2px;
    font-size: 0.7rem;
    text-align: center;
    line-height: 16px;
    flex-shrink: 0;
}

.csdn-rank-list li:nth-child(1)::before { background: #e8433a; }
.csdn-rank-list li:nth-child(2)::before { background: #ff7c24; }
.csdn-rank-list li:nth-child(3)::before { background: #e8912d; }

.csdn-rank-list a {
    color: #555;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s;
}

.csdn-rank-list a:hover { color: #e8912d; }

/* 文章列表 */
.csdn-article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csdn-article-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 18px 20px;
    transition: box-shadow .2s, border-color .2s;
}

.csdn-article-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    border-color: #e8bf8a;
}

.csdn-article-tag-row {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.csdn-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
}

.csdn-tag-red    { background: #e8433a; }
.csdn-tag-blue   { background: #0077cc; }
.csdn-tag-green  { background: #23a056; }
.csdn-tag-orange { background: #e8912d; }
.csdn-tag-purple { background: #884898; }

.csdn-article-title {
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.csdn-article-title a {
    color: #243b55;
    text-decoration: none;
    transition: color .15s;
}

.csdn-article-title a:hover { color: #e8912d; }

.csdn-article-desc {
    color: #7a7a7a;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.csdn-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: #999;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}

.csdn-author {
    color: #0077cc;
    font-weight: 500;
}

.csdn-date,
.csdn-views,
.csdn-comments {
    color: #999;
}

/* 右侧关于 */
.csdn-about {
    padding: 12px 16px;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.7;
}

/* 友链 */
.csdn-friend-list {
    list-style: none;
    padding: 4px 0;
}

.csdn-friend-list li a {
    display: block;
    padding: 8px 16px;
    color: #555;
    text-decoration: none;
    font-size: 0.82rem;
    border-bottom: 1px solid #f5f5f5;
    transition: color .15s, background .15s;
}

.csdn-friend-list li:last-child a { border-bottom: none; }
.csdn-friend-list li a:hover { color: #e8912d; background: #fff8f0; }

/* 工具按钮 */
.csdn-tool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
}

.csdn-tool-btn {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f0;
    color: #555;
    border-radius: 16px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background .2s, color .2s;
}

.csdn-tool-btn:hover {
    background: #e8912d;
    color: #fff;
}

/* 底部备案 */
.csdn-footer {
    background: #1a1a1a;
    color: #ccc;
    text-align: center;
    padding: 24px 20px;
    font-size: 0.82rem;
    line-height: 2;
    margin-top: 30px;
}

.csdn-footer a {
    color: #ccc;
    text-decoration: none;
    transition: color .15s;
}

/* 汉堡菜单按钮（默认隐藏，响应式显示） */
.csdn-hamburger {
    display: none !important;
}

.csdn-footer a:hover { color: #e8912d; }

/* 响应式 */
@media (max-width: 900px) {
    .csdn-container {
        grid-template-columns: 1fr;
    }
    .csdn-sidebar-left,
    .csdn-sidebar-right {
        grid-column: 1;
    }
    .csdn-main {
        grid-column: 1;
    }
    .csdn-menu {
        display: none;
    }
    .csdn-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 4px 8px;
        border-radius: 4px;
    }
    .csdn-hamburger:hover {
        background: rgba(255,255,255,0.1);
    }
    .csdn-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1e1e1e;
        padding: 1rem;
        gap: 0.5rem;
        z-index: 999;
    }
}

@media (max-width: 600px) {
    .csdn-banner h1 { font-size: 1.3rem; }
    .csdn-time { display: none; }
    .csdn-nav-inner { gap: 10px; }
}
