/* common.css - 两个页面共用的全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

/* 桌面阻尼滚动容器 */
.damping-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.damping-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.damping-scrollbox {
    position: relative;
    width: 100%;
    will-change: transform;
    transition: transform 0.05s linear;
    pointer-events: auto;
}

.damping-content {
    width: 100%;
    position: relative;
}

body.damping-mode {
    height: auto;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

/* 左侧背景图片 */
.left-background-image {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 230px;
    height: 400px;
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .left-background-image {
        display: none;
    }
}

/* 顶栏 */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .top-navbar {
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 左侧导航区域（只用于 article/donate 页面） */
.navbar-left {
    display: flex;
    align-items: center;
}

/* 右侧导航区域（两个页面共用） */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* 返回首页按钮样式 */
.home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 25px;
    background: rgba(66, 133, 244, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .home-btn {
    color: #f0f0f0;
    background: rgba(66, 133, 244, 0.2);
}

.home-btn:hover {
    background: rgba(66, 133, 244, 0.2);
    transform: translateY(-1px);
}

.home-btn svg {
    width: 16px;
    height: 16px;
    stroke: #4285f4;
}

/* 搜索按钮、捐赠按钮、用户按钮 */
.search-btn, .donate-nav-btn, .user-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
}

[data-theme="dark"] .search-btn, 
[data-theme="dark"] .donate-nav-btn, 
[data-theme="dark"] .user-btn {
    color: #f0f0f0;
}

.search-btn:hover, .donate-nav-btn:hover, .user-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.donate-nav-btn:hover {
    background: rgba(66, 133, 244, 0.15);
    transform: scale(1.05);
}

/* 搜索弹窗 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .search-modal-content {
    background: rgba(30, 30, 30, 0.95);
}

.search-modal-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 12px;
    outline: none;
    background: white;
}

[data-theme="dark"] .search-modal-input {
    background: #2d2d2d;
    border-color: #444;
    color: white;
}

.search-modal-input:focus {
    border-color: #4285f4;
}

.search-modal-results {
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

[data-theme="dark"] .search-result-item {
    border-bottom-color: #444;
}

.search-result-item:hover {
    background: rgba(66, 133, 244, 0.1);
}

.search-result-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.search-result-excerpt {
    font-size: 0.85em;
    color: #666;
}

[data-theme="dark"] .search-result-excerpt {
    color: #aaa;
}

.close-search {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
}

/* 主题切换开关 */
.theme-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: #ddd;
    border-radius: 28px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
}

[data-theme="dark"] .theme-switch {
    background: #555;
}

.theme-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .theme-switch::after {
    transform: translateX(24px);
    background: #ffd700;
}

/* 用户菜单 */
.user-dropdown {
    position: relative;
}

.user-menu {
    position: absolute;
    top: 48px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    display: none;
    z-index: 1001;
    overflow: hidden;
}

[data-theme="dark"] .user-menu {
    background: #2d2d2d;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.user-menu.active {
    display: block;
}

.user-menu a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    font-size: 14px;
}

[data-theme="dark"] .user-menu a {
    color: #f0f0f0;
}

.user-menu a:hover {
    background: rgba(66, 133, 244, 0.1);
}

.user-menu .logout {
    color: #f44336;
}

/* ========================================
   左侧边栏 - 通过 body 类控制显示/隐藏
   ======================================== */
/* 默认隐藏侧边栏 */
.sidebar {
    display: none;
}

/* 只有 body 有 show-sidebar 类时才显示侧边栏 */
body.show-sidebar .sidebar {
    display: block;
    position: fixed;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-radius: 32px;
    padding: 32px 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
    z-index: 100;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    pointer-events: auto;
}

[data-theme="dark"] body.show-sidebar .sidebar {
    background: rgba(30, 30, 30, 0.94);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

body.show-sidebar .sidebar:hover {
    transform: translateY(-50%) scale(1.01);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.sidebar-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 24px;
    border: 4px solid #4285f4;
    transition: transform 0.3s ease;
}

.sidebar-avatar:hover {
    transform: scale(1.05);
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(66, 133, 244, 0.1);
    border: 1.5px solid rgba(66, 133, 244, 0.35);
    border-radius: 60px;
    text-decoration: none;
    color: #4285f4;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

[data-theme="dark"] .sidebar-btn {
    background: rgba(66, 133, 244, 0.15);
    color: #7bed9f;
    border-color: rgba(123, 237, 159, 0.35);
}

.sidebar-btn:hover {
    background: #4285f4;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

.sidebar-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* 超大屏幕侧边栏位置微调 */
@media (min-width: 1800px) {
    body.show-sidebar .sidebar {
        left: 80px;
        width: 360px;
        padding: 40px 28px;
    }
    .sidebar-avatar {
        width: 160px;
        height: 160px;
    }
}

/* 中等屏幕侧边栏缩小 */
@media (max-width: 1400px) {
    body.show-sidebar .sidebar {
        left: 20px;
        width: 280px;
        padding: 24px 20px;
    }
    .sidebar-avatar {
        width: 120px;
        height: 120px;
    }
    .sidebar-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    .sidebar-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 小屏幕隐藏侧边栏 */
@media (max-width: 1100px) {
    body.show-sidebar .sidebar {
        display: none;
    }
}

/* ========================================
   主内容区域 - 根据侧边栏状态自适应
   ======================================== */
.main-content {
    margin-top: 76px;
    padding: 24px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

/* 当侧边栏显示时，主内容区右移（使用 calc 确保不被遮挡） */
body.show-sidebar .main-content {
    margin-left: 380px;
    margin-right: auto;
    max-width: calc(1200px - 380px + 24px);
}

@media (min-width: 1800px) {
    body.show-sidebar .main-content {
        margin-left: 460px;
        max-width: calc(1400px - 460px + 24px);
    }
}

@media (max-width: 1400px) {
    body.show-sidebar .main-content {
        margin-left: 330px;
        max-width: calc(1000px - 330px + 24px);
    }
}

/* 当屏幕宽度不足时，侧边栏自动隐藏（通过媒体查询），主内容区恢复居中 */
@media (max-width: 1100px) {
    body.show-sidebar .sidebar {
        display: none;
    }
    body.show-sidebar .main-content {
        margin-left: auto;
        margin-right: auto;
        max-width: 1200px;
    }
}

/* 文章页面不需要侧边栏，主内容区正常居中 */
.main-content:not(.no-sidebar) {
    margin-left: auto;
    margin-right: auto;
    max-width: 1000px;
}

.welcome-text {
    font-size: 2em;
    margin-bottom: 36px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 2px;
}

.section-title {
    font-size: 1.6em;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #4285f4;
    display: inline-block;
    font-weight: 600;
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* 文章卡片 - 严格固定高度280px，图片填满无留白 */
.article-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: row;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    align-items: stretch;
    width: 100%;
}

[data-theme="dark"] .article-card {
    background: #2d2d2d;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.article-image-container {
    width: 360px;
    height: 280px;
    flex-shrink: 0;
    overflow: hidden;
    background-color: #f0f0f0;
    position: relative;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image {
    transform: scale(1.08);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
}

.article-content {
    padding: 24px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.article-title {
    font-size: 1.5em;
    margin-bottom: 14px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 700;
}

[data-theme="dark"] .article-title {
    color: #f0f0f0;
}

.article-excerpt {
    color: #666;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.65;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .article-excerpt {
    color: #aaa;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #888;
    padding-top: 14px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

[data-theme="dark"] .article-meta {
    border-top: 1px solid #444;
}

@media (max-width: 768px) {
    .article-card {
        flex-direction: column;
        height: auto;
        min-height: auto;
        max-height: none;
    }
    .article-card a {
        flex-direction: column;
    }
    .article-image-container {
        width: 100%;
        height: 220px;
    }
    .article-content {
        padding: 18px 20px;
    }
    .article-title {
        font-size: 1.3em;
    }
    body.show-sidebar .main-content {
        margin-left: auto;
    }
}

.pagination-container {
    text-align: center;
    margin-top: 40px;
}

.pagination {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    padding: 10px 18px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .page-btn {
    background: #2d2d2d;
    color: #f0f0f0;
    border-color: #444;
}

.page-btn:hover, .page-btn.active {
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

footer {
    background: transparent;
    color: #666;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    font-size: 0.85em;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] footer {
    color: #aaa;
    border-top-color: rgba(255, 255, 255, 0.08);
}

footer a {
    color: #4285f4;
    text-decoration: none;
}

/* 鼠标尾迹效果 */
.tail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.tail-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(66, 133, 244, 0.7);
    box-shadow: 0 0 10px rgba(66, 133, 244, 0.9);
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, opacity 0.5s ease;
    opacity: 0;
}

[data-theme="dark"] .tail-particle {
    background: rgba(100, 181, 246, 0.8);
    box-shadow: 0 0 15px rgba(100, 181, 246, 1);
}

/* 点击特效 */
.click-effect-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    overflow: hidden;
}

.click-ripple {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2.5px solid;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.9;
    animation: clickRippleAnim 0.8s ease-out forwards;
}

@keyframes clickRippleAnim {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(4.5);
        opacity: 0;
    }
}

[data-theme="light"] .click-ripple {
    border-color: #ff6b6b;
}

[data-theme="dark"] .click-ripple {
    border-color: #70a1ff;
}

/* Live2D 看板娘 */
#live2d-container {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 160px;
    height: 330px;
    z-index: 9998;
    pointer-events: none;
    background: transparent !important;
    opacity: 0;
    will-change: transform;
}

#live2d-canvas {
    position: absolute !important;
    bottom: -100px !important;
    right: -25px !important;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
    filter: drop-shadow(0 -3px 8px rgba(0, 0, 0, 0.2));
    object-fit: contain;
}

.live2d-tips {
    position: absolute;
    bottom: 225px !important;
    left: 35px !important;
    width: auto;
    max-width: 110px;
    text-align: center;
    color: #fff;
    font-size: 7px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 12px;
    pointer-events: none;
    backdrop-filter: blur(2px);
    white-space: nowrap;
    opacity: 0;
    animation: tipFadeIn 0.5s forwards 1s;
}

@keyframes tipFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    #live2d-container {
        display: none;
    }
}

/* ========== 文章页面专属样式 ========== */
.article-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    margin-bottom: 2rem;
}

[data-theme="dark"] .article-container {
    background: #2d2d2d;
}

.article-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .article-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.article-title {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.3;
}

[data-theme="dark"] .article-title {
    color: #f0f0f0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.article-type-badge {
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.type-original {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.type-reprinted {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.article-cover {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    max-height: 350px;
}

.article-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: #1a202c;
    margin: 1.5rem 0;
}

[data-theme="dark"] .article-content {
    color: #e0e0e0;
}

.article-content h1 {
    font-size: 2em;
    margin: 0.8em 0 0.5em;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.3em;
}

.article-content h2 {
    font-size: 1.6em;
    margin: 0.8em 0 0.5em;
    font-weight: 600;
    color: #4285f4;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.3em;
}

.article-content p {
    margin: 1em 0;
}

.article-content blockquote {
    border-left: 4px solid #4285f4;
    margin: 1.5em 0;
    padding: 0.5em 1.5em;
    background: #f8f9fa;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

[data-theme="dark"] .article-content blockquote {
    background: #2d2d2d;
}

.article-content pre {
    background: #f6f8fa;
    border-radius: 12px;
    padding: 1em;
    margin: 1.5em 0;
    overflow-x: auto;
}

[data-theme="dark"] .article-content pre {
    background: #0d1117;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    font-size: 14px;
}

.article-content code:not(pre code) {
    background: #f0f0f0;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 0.9em;
}

[data-theme="dark"] .article-content code:not(pre code) {
    background: #2d2d2d;
    color: #ffa07a;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
}

.article-content ul, .article-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.article-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5em 0;
}

.article-content th, .article-content td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

[data-theme="dark"] .article-content th,
[data-theme="dark"] .article-content td {
    border-color: #444;
}

.article-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.external-link-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(66, 133, 244, 0.08);
    border-radius: 12px;
    border-left: 4px solid #4285f4;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.external-link-section a {
    color: #4285f4;
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}

.article-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
    font-size: 14px;
}

.btn-primary {
    background-color: #4285f4;
    color: white;
}

.btn-primary:hover {
    background-color: #3367d6;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4285f4;
    color: #4285f4;
}

.btn-outline:hover {
    background: #4285f4;
    color: white;
}

/* 评论区域 */
.comments-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

[data-theme="dark"] .comments-section {
    background: #2d2d2d;
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-form {
    margin-bottom: 1.5rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    color: #333;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

[data-theme="dark"] .comment-form textarea {
    background: #1a1a1a;
    color: #f0f0f0;
    border-color: rgba(255, 255, 255, 0.1);
}

.comment-form textarea:focus {
    outline: none;
    border-color: #4285f4;
}

.comment-form button {
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form button:hover {
    background: #3367d6;
    transform: translateY(-2px);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .comment-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
}

.comment-info {
    flex: 1;
}

.comment-username {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

[data-theme="dark"] .comment-username {
    color: #f0f0f0;
}

.comment-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

.comment-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
    padding-left: 44px;
}

[data-theme="dark"] .comment-content {
    color: #f0f0f0;
}

.no-comments {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* PJAX 加载动画 */
.pjax-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 20px 30px;
    z-index: 20000;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pjax-loading.active {
    opacity: 1;
    visibility: visible;
}

.pjax-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 捐赠页面专属样式 ========== */
.donate-page .main-content {
    margin-top: 76px;
    padding: 24px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 76px - 100px);
}

.donate-container {
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    text-align: center;
    padding: 40px 30px;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .donate-container {
    background: #2d2d2d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.donate-container:hover {
    transform: translateY(-5px);
}

.donate-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.donate-icon svg {
    width: 70px;
    height: 70px;
    stroke: #4285f4;
    stroke-width: 1.5;
    fill: none;
}

[data-theme="dark"] .donate-icon svg {
    stroke: #7bed9f;
}

.donate-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #4285f4;
}

.donate-desc {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

[data-theme="dark"] .donate-desc {
    color: #aaa;
}

/* 二维码容器 */
.qr-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.qr-code {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.qr-code:hover {
    transform: scale(1.02);
}

[data-theme="dark"] .qr-code {
    background: #3d3d3d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.qr-code img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    pointer-events: none;
}

@media (min-width: 769px) {
    .qr-code {
        width: 320px;
    }
    .qr-code img {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    .donate-container {
        padding: 30px 20px;
    }
    .qr-code {
        width: 260px;
        padding: 15px;
    }
    .qr-code img {
        width: 230px;
        height: 230px;
    }
    .donate-title {
        font-size: 24px;
    }
    .donate-icon svg {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .qr-code {
        width: 220px;
        padding: 12px;
    }
    .qr-code img {
        width: 196px;
        height: 196px;
    }
    .donate-container {
        padding: 25px 16px;
    }
}

.donate-tip {
    font-size: 14px;
    color: #999;
    margin-bottom: 25px;
}

.donate-btn {
    background: #4285f4;
    color: white;
    border: none;
    padding: 14px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.donate-btn:hover {
    background: #3367d6;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.3);
}

[data-theme="dark"] .donate-btn:hover {
    background: #5a95f5;
}

.donate-btn svg {
    width: 20px;
    height: 20px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #4285f4;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 30px;
    transition: background 0.2s;
}

.back-link:hover {
    background: rgba(66, 133, 244, 0.1);
    text-decoration: none;
}

.back-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    min-height: 200px;
}

/* 二维码放大模态框 */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.qr-modal.active {
    display: flex;
}

.qr-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    border-radius: 32px;
    overflow: hidden;
    text-align: center;
    animation: zoomIn 0.2s ease-out;
}

.qr-modal-content img {
    width: 100%;
    height: auto;
    max-width: 600px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 24px;
    background: white;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .qr-modal-content img {
    background: #2d2d2d;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.qr-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qr-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Toast 消息 */
.toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    pointer-events: none;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.toast-message.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* 确保没有任何多余数字角标 */
.donate-container::before,
.donate-container::after,
.qr-code::before,
.qr-code::after {
    display: none !important;
    content: none !important;
}