/* ===== qbcms 默认模板样式 ===== */

/* reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html {
    /* 始终保留垂直滚动条占位，避免页面高度不同导致居中容器左右偏移 */
    overflow-y: scroll;
    scrollbar-gutter: stable;
}
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f5f5f5;
    line-height: 1.6;
}
a { color: #1a73e8; text-decoration: none; }
a:hover { color: #d93025; text-decoration: underline; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; }
.container { width: 1200px; margin: 0 auto; }

/* ===== header ===== */
.topbar {
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 0;
    font-size: 12px;
    color: #999;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
}
.topbar a { color: #666; }

.site-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 3px solid #1a73e8;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo区域：图片与文字并列 */
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-img {
    height: 56px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}
.logo-text h1 {
    font-size: 26px;
    color: #1a73e8;
    line-height: 1.2;
}
.logo-text h1 a {
    color: #1a73e8;
    text-decoration: none;
}
.logo-text p {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    line-height: 1.4;
}

/* 导航栏当前项 */
.nav .nav-current a {
    background: #1557b0;
}

/* navigation */
.nav {
    background: #1a73e8;
    height: 46px;
}
.nav ul {
    display: flex;
    height: 46px;
}
.nav li {
    position: relative;
}
.nav a {
    display: block;
    padding: 0 20px;
    line-height: 46px;
    color: #fff;
    font-size: 16px;
}
.nav a:hover {
    background: #1557b8;
    text-decoration: none;
}

/* 导航子栏目下拉菜单（鼠标悬停显示） */
.nav li ul.dropdown-menu {
    display: none;
    position: absolute;
    top: 46px;
    left: 0;
    z-index: 999;
    min-width: 150px;
    height: auto;
    flex-direction: column;
    background: #fff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.nav li:hover ul.dropdown-menu {
    display: flex;
}
.nav li ul.dropdown-menu li {
    border-bottom: 1px solid #f0f0f0;
}
.nav li ul.dropdown-menu li:last-child {
    border-bottom: none;
}
.nav li ul.dropdown-menu a {
    display: block;
    padding: 0 16px;
    line-height: 38px;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}
.nav li ul.dropdown-menu a:hover {
    background: #f2f6ff;
    color: #1a73e8;
}

/* nav search */
.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-search {
    flex-shrink: 0;
}
.nav-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.site-header .nav-search-input {
    width: 220px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color .2s;
}
.site-header .nav-search-input:focus {
    border-color: #1a73e8;
}
.site-header .nav-search-scope {
    padding: 8px 24px 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 8px center;
    cursor: pointer;
    outline: none;
    color: #666;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color .2s;
}
.site-header .nav-search-scope:focus {
    border-color: #1a73e8;
}
.site-header .nav-search-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    background: #1a73e8;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity .2s;
}
.site-header .nav-search-btn:hover {
    opacity: 0.88;
}

/* ===== main ===== */
.main {
    padding: 20px 0;
}
.main .container {
    display: flex;
    gap: 20px;
}
.content {
    flex: 1;
    min-width: 0;
}
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* breadcrumb */
.breadcrumb-wrap {
    background: #f5f5f5;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}
.breadcrumb {
    font-size: 13px;
    color: #666;
}
.breadcrumb a {
    color: #1a73e8;
}
.breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb span {
    color: #999;
}

/* section */
.section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.section-header {
    border-bottom: 2px solid #1a73e8;
    margin-bottom: 15px;
    padding-bottom: 10px;
}
.section-header h2 {
    font-size: 18px;
    color: #333;
}

/* ===== 单页内容样式 ===== */
.page-content {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.page-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1a73e8;
}
.page-body {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}
.page-body p {
    margin-bottom: 15px;
}
.page-body h2, .page-body h3, .page-body h4 {
    color: #333;
    margin: 20px 0 12px;
}
.page-body h2 {
    font-size: 20px;
    border-left: 4px solid #1a73e8;
    padding-left: 12px;
}
.page-body h3 {
    font-size: 18px;
}
.page-body h4 {
    font-size: 16px;
}
.page-body ul, .page-body ol {
    margin: 10px 0 10px 25px;
    padding-left: 0;
}
.page-body ul {
    list-style: disc;
}
.page-body ol {
    list-style: decimal;
}
.page-body li {
    margin-bottom: 6px;
}
.page-body a {
    color: #1a73e8;
    text-decoration: underline;
}
.page-body a:hover {
    color: #d93025;
}
.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 10px 0;
}
.page-body blockquote {
    background: #f8f9fa;
    border-left: 4px solid #1a73e8;
    padding: 12px 16px;
    margin: 15px 0;
    color: #555;
    font-style: italic;
}
.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}
.page-body th, .page-body td {
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    text-align: left;
}
.page-body th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}
.page-body tr:nth-child(even) {
    background: #fafafa;
}
.page-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
    color: #c62828;
}
.page-body pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    margin: 15px 0;
}
.page-body pre code {
    background: transparent;
    padding: 0;
    color: #333;
}

/* article list */
.article-list .article-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px dashed #e8e8e8;
}
.article-thumb {
    width: 150px;
    height: 100px;
    margin-right: 15px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f0f0;
}
.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-body {
    flex: 1;
    min-width: 0;
}
.article-body h3 {
    font-size: 16px;
    margin-bottom: 8px;
}
.article-body h3 a {
    color: #333;
}
.article-body h3 a:hover {
    color: #1a73e8;
}
.article-desc {
    color: #999;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}
.article-meta {
    font-size: 12px;
    color: #aaa;
}
.article-meta .hits {
    margin-left: 15px;
}

/* sidebar widget */
.widget {
    background: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.widget h3 {
    font-size: 16px;
    border-left: 4px solid #1a73e8;
    padding-left: 10px;
    margin-bottom: 12px;
    color: #333;
}

/* hot list */
.hot-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}
.hot-list a {
    color: #555;
    font-size: 13px;
}
.hot-list a:hover {
    color: #1a73e8;
}
.hot-hits {
    color: #aaa;
    font-size: 12px;
}

/* sub categories */
.sub-category {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}
.sub-category a {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
}
.sub-category a:hover {
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
}

/* article detail */
.article-content .article-detail {
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.article-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}
.article-info {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #999;
}
.article-info span {
    margin: 0 10px;
}
.article-text {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}
.article-text p {
    margin-bottom: 15px;
}
.article-text img {
    display: block;
    margin: 15px auto;
    max-width: 100%;
}

/* prev/next nav */
.article-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}

/* related list */
.related-list li {
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}
.related-list a {
    color: #555;
    font-size: 13px;
}
.related-list a:hover {
    color: #1a73e8;
}

/* pagination */
.pagination {
    text-align: center;
    padding: 20px 0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 5px 12px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #555;
}
.pagination .current {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}
.pagination a:hover {
    background: #f0f0f0;
    text-decoration: none;
}

/* ===== footer ===== */
.footer {
    background: #2c3e50;
    color: #bbb;
    padding: 30px 0;
    margin-top: 30px;
    text-align: center;
}
.footer p {
    margin-bottom: 8px;
    font-size: 13px;
}
.footer a {
    color: #ddd;
}
.footer .filing a {
    margin: 0 5px;
}

/* responsive */
@media (max-width: 768px) {
    .container { width: 100%; padding: 0 10px; }
    .main .container { flex-direction: column; }
    .sidebar { width: 100%; }
    .article-thumb { width: 100px; height: 70px; }
    .article-body h3 { font-size: 14px; }
    .form-row, .form-row-3 { flex-direction: column !important; }
    .input-half, .input-third, .form-input, .form-textarea { width: 100% !important; }
    .captcha-row { flex-wrap: wrap; }
    .captcha-input { width: 60% !important; }
    .captcha-img { width: 100px !important; height: 38px !important; }
    /* 移动端追加：header & logo */
    .site-header .container { flex-direction: column; align-items: flex-start; gap: 10px; }
    .logo-wrap { gap: 8px; }
    .logo-img { height: 44px; max-width: 120px; }
    .logo-text h1 { font-size: 20px; }
    .logo-text p { font-size: 11px; }
    /* 导航栏自适应 */
    .nav { height: auto; }
    .nav ul { flex-wrap: wrap; height: auto; }
    .nav a { padding: 0 12px; line-height: 40px; font-size: 14px; }
    /* 移动端子菜单改为静态展开，避免绝对定位错位 */
    .nav li ul.dropdown-menu {
        position: static;
        display: flex;
        flex-direction: column;
        min-width: 0;
        box-shadow: none;
        border-radius: 0;
    }
    .nav li ul.dropdown-menu a {
        background: #fff;
        color: #333;
        line-height: 36px;
        border-top: 1px solid #f0f0f0;
    }
    .nav li ul.dropdown-menu a:hover {
        background: #f2f6ff;
        color: #1a73e8;
    }
    /* 搜索框缩小 */
    .site-header .nav-search-input { width: 140px; }
    .site-header .nav-search-scope { padding: 6px 20px 6px 8px; font-size: 12px; }
    .site-header .nav-search-btn { padding: 6px 12px; font-size: 13px; }
    /* 轮播高度限制 */
    .swiper-slide img { max-height: 220px; object-fit: cover; width: 100%; }
    /* 文章列表间距缩小 */
    .article-list .article-item { padding: 10px 0; }
    /* 文章详情 */
    .article-content .article-detail { padding: 16px; }
    .page-title { font-size: 18px; margin-bottom: 12px; padding-bottom: 10px; }
    .page-body { font-size: 14px; line-height: 1.7; }
    .page-body h2 { font-size: 16px; }
    .page-body h3 { font-size: 15px; }
    /* 评论/留言表单 */
    .comment-form .form-group label { font-size: 13px; }
    .comment-form input,
    .comment-form textarea { font-size: 14px; padding: 8px 10px; }
    /* 分页 */
    .pagination { gap: 6px; flex-wrap: wrap; }
    .pagination a,
    .pagination span { padding: 6px 10px; font-size: 13px; }
    /* 友情链接申请 */
    .link-apply-form .captcha-row { flex-wrap: wrap; gap: 8px; }
    .link-apply-form .captcha-input { flex: 1 1 120px; }
}

/* ===== 评论 & 留言通用样式 ===== */
.comment-section, .guestbook-section, .guestbook-form-wrap {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.comment-section {
    margin-top: 20px;
}
.comment-section .section-header,
.guestbook-section .section-header,
.guestbook-form-wrap .section-header {
    border-bottom: 2px solid #1a73e8;
    margin-bottom: 15px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.comment-section .section-header h2,
.guestbook-section .section-header h2,
.guestbook-form-wrap .section-header h2 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

/* 留言板分类筛选表单 */
.guestbook-filter {
    margin: 0;
}
.guestbook-filter select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

/* 评论列表 */
.comment-list { margin-bottom: 20px; }
.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { margin-bottom: 4px; }
.comment-author { font-weight: 600; color: #333; margin-right: 10px; font-size: 14px; }
.comment-time { color: #aaa; font-size: 12px; }
.comment-content { color: #555; line-height: 1.6; font-size: 14px; word-wrap: break-word; }
.no-comments, .no-guestbook, .guestbook-empty { color: #999; text-align: center; padding: 20px 0; font-size: 14px; list-style: none; }

/* 留言列表 */
.guestbook-list { margin-bottom: 20px; }
.guestbook-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}
.guestbook-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #52c41a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.guestbook-body { flex: 1; min-width: 0; }
.guestbook-meta { margin-bottom: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guestbook-author { font-weight: 600; color: #333; font-size: 14px; }
.guestbook-time { color: #aaa; font-size: 12px; }
.guestbook-content { color: #555; line-height: 1.8; font-size: 15px; word-wrap: break-word; }

/* 表单通用 */
.comment-form, .guestbook-form {
    margin-top: 10px;
}
.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.input-half, .form-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}
.input-third {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}
.form-row-3 {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.form-row-3 .form-input {
    flex: 1;
}
.input-textarea, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
    font-family: inherit;
}
.input-half:focus, .input-third:focus, .input-textarea:focus, .form-input:focus, .form-textarea:focus, .captcha-input:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}

/* 已登录会员 readonly 输入框样式 */
.comment-form input[readonly], .guestbook-form input[readonly] {
    background: #f1f3f4;
    color: #5f6368;
    cursor: not-allowed;
}

/* 验证码行 */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}
.captcha-input {
    width: 180px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.captcha-img {
    height: 42px;
    width: 120px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.captcha-img:hover { border-color: #1a73e8; }

/* 提交按钮 */
.btn-submit {
    display: inline-block;
    padding: 10px 32px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-submit:hover { background: #1557b8; }

/* 留言板侧边栏 */
.guestbook-section .pagination {
    margin-top: 15px;
}

/* ===== 留言类别下拉框 ===== */
.guestbook-category-select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    width: 33%;
    margin-bottom: 12px;
    cursor: pointer;
}
.guestbook-category-select:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}

/* ===== 私密留言选项 ===== */
.guestbook-private-option {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    font-size: 13px;
    color: #8d6e00;
}
.guestbook-private-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}
.guestbook-private-option label {
    cursor: pointer;
    user-select: none;
    margin: 0;
}

/* ===== 前台管理员回复样式 ===== */
.guestbook-reply {
    margin-top: 10px;
    padding: 10px 14px;
    background: #e8f0fe;
    border-left: 3px solid #1a73e8;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    line-height: 1.8;
}
.guestbook-reply .reply-author {
    font-weight: 600;
    color: #1a73e8;
    margin-right: 8px;
}
.guestbook-reply .reply-time {
    color: #aaa;
    font-size: 12px;
    margin-left: 8px;
}

/* ===== 前台分类标记 ===== */
.guestbook-category-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f0f0;
    color: #666;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    margin-right: 0;
    vertical-align: middle;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 不同分类对应不同背景色 */
.guestbook-category-badge.cat-1 { background: #e3f2fd; color: #1565c0; }
.guestbook-category-badge.cat-2 { background: #e8f5e9; color: #2e7d32; }
.guestbook-category-badge.cat-3 { background: #fff3e0; color: #e65100; }
.guestbook-category-badge.cat-4 { background: #fce4ec; color: #c62828; }
.guestbook-category-badge.cat-5 { background: #f3e5f5; color: #7b1fa2; }
.guestbook-category-badge.cat-6 { background: #e0f7fa; color: #00838f; }

/* ===== 前台私密留言标记 ===== */
.guestbook-private-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fce4ec;
    color: #c62828;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

/* ===== 会员中心私密/公开标记 ===== */
.private-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #fce4ec;
    color: #c62828;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.public-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}
.text-muted {
    color: #bbb;
    font-size: 13px;
}

/* ===== 顶部栏会员链接 ===== */
.topbar { display: flex; }
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar-member { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar-member a {
    color: #1a73e8;
    text-decoration: none;
    margin-left: 10px;
    font-size: 13px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 3px;
    transition: background 0.2s, color 0.2s;
}
.topbar-member a:hover {
    background: rgba(26,115,232,0.1);
    color: #1557b8;
}
.topbar-member .topbar-user {
    color: #1a73e8;
    font-weight: 700;
    font-size: 13px;
}
.topbar-member .topbar-user:hover {
    background: rgba(26,115,232,0.1);
}
.topbar-member .topbar-logout {
    color: #e64545;
}
.topbar-member .topbar-logout:hover {
    background: rgba(230,69,69,0.1);
    color: #c73b3b;
}


/* ===== 专题页 ===== */
.topic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}
.topic-card {
    width: calc(33.333% - 14px);
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.topic-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.topic-card .topic-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
}
.topic-card .topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.topic-card:hover .topic-image img {
    transform: scale(1.05);
}
.topic-card .topic-info {
    padding: 15px;
}
.topic-card .topic-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
}
.topic-card .topic-info h3 a {
    color: #333;
}
.topic-card .topic-info h3 a:hover {
    color: #1a73e8;
}
.topic-card .topic-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.topic-card .topic-more {
    font-size: 13px;
    color: #1a73e8;
}

/* 专题详情页头部 */
.topic-header {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.topic-banner {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    margin-bottom: 15px;
    border-radius: 4px;
}
.topic-banner img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}
.topic-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}
.topic-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* 响应式 */
@media (max-width: 768px) {
    .topic-card {
        width: 100%;
    }
    .topic-card .topic-image {
        height: 200px;
    }
}

/* 文章信息栏专题标签 */
.article-info .topic a,
.topic-tag a {
    color: #1a73e8;
    margin-left: 4px;
}
.article-info .topic a:hover,
.topic-tag a:hover {
    color: #d93025;
}
/* 友情链接申请表单 */
.link-apply-form {
    margin-top: 10px;
}
.link-apply-form .form-group {
    margin-bottom: 18px;
}
.link-apply-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}
.link-apply-form .form-group .required {
    color: #e74c3c;
}
.link-apply-form .form-group select,
.link-apply-form .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
    background: #fff;
}
.link-apply-form .form-group select:focus,
.link-apply-form .form-control:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}
.link-apply-form .radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}
.link-apply-form .radio-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}
.link-apply-form .radio-group input[type="radio"] {
    margin: 0;
}
.link-apply-form .captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.link-apply-form .captcha-input {
    flex: 0 0 160px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.link-apply-form .captcha-input:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}
.link-apply-form .captcha-img {
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}
.link-apply-form .btn-submit {
    display: inline-block;
    padding: 10px 28px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}
.link-apply-form .btn-submit:hover {
    background: #1557b0;
}

/* ===== 侧边栏推荐文章轮播 ===== */
.sidebar-swiper-wrap {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.sidebar-swiper-wrap .swiper {
    width: 100%;
    height: 100%;
}
.sidebar-swiper-wrap .swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
    text-align: center;
}
.sidebar-swiper-wrap .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.sidebar-swiper-wrap .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sidebar-swiper-wrap .slide-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-swiper-wrap .swiper-pagination {
    bottom: 8px;
    display: none; /* 隐藏分页点，防止与标题重叠 */
}
.sidebar-swiper-wrap .swiper-button-next,
.sidebar-swiper-wrap .swiper-button-prev {
    width: 28px;
    height: 28px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
}
.sidebar-swiper-wrap .swiper-button-next:after,
.sidebar-swiper-wrap .swiper-button-prev:after {
    font-size: 12px;
}
