/*
 * StackBlog Theme - Stack Overflow Inspired Design
 * 基于Stack Overflow设计理念的简洁博客主题
 * Version: 1.0.0
 */

/* CSS变量定义 - Stack Overflow风格 */
:root {
    /* Stack Overflow 配色方案 */
    --so-orange: #f48024;         /* Stack Overflow 橙色 */
    --so-blue: #0077cc;           /* Stack Overflow 蓝色 */
    --so-blue-dark: #005999;      /* 深蓝色 */
    --so-gray-dark: #232629;      /* 深灰色文字 */
    --so-gray-medium: #6a737c;    /* 中灰色文字 */
    --so-gray-light: #9199a1;     /* 浅灰色文字 */
    --so-border: #e3e6ea;         /* 边框色 */
    --so-bg-light: #f8f9fa;       /* 浅背景色 */
    --so-bg-white: #ffffff;       /* 白色背景 */
    --so-tag-bg: #e1ecf4;         /* 标签背景色 */
    --so-tag-text: #39739d;       /* 标签文字色 */
    
    /* 布局尺寸 */
    --header-height: 50px;        /* 顶部导航栏高度 */
    --sidebar-width: 164px;       /* 侧边栏宽度 */
    --content-max-width: 1264px;  /* 内容最大宽度 */
    --content-padding: 24px;      /* 内容内边距 */
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    
    /* 阴影 */
    --shadow-light: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    /* 过渡动画 */
    --transition: all 0.2s ease;
}

/* 基础样式重置 */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--so-gray-dark);
    background-color: var(--so-bg-light);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* 顶部导航栏样式 - Stack Overflow风格 */
.so-header {
    background-color: var(--so-bg-white);
    border-top: 3px solid var(--so-orange);
    box-shadow: var(--shadow-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

.so-header-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
}

.so-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--so-gray-dark);
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 24px;
}

.so-logo:hover {
    color: var(--so-blue);
}

.so-nav {
    display: flex;
    align-items: center;
    flex: 1;
}

.so-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.so-nav-item {
    position: relative;
}

.so-nav-link {
    display: block;
    padding: 6px 12px;
    color: var(--so-gray-medium);
    text-decoration: none;
    border-radius: 1000px;
    font-size: 13px;
    transition: var(--transition);
}

.so-nav-link:hover,
.so-nav-link.active {
    background-color: var(--so-orange);
    color: var(--so-bg-white);
}

.so-search {
    flex: 1;
    max-width: 400px;
    margin: 0 12px;
    position: relative;
}

.so-search-input {
    width: 100%;
    padding: 7.8px 32px 7.8px 8px;
    border: 1px solid var(--so-border);
    border-radius: 3px;
    font-size: 13px;
    background-color: var(--so-bg-white);
    color: var(--so-gray-dark);
}

.so-search-input:focus {
    outline: none;
    border-color: var(--so-blue);
    box-shadow: 0 0 0 4px rgba(0, 119, 204, 0.1);
}

.so-search-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 30px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--so-gray-medium);
}

.so-search-btn:hover {
    color: var(--so-blue);
}

/* 主体布局 */
.so-container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
}

.so-sidebar {
    width: var(--sidebar-width);
    background-color: var(--so-bg-white);
    border-right: 1px solid var(--so-border);
    padding: 24px 0;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.so-sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.so-sidebar-item {
    margin-bottom: 2px;
}

.so-sidebar-link {
    display: block;
    padding: 4px 8px 4px 30px;
    color: var(--so-gray-medium);
    text-decoration: none;
    font-size: 13px;
    border-radius: 0 1000px 1000px 0;
    margin-right: 8px;
    transition: var(--transition);
}

.so-sidebar-link:hover,
.so-sidebar-link.active {
    background-color: var(--so-bg-light);
    color: var(--so-gray-dark);
}

.so-main {
    flex: 1;
    padding: var(--content-padding);
    background-color: var(--so-bg-white);
}

/* 内容头部 */
.so-content-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--so-border);
}

.so-content-title {
    font-size: 27px;
    font-weight: 400;
    color: var(--so-gray-dark);
    margin-bottom: 8px;
}

.so-content-subtitle {
    color: var(--so-gray-medium);
    font-size: 13px;
}

.so-content-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.so-filter-buttons {
    display: flex;
    gap: 4px;
}

.so-filter-btn {
    padding: 9.6px 12px;
    background: var(--so-bg-white);
    border: 1px solid var(--so-border);
    color: var(--so-gray-medium);
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    transition: var(--transition);
}

.so-filter-btn:hover,
.so-filter-btn.active {
    background: var(--so-blue);
    border-color: var(--so-blue);
    color: var(--so-bg-white);
}

/* 文章列表样式 */
.so-question-list {
    margin-top: 16px;
}

.so-question-summary {
    display: flex;
    padding: 16px;
    border-bottom: 1px solid var(--so-border);
    transition: var(--transition);
}

.so-question-summary:hover {
    background-color: var(--so-bg-light);
}

.so-statscontainer {
    flex: 0 0 108px;
    margin-right: 16px;
}

.so-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--so-gray-medium);
}

.so-vote,
.so-answer,
.so-view {
    text-align: right;
    padding: 4px 6px;
    border-radius: 3px;
    min-width: 38px;
}

.so-vote {
    background: var(--so-bg-light);
    color: var(--so-gray-dark);
    font-weight: 500;
}

.so-answer {
    background: var(--so-tag-bg);
    color: var(--so-tag-text);
}

.so-view {
    color: var(--so-gray-medium);
}

.so-summary {
    flex: 1;
}

.so-question-hyperlink {
    color: var(--so-blue);
    text-decoration: none;
    font-size: 17px;
    line-height: 1.3;
    margin-bottom: 5px;
    display: block;
}

.so-question-hyperlink:hover {
    color: var(--so-blue-dark);
}

.so-excerpt {
    color: var(--so-gray-dark);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.so-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.so-post-tag {
    background: var(--so-tag-bg);
    color: var(--so-tag-text);
    padding: 4.8px 6px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    transition: var(--transition);
}

.so-post-tag:hover {
    background: var(--so-tag-text);
    color: var(--so-bg-white);
}

.so-user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 12px;
    color: var(--so-gray-medium);
}

.so-user-action-time {
    margin-right: 4px;
}

.so-user-gravatar32 {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    margin-right: 4px;
}

.so-user-details {
    color: var(--so-blue);
    text-decoration: none;
}

.so-user-details:hover {
    color: var(--so-blue-dark);
}

/* 分页样式 */
.so-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 4px;
}

.so-pager a,
.so-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 27px;
    height: 27px;
    padding: 0 8px;
    border: 1px solid var(--so-border);
    background: var(--so-bg-white);
    color: var(--so-gray-dark);
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    transition: var(--transition);
}

.so-pager a:hover {
    background: var(--so-bg-light);
    border-color: var(--so-gray-medium);
}

.so-pager .current {
    background: var(--so-orange);
    border-color: var(--so-orange);
    color: var(--so-bg-white);
}

/* 文章详情页样式 */
.so-question-detail {
    padding: 24px;
    background-color: var(--so-bg-white);
}

.so-question-header {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--so-border);
    margin-bottom: 16px;
}

.so-question-title {
    font-size: 27px;
    font-weight: 400;
    color: var(--so-gray-dark);
    margin-bottom: 8px;
}

.so-question-stats {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--so-gray-medium);
}

.so-stat-item {
    display: flex;
    gap: 8px;
}

.so-question-body {
    display: flex;
}

.so-vote-cell {
    padding-right: 16px;
}

.so-vote-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--so-gray-light);
}

.so-vote-btn,
.so-bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--so-gray-light);
    transition: var(--transition);
}

.so-vote-btn:hover,
.so-bookmark-btn:hover {
    color: var(--so-orange);
}

.so-vote-count {
    font-size: 21px;
    font-weight: 600;
    color: var(--so-gray-dark);
}

.so-post-layout {
    flex: 1;
}

.so-post-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--so-gray-dark);
}

/* 文章内容样式优化 */
.so-post-content h1,
.so-post-content h2,
.so-post-content h3,
.so-post-content h4,
.so-post-content h5,
.so-post-content h6 {
    margin: 24px 0 16px 0;
    color: var(--so-gray-dark);
    font-weight: 600;
}

.so-post-content h1 { font-size: 2em; }
.so-post-content h2 { font-size: 1.5em; }
.so-post-content h3 { font-size: 1.25em; }
.so-post-content h4 { font-size: 1.1em; }

.so-post-content p {
    margin: 16px 0;
    line-height: 1.7;
}

.so-post-content ul,
.so-post-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.so-post-content li {
    margin: 8px 0;
    line-height: 1.6;
}

.so-post-content blockquote {
    margin: 16px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--so-orange);
    background: var(--so-bg-light);
    color: var(--so-gray-medium);
    font-style: italic;
}

.so-post-content code {
    background: var(--so-bg-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--so-gray-dark);
}

.so-post-content pre {
    background: var(--so-bg-light);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid var(--so-border);
}

.so-post-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.so-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
    box-shadow: var(--shadow-light);
}

.so-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border: 1px solid var(--so-border);
}

.so-post-content th,
.so-post-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--so-border);
}

.so-post-content th {
    background: var(--so-bg-light);
    font-weight: 600;
}

/* 搜索高亮样式 */
.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 标签区域样式重新设计 - 彩色简洁版 */
.so-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0;
    padding: 0;
    background: none;
    border: none;
    position: relative;
}

.so-tags-wrapper::before,
.so-tags-wrapper::after {
    display: none;
}

.so-tag {
    background: #4285f4;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.2s ease;
    border: none;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.so-tag:hover {
    background: #3367d6;
    color: white;
    transform: translateY(-1px);
}

/* 作者信息区域重新设计 - 彩色简洁版 */
.so-post-signature {
    margin-top: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e8eaed;
    position: relative;
    overflow: hidden;
}

.so-post-signature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #4285f4;
}

.so-user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.so-user-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.so-user-gravatar32 {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #4285f4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.2s ease;
}

.so-user-gravatar32:hover {
    background: #3367d6;
}

.so-user-info-content {
    flex: 1;
}

.so-user-details-name {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 4px;
}

.so-user-details-reputation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.so-reputation-score {
    background: #34a853;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.so-reputation-score:hover {
    background: #137333;
}

.so-user-action-time {
    color: #5f6368;
    font-size: 13px;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.so-user-action-time:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

/* 文章导航重新设计 - 彩色简洁版 */
.so-post-navigation {
    margin-top: 40px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.so-post-navigation .prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 0;
}

.so-post-navigation .prev-next a {
    padding: 24px;
    background: white;
    border: 2px solid #e8eaed;
    border-radius: 12px;
    text-decoration: none;
    color: #202124;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.so-post-navigation .prev-next a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #4285f4;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.so-post-navigation .prev-next a:hover::before {
    transform: scaleX(1);
}

.so-post-navigation .prev-next a:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    transform: translateY(-2px);
}

.so-post-navigation .prev-next a .nav-direction {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4285f4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.so-post-navigation .prev-next a .nav-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 上一篇和下一篇的特殊样式 */
.so-post-navigation .prev-next a.nav-prev .nav-direction::before {
    content: '← ';
    font-size: 16px;
    font-weight: bold;
}

.so-post-navigation .prev-next a.nav-next .nav-direction::after {
    content: ' →';
    font-size: 16px;
    font-weight: bold;
}

.so-post-navigation .prev-next a.nav-prev {
    text-align: left;
}

.so-post-navigation .prev-next a.nav-next {
    text-align: right;
    align-items: flex-end;
}

/* 当只有一个导航链接时的样式 */
.so-post-navigation .prev-next a:only-child {
    grid-column: 1 / -1;
    max-width: 500px;
    margin: 0 auto;
}

/* 暗色主题适配 */
[data-theme="dark"] .so-tag {
    background: #1a73e8;
}

[data-theme="dark"] .so-tag:hover {
    background: #1557b0;
}

[data-theme="dark"] .so-post-signature {
    background: #202124;
    border-color: #3c4043;
}

[data-theme="dark"] .so-post-signature::before {
    background: #1a73e8;
}

[data-theme="dark"] .so-user-gravatar32 {
    background: #1a73e8;
}

[data-theme="dark"] .so-user-gravatar32:hover {
    background: #1557b0;
}

[data-theme="dark"] .so-user-details-name {
    color: #e8eaed;
}

[data-theme="dark"] .so-reputation-score {
    background: #137333;
}

[data-theme="dark"] .so-reputation-score:hover {
    background: #0d652d;
}

[data-theme="dark"] .so-user-action-time {
    background: #303134;
    color: #9aa0a6;
    border-color: #3c4043;
}

[data-theme="dark"] .so-user-action-time:hover {
    background: #3c4043;
}

[data-theme="dark"] .so-post-navigation .prev-next a {
    background: #202124;
    border-color: #3c4043;
    color: #e8eaed;
}

[data-theme="dark"] .so-post-navigation .prev-next a::before {
    background: #1a73e8;
}

[data-theme="dark"] .so-post-navigation .prev-next a:hover {
    background: #303134;
    border-color: #1a73e8;
}

[data-theme="dark"] .so-post-navigation .prev-next a .nav-direction {
    color: #1a73e8;
}

.dark-theme .so-tag {
    background: #1a73e8;
}

.dark-theme .so-tag:hover {
    background: #1557b0;
}

.dark-theme .so-post-signature {
    background: #202124;
    border-color: #3c4043;
}

.dark-theme .so-post-signature::before {
    background: #1a73e8;
}

.dark-theme .so-user-gravatar32 {
    background: #1a73e8;
}

.dark-theme .so-user-gravatar32:hover {
    background: #1557b0;
}

.dark-theme .so-user-details-name {
    color: #e8eaed;
}

.dark-theme .so-reputation-score {
    background: #137333;
}

.dark-theme .so-reputation-score:hover {
    background: #0d652d;
}

.dark-theme .so-user-action-time {
    background: #303134;
    color: #9aa0a6;
    border-color: #3c4043;
}

.dark-theme .so-user-action-time:hover {
    background: #3c4043;
}

.dark-theme .so-post-navigation .prev-next a {
    background: #202124;
    border-color: #3c4043;
    color: #e8eaed;
}

.dark-theme .so-post-navigation .prev-next a::before {
    background: #1a73e8;
}

.dark-theme .so-post-navigation .prev-next a:hover {
    background: #303134;
    border-color: #1a73e8;
}

.dark-theme .so-post-navigation .prev-next a .nav-direction {
    color: #1a73e8;
}

/* 投票和收藏按钮样式 */
.so-vote-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    margin-right: 16px;
}

.so-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9aa0a6;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.so-vote-btn:hover {
    background: #f8f9fa;
    color: #4285f4;
}

.so-vote-btn.active {
    color: #4285f4;
    background: #e8f0fe;
}

.so-vote-up.active {
    color: #34a853;
    background: #e6f4ea;
}

.so-vote-down.active {
    color: #ea4335;
    background: #fce8e6;
}

.so-vote-count {
    font-size: 18px;
    font-weight: 600;
    color: #5f6368;
    min-width: 32px;
    text-align: center;
}

.so-vote-count.positive {
    color: #34a853;
}

.so-vote-count.negative {
    color: #ea4335;
}

.so-bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9aa0a6;
    transition: all 0.2s ease;
    padding: 8px;
    border-radius: 50%;
    margin-top: 8px;
}

.so-bookmark-btn:hover {
    background: #f8f9fa;
    color: #fbbc04;
}

.so-bookmark-btn.active {
    color: #fbbc04;
    background: #fef7e0;
}

/* 投票消息提示样式 */
.vote-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.vote-message.show {
    transform: translateX(0);
}

.vote-message.success {
    background: #34a853;
}

.vote-message.info {
    background: #4285f4;
}

.vote-message.error {
    background: #ea4335;
}

/* 筛选按钮样式修复 */
.so-filter-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.so-filter-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #dadce0;
    border-radius: 20px;
    text-decoration: none;
    color: #5f6368;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.so-filter-btn:hover {
    background: #f8f9fa;
    border-color: #4285f4;
    color: #4285f4;
    text-decoration: none;
}

.so-filter-btn.active {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

/* 响应式投票按钮 */
@media (max-width: 640px) {
    .so-vote-container {
        flex-direction: row;
        padding: 12px;
        margin-right: 0;
        margin-bottom: 16px;
        justify-content: center;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .so-vote-count {
        margin: 0 16px;
    }
    
    .so-bookmark-btn {
        margin-top: 0;
        margin-left: 16px;
    }
}
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
}

.so-vote-btn,
.so-bookmark-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--so-gray-light);
    transition: var(--transition);
    padding: 4px;
    border-radius: 50%;
}

.so-vote-btn:hover,
.so-bookmark-btn:hover {
    color: var(--so-orange);
    background: var(--so-bg-light);
}

.so-vote-count {
    font-size: 21px;
    font-weight: 600;
    color: var(--so-gray-dark);
    min-width: 36px;
    text-align: center;
}

/* 分享功能样式 */
.so-share-section {
    margin-top: 32px;
    padding: 24px;
    background: var(--so-bg-light);
    border-radius: 6px;
    border: 1px solid var(--so-border);
}

.so-share-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--so-gray-dark);
    margin-bottom: 16px;
}

.so-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.so-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--so-bg-white);
    border: 1px solid var(--so-border);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--so-gray-dark);
    text-decoration: none;
}

.so-share-btn:hover {
    background: var(--so-blue);
    color: var(--so-bg-white);
    border-color: var(--so-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.so-share-btn svg {
    flex-shrink: 0;
}

/* 特定分享按钮颜色 */
.so-share-wechat:hover {
    background: #07c160;
    border-color: #07c160;
}

.so-share-copy:hover {
    background: var(--so-gray-medium);
    border-color: var(--so-gray-medium);
}

.so-share-qr:hover {
    background: var(--so-orange);
    border-color: var(--so-orange);
}

/* 文章导航样式 */
.so-post-navigation {
    margin-top: 32px;
    padding: 24px;
    background: var(--so-bg-light);
    border-radius: 6px;
    border: 1px solid var(--so-border);
}

.so-post-navigation .prev-next {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.so-post-navigation .prev-next a {
    flex: 1;
    padding: 16px 20px;
    background: var(--so-bg-white);
    border: 1px solid var(--so-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--so-gray-dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.so-post-navigation .prev-next a:hover {
    background: var(--so-blue);
    color: var(--so-bg-white);
    border-color: var(--so-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* 评论区域样式 */
.so-comments-section {
    margin-top: 32px;
    background: var(--so-bg-white);
    border-radius: 6px;
    border: 1px solid var(--so-border);
    overflow: hidden;
}

.so-comments-title {
    font-size: 19px;
    font-weight: 600;
    color: var(--so-gray-dark);
    margin: 0;
    padding: 24px;
    border-bottom: 1px solid var(--so-border);
    background: var(--so-bg-light);
}

/* Valine评论样式优化 */
#vcomment {
    padding: 24px;
}

#vcomment .vwrap {
    border: 1px solid var(--so-border);
    border-radius: 6px;
    background: var(--so-bg-white);
}

#vcomment .vwrap .vheader .vinput {
    border: 1px solid var(--so-border);
    border-radius: 3px;
    background: var(--so-bg-white);
    color: var(--so-gray-dark);
}

#vcomment .vwrap .vheader .vinput:focus {
    border-color: var(--so-blue);
    box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.1);
}

#vcomment .vwrap .vedit {
    border: 1px solid var(--so-border);
    border-radius: 3px;
    background: var(--so-bg-white);
    color: var(--so-gray-dark);
}

#vcomment .vwrap .vedit:focus {
    border-color: var(--so-blue);
    box-shadow: 0 0 0 2px rgba(0, 119, 204, 0.1);
}

#vcomment .vwrap .vcontrol .vsubmit {
    background: var(--so-blue);
    color: var(--so-bg-white);
    border: none;
    border-radius: 3px;
    padding: 8px 16px;
    cursor: pointer;
    transition: var(--transition);
}

#vcomment .vwrap .vcontrol .vsubmit:hover {
    background: var(--so-blue-dark);
}

#vcomment .vcard {
    border: 1px solid var(--so-border);
    border-radius: 6px;
    background: var(--so-bg-white);
    margin-bottom: 16px;
}

#vcomment .vcard .vhead {
    border-bottom: 1px solid var(--so-border);
    background: var(--so-bg-light);
}

#vcomment .vcard .vh {
    color: var(--so-gray-dark);
}

#vcomment .vcard .vtime {
    color: var(--so-gray-medium);
}

#vcomment .vcard .vcontent {
    color: var(--so-gray-dark);
    line-height: 1.6;
}

.so-post-tags {
    margin-top: 24px;
}

.so-post-signature {
    margin-top: 24px;
    padding: 16px;
    background-color: var(--so-tag-bg);
    border-radius: 3px;
    display: flex;
    justify-content: flex-end;
}

.so-share-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--so-border);
}

.so-share-buttons {
    display: flex;
    gap: 12px;
}

.so-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--so-bg-light);
    border: 1px solid var(--so-border);
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition);
}

.so-share-btn:hover {
    background: var(--so-border);
}

/* 响应式设计 */
@media (max-width: 980px) {
    .so-container {
        flex-direction: column;
    }
    
    .so-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--so-border);
        padding: 12px;
    }
    
    .so-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .so-sidebar-link {
        padding: 6px 12px;
        border-radius: 3px;
        margin-right: 0;
    }
    
    .so-main {
        padding: 16px;
    }
    
    .so-content-title {
        font-size: 21px;
    }
    
    .so-question-summary {
        flex-direction: column;
        padding: 12px;
    }
    
    .so-statscontainer {
        flex: none;
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .so-stats {
        flex-direction: row;
        justify-content: space-around;
    }
    
    /* 文章详情页响应式 */
    .so-question-detail {
        margin: 0;
        border-radius: 0;
    }
    
    .so-question-header {
        padding: 20px 16px;
    }
    
    .so-question-title {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .so-question-stats {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .so-question-body {
        flex-direction: column;
    }
    
    .so-vote-cell {
        padding: 0 16px 16px;
        order: 2;
    }
    
    .so-vote-container {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        padding: 12px 0;
    }
    
    .so-post-layout {
        order: 1;
        padding: 0 16px;
    }
    
    .so-post-content {
        font-size: 14px;
    }
    
    .so-share-section {
        margin: 20px 16px;
        padding: 16px;
    }
    
    .so-share-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .so-share-btn {
        justify-content: center;
        padding: 12px 16px;
    }
    
    .so-post-navigation {
        margin: 20px 16px;
        padding: 16px;
    }
    
    .so-post-navigation .prev-next {
        flex-direction: column;
        gap: 12px;
    }
    
    .so-post-navigation .prev-next a {
        align-items: flex-start;
        text-align: left;
    }
    
    .so-post-navigation .prev-next a .nav-direction::before,
    .so-post-navigation .prev-next a .nav-direction::after {
        content: '';
    }
    
    .so-post-navigation .prev-next a.nav-prev .nav-direction::before {
        content: '← ';
    }
    
    .so-post-navigation .prev-next a.nav-next .nav-direction::before {
        content: '→ ';
    }
    
    .so-comments-section {
        margin: 20px 16px;
        border-radius: 8px;
    }
    
    .so-comments-title {
        padding: 16px;
        font-size: 16px;
    }
    
    #vcomment {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .so-header-content {
        padding: 0 8px;
    }
    
    .so-logo {
        font-size: 1rem;
        margin-right: 12px;
    }
    
    .so-nav {
        display: none; /* 隐藏主导航，使用侧边栏导航 */
    }
    
    .so-search {
        max-width: 200px;
        margin: 0 8px;
    }
    
    .so-search-input {
        padding: 6px 28px 6px 8px;
        font-size: 12px;
    }
    
    .so-main {
        padding: 12px;
    }
    
    .so-question-header {
        padding: 16px 12px;
    }
    
    .so-question-title {
        font-size: 18px;
    }
    
    .so-question-stats {
        font-size: 12px;
    }
    
    .so-post-layout {
        padding: 0 12px;
    }
    
    .so-post-content {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .so-post-content h1 { font-size: 1.5em; }
    .so-post-content h2 { font-size: 1.3em; }
    .so-post-content h3 { font-size: 1.1em; }
    .so-post-content h4 { font-size: 1em; }
    
    .so-post-content pre {
        padding: 12px;
        font-size: 12px;
        overflow-x: auto;
    }
    
    .so-post-content table {
        font-size: 12px;
    }
    
    .so-post-content th,
    .so-post-content td {
        padding: 8px;
    }
    
    .so-share-section,
    .so-post-navigation,
    .so-comments-section {
        margin: 16px 12px;
        padding: 12px;
    }
    
    .so-vote-container {
        gap: 16px;
    }
    
    .so-vote-btn svg {
        width: 28px;
        height: 28px;
    }
    
    .so-vote-count {
        font-size: 18px;
    }
    
    .so-tags-wrapper {
        gap: 6px;
    }
    
    .so-tag {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .so-header {
        height: 44px;
    }
    
    .so-header-content {
        padding: 0 6px;
    }
    
    .so-logo {
        font-size: 0.9rem;
        margin-right: 8px;
    }
    
    .so-search {
        max-width: 150px;
        margin: 0 6px;
    }
    
    .so-search-input {
        padding: 5px 24px 5px 6px;
        font-size: 11px;
    }
    
    .so-search-btn {
        width: 24px;
    }
    
    .so-search-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .so-container {
        margin-top: 44px;
    }
    
    .so-main {
        padding: 8px;
    }
    
    .so-question-header {
        padding: 12px 8px;
    }
    
    .so-question-title {
        font-size: 16px;
        line-height: 1.2;
    }
    
    .so-question-stats {
        font-size: 11px;
        gap: 8px;
    }
    
    .so-post-layout {
        padding: 0 8px;
    }
    
    .so-post-content {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .so-post-content h1 { font-size: 1.3em; }
    .so-post-content h2 { font-size: 1.2em; }
    .so-post-content h3 { font-size: 1.1em; }
    .so-post-content h4 { font-size: 1em; }
    
    .so-post-content pre {
        padding: 8px;
        font-size: 11px;
        margin: 12px 0;
    }
    
    .so-post-content blockquote {
        padding: 12px 16px;
        margin: 12px 0;
    }
    
    .so-post-content ul,
    .so-post-content ol {
        padding-left: 20px;
        margin: 12px 0;
    }
    
    .so-share-section,
    .so-post-navigation,
    .so-comments-section {
        margin: 12px 8px;
        padding: 8px;
    }
    
    .so-share-title,
    .so-comments-title {
        font-size: 14px;
    }
    
    .so-share-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .so-share-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .so-vote-container {
        gap: 12px;
        padding: 8px 0;
    }
    
    .so-vote-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .so-vote-count {
        font-size: 16px;
    }
    
    #vcomment {
        padding: 8px;
    }
}

/* 横屏手机优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .so-header {
        height: 40px;
    }
    
    .so-container {
        margin-top: 40px;
    }
    
    .so-question-body {
        flex-direction: row;
    }
    
    .so-vote-cell {
        order: 0;
        padding: 16px 8px;
    }
    
    .so-vote-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .so-post-layout {
        order: 1;
        padding: 0 16px;
    }
}

/* 平板设备优化 */
@media (min-width: 641px) and (max-width: 980px) {
    .so-question-body {
        flex-direction: row;
    }
    
    .so-vote-cell {
        order: 0;
        padding: 16px;
    }
    
    .so-post-layout {
        order: 1;
        padding: 0 20px;
    }
    
    .so-share-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .so-post-navigation .prev-next {
        flex-direction: row;
    }
}




/* 重新设计特色图片样式 - 更合理的布局 */
.so-featured-image {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e8eaed;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.so-featured-image:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.so-question-summary.with-image {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-height: 80px;
}

.so-question-summary.with-image .so-summary {
    flex: 1;
    min-width: 0;
}

.so-featured-image-placeholder {
    width: 120px;
    height: 80px;
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    border: 1px solid #e8eaed;
    color: #9aa0a6;
    flex-shrink: 0;
}

.so-featured-image-placeholder svg {
    width: 24px;
    height: 24px;
    color: #dadce0;
}

/* 文章详情页标签样式 - 修复版本 */
.so-post-tags {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e8eaed;
    clear: both;
}

.so-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.so-tags-wrapper::before {
    content: "标签：";
    font-size: 14px;
    color: #5f6368;
    font-weight: 500;
    margin-right: 8px;
}

/* 确保标签链接样式正确应用 */
.so-post-tags .so-tag,
.so-tags-wrapper .so-tag,
.so-post-tags a {
    display: inline-flex !important;
    align-items: center;
    padding: 6px 12px !important;
    background: #e8f0fe !important;
    color: #1a73e8 !important;
    text-decoration: none !important;
    border-radius: 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
    position: relative;
    overflow: hidden;
    margin: 2px !important;
}

.so-post-tags .so-tag::before,
.so-tags-wrapper .so-tag::before,
.so-post-tags a::before {
    content: "#" !important;
    margin-right: 4px !important;
    font-weight: 600 !important;
    opacity: 0.7;
}

.so-post-tags .so-tag:hover,
.so-tags-wrapper .so-tag:hover,
.so-post-tags a:hover {
    background: #1a73e8 !important;
    color: white !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3) !important;
}

.so-post-tags .so-tag:active,
.so-tags-wrapper .so-tag:active,
.so-post-tags a:active {
    transform: translateY(0) !important;
}

/* 首页文章列表标签样式 */
.so-question-summary .so-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.so-question-summary .so-tag {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 12px;
    background: #f1f3f4;
    color: #5f6368;
}

.so-question-summary .so-tag:hover {
    background: #e8f0fe;
    color: #1a73e8;
}

/* 响应式特色图片 - 更合理的设计 */
@media (max-width: 768px) {
    .so-featured-image,
    .so-featured-image-placeholder {
        width: 100px;
        height: 70px;
    }
}

@media (max-width: 640px) {
    .so-question-summary.with-image {
        flex-direction: column;
        align-items: stretch;
    }
    
    .so-featured-image,
    .so-featured-image-placeholder {
        width: 100%;
        height: 120px;
        margin-right: 0;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .so-featured-image,
    .so-featured-image-placeholder {
        height: 100px;
    }
    
    .so-tag {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .so-tags-wrapper::before {
        font-size: 13px;
    }
}


/* 首页筛选加载状态样式 */
.so-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #5f6368;
}

.so-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4285f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.so-loading-state p {
    margin: 0;
    font-size: 14px;
    color: #9aa0a6;
}

/* 图片懒加载样式 */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* 筛选按钮动画优化 */
.so-filter-btn {
    position: relative;
    overflow: hidden;
}

.so-filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.so-filter-btn:hover::before {
    left: 100%;
}

.so-filter-btn.active::before {
    display: none;
}

/* 特色图片优化 */
.so-featured-image {
    transition: all 0.3s ease;
}

.so-featured-image:hover {
    transform: scale(1.05);
}

.so-question-summary.with-image:hover .so-featured-image {
    transform: scale(1.02);
}

/* 文章列表项悬停效果 */
.so-question-summary {
    transition: all 0.2s ease;
}

.so-question-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 响应式特色图片优化 */
@media (max-width: 480px) {
    .so-featured-image,
    .so-featured-image-placeholder {
        height: 160px;
    }
}


/* 置顶文章标记样式 - 简化版 */
.so-pinned-marker {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.so-pinned-marker:hover {
    transform: scale(1.1);
}

.pinned-article {
    position: relative;
}

/* 响应式置顶标记 */
@media (max-width: 640px) {
    .so-pinned-marker {
        top: 6px;
        right: 6px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}


/* 图片区域统计信息样式 */
.so-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: var(--so-bg-light);
    border-radius: 6px;
    overflow: hidden;
}

.so-featured-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.so-featured-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 120px;
    background: var(--so-bg-light);
    color: var(--so-gray-light);
    border: 1px solid var(--so-border);
    border-radius: 6px;
}

.so-image-stats {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
}

.so-image-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.so-image-stat .so-stat-icon {
    width: 12px;
    height: 12px;
    opacity: 0.9;
}

.so-image-stat span {
    font-size: 11px;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .so-image-container {
        min-height: 100px;
    }
    
    .so-featured-image,
    .so-featured-image-placeholder {
        height: 100px;
    }
    
    .so-image-stats {
        top: 6px;
        right: 6px;
        gap: 6px;
    }
    
    .so-image-stat {
        padding: 3px 6px;
        font-size: 11px;
    }
}


/* 紧凑分享功能样式 */
.so-share-compact {
    position: relative;
    margin-top: 16px;
}

.so-share-btn-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--so-border);
    background: var(--so-bg-white);
    color: var(--so-gray-medium);
    border-radius: 3px;
    cursor: pointer;
    transition: var(--transition);
}

.so-share-btn-compact:hover {
    background: var(--so-orange);
    color: var(--so-bg-white);
    border-color: var(--so-orange);
}

.so-share-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--so-bg-white);
    border: 1px solid var(--so-border);
    border-radius: 6px;
    box-shadow: var(--shadow-medium);
    min-width: 120px;
    z-index: 1000;
    display: none;
}

.so-share-compact:hover .so-share-dropdown {
    display: block;
}

.so-share-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: var(--so-gray-dark);
    transition: var(--transition);
}

.so-share-option:hover {
    background: var(--so-bg-light);
}

.so-share-option:first-child {
    border-radius: 6px 6px 0 0;
}

.so-share-option:last-child {
    border-radius: 0 0 6px 6px;
}


/* 文章内目录样式 */
.so-article-toc {
    background: var(--so-bg-light);
    border: 1px solid var(--so-border);
    border-radius: 6px;
    padding: 20px;
    margin: 24px 0;
}

.so-toc-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--so-gray-dark);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--so-border);
}

.so-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.so-toc-item {
    margin: 0;
    padding: 0;
}

.so-toc-link {
    display: block;
    padding: 6px 0;
    color: var(--so-blue);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: var(--transition);
}

.so-toc-link:hover {
    color: var(--so-blue-dark);
    text-decoration: underline;
}

/* 不同级别的缩进 */
.so-toc-level-1 .so-toc-link {
    padding-left: 0;
    font-weight: 600;
}

.so-toc-level-2 .so-toc-link {
    padding-left: 16px;
    font-weight: 500;
}

.so-toc-level-3 .so-toc-link {
    padding-left: 32px;
}

.so-toc-level-4 .so-toc-link {
    padding-left: 48px;
}

.so-toc-level-5 .so-toc-link {
    padding-left: 64px;
}

.so-toc-level-6 .so-toc-link {
    padding-left: 80px;
}

/* 悬浮目录样式 */
.so-floating-toc {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--so-bg-white);
    border: 1px solid var(--so-border);
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    max-width: 280px;
    max-height: 60vh;
    z-index: 1000;
    overflow: hidden;
}

.so-floating-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--so-bg-light);
    border-bottom: 1px solid var(--so-border);
}

.so-floating-toc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--so-gray-dark);
    margin: 0;
}

.so-floating-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--so-gray-medium);
    cursor: pointer;
    border-radius: 3px;
    transition: var(--transition);
}

.so-floating-toc-toggle:hover {
    background: var(--so-border);
    color: var(--so-gray-dark);
}

.so-floating-toc-content {
    max-height: calc(60vh - 50px);
    overflow-y: auto;
    transition: all 0.3s ease;
}

.so-floating-toc-content.collapsed {
    max-height: 0;
    overflow: hidden;
}

.so-floating-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.so-floating-toc-item {
    margin: 0;
    padding: 0;
}

.so-floating-toc-link {
    display: block;
    padding: 8px 16px;
    color: var(--so-gray-medium);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.so-floating-toc-link:hover {
    background: var(--so-bg-light);
    color: var(--so-gray-dark);
}

.so-floating-toc-link.active {
    background: var(--so-bg-light);
    color: var(--so-blue);
    border-left-color: var(--so-orange);
    font-weight: 500;
}

/* 悬浮目录不同级别的缩进 */
.so-floating-toc-level-1 .so-floating-toc-link {
    padding-left: 16px;
    font-weight: 500;
}

.so-floating-toc-level-2 .so-floating-toc-link {
    padding-left: 24px;
}

.so-floating-toc-level-3 .so-floating-toc-link {
    padding-left: 32px;
}

.so-floating-toc-level-4 .so-floating-toc-link {
    padding-left: 40px;
}

.so-floating-toc-level-5 .so-floating-toc-link {
    padding-left: 48px;
}

.so-floating-toc-level-6 .so-floating-toc-link {
    padding-left: 56px;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .so-floating-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .so-article-toc {
        padding: 16px;
        margin: 16px 0;
    }
    
    .so-toc-title {
        font-size: 15px;
    }
    
    .so-toc-link {
        font-size: 13px;
    }
}


/* 分享功能相关样式 */
.so-user-stats {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.so-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--so-gray-medium);
    font-size: 12px;
}

.so-stat-item .so-stat-icon {
    width: 12px;
    height: 12px;
    opacity: 0.8;
}

/* 二维码模态框样式 */
.so-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.so-qr-modal-content {
    background: var(--so-bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
    max-width: 320px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
}

.so-qr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--so-border);
    background: var(--so-bg-light);
}

.so-qr-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--so-gray-dark);
}

.so-qr-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--so-gray-medium);
    cursor: pointer;
    font-size: 18px;
    border-radius: 3px;
    transition: var(--transition);
}

.so-qr-modal-close:hover {
    background: var(--so-border);
    color: var(--so-gray-dark);
}

.so-qr-modal-body {
    padding: 20px;
    text-align: center;
}

.so-qr-code {
    width: 200px;
    height: 200px;
    border: 1px solid var(--so-border);
    border-radius: 6px;
    margin-bottom: 16px;
}

.so-qr-url {
    font-size: 12px;
    color: var(--so-gray-medium);
    word-break: break-all;
    margin: 0;
    padding: 8px;
    background: var(--so-bg-light);
    border-radius: 4px;
}

/* 消息提示样式 */
.so-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--so-gray-dark);
    color: var(--so-bg-white);
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 10001;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.so-toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .so-user-stats {
        gap: 12px;
        margin-top: 6px;
    }
    
    .so-stat-item {
        font-size: 11px;
    }
    
    .so-qr-modal-content {
        margin: 20px;
    }
    
    .so-qr-code {
        width: 160px;
        height: 160px;
    }
    
    .so-toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
    }
    
    .so-toast.show {
        transform: translateY(0);
    }
}


/* 页脚样式 */
.so-footer {
    background: var(--so-bg-light);
    color: var(--so-gray-dark);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--so-border);
    font-size: 14px;
}

.so-footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.so-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px 25px;
    margin-bottom: 20px;
}

.so-footer-link {
    color: var(--so-gray-dark);
    text-decoration: none;
    transition: var(--transition);
}

.so-footer-link:hover {
    color: var(--so-orange);
}

.so-footer-info p {
    margin: 5px 0;
    color: var(--so-gray-medium);
}

.so-footer-info a {
    color: var(--so-blue);
    text-decoration: none;
    transition: var(--transition);
}

.so-footer-info a:hover {
    text-decoration: underline;
}

/* 返回顶部按钮样式 */
.so-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--so-orange);
    color: var(--so-bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.so-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.so-back-to-top:hover {
    background: var(--so-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .so-footer {
        padding: 20px 0;
        margin-top: 40px;
    }
    
    .so-footer-content {
        padding: 0 16px;
    }
    
    .so-footer-links {
        gap: 10px 20px;
        margin-bottom: 15px;
    }
    
    .so-footer-info p {
        font-size: 12px;
        margin: 4px 0;
    }
    
    .so-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}



/* Footer Links */
.so-footer-links a,
.so-social-links a {
    margin-right: 10px;
    color: var(--so-link-color);
    text-decoration: none;
}

.so-footer-links a:hover,
.so-social-links a:hover {
    text-decoration: underline;
}


