/*
Theme Name: CHAT THEME
Theme URI: https://example.com/
Author: 叭叭叭叭个啥
Author URI: https://example.com/
Description: 一个聊天页面风格的主题
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chat-theme
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #a8edea 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#page-container {
    display: flex;
    flex-direction: column;
    width: 1400px;
    height: 90vh;
    max-width: 95vw;
    background: linear-gradient(135deg, rgba(255, 236, 210, 0.95) 0%, rgba(252, 182, 159, 0.95) 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: transparent;
    position: relative;
}

#content-area {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding:10px;
}

#content-area.single-page {
    flex-direction: row;
    justify-content: flex-start;
}

#content-area.single-page #chat-list-container {
    display: none;
}

#content-area.single-page #main-content {
    flex: 1;
    width: 100%;
    min-height: 0;
    background: rgba(255, 255, 255, 0.12);
}

#content-area.single-page #chat-header {
    background: rgba(255, 255, 255, 0.25);
    margin: 0;
    border: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#content-area.single-page #chat-messages {
    display: block;
}

#content-area.single-page #chat-messages .message.article-message {
    display: block;
    max-width: 100%;
    width: 100%;
    margin: 0;
}


#content-area.single-page #chat-input-area {
    background: rgba(255, 255, 255, 0.25);
}
#content-area.single-page #chat-input-area.hidden {
    display: block !important;
}

#header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
    overflow: hidden;
}

#avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#avatar:hover {
    transform: scale(1.05);
}

#username {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#header-right {
    display: flex;
    gap: 15px;
}

.header-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    background: rgba(255, 255, 255, 0.5);
}

.header-icon:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
}

#nav-menu {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 15px 0;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px 0 0 10px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.nav-item {
    width: 100%;
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    font-size: 22px;
    transition: all 0.2s;
    position: relative;
    margin: 4px 0;
}

.nav-item:hover {
    color: #e55555;
}

.nav-item:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(229, 85, 85, 0.1);
    border-radius: 12px;
    z-index: -1;
}

.nav-item.active {
    color: #e55555;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(229, 85, 85, 0.12);
    border-radius: 12px;
    z-index: -1;
}

.nav-item.active:hover::before {
    background: rgba(229, 85, 85, 0.2);
}






.nav-item-text {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

#chat-list-container {
    width: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
}

#search-box {
    width: 0;
    padding: 0;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#search-box.active {
    width: 150px;
    padding: 8px 15px;
    opacity: 1;
    pointer-events: auto;
}

#search-box:focus {
    background: white;
    width: 180px;
}

.search-toggle.active {
    background: rgba(229, 85, 85, 0.1);
    color: #e55555;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-height: 350px;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.25s ease;
}

.search-results.active {
    opacity: 1;
    transform: translateY(0);
}

.search-result-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-result-item:hover {
    background: rgba(229, 85, 85, 0.05);
}

.search-result-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.search-result-item:hover .search-result-title {
    color: #e55555;
}

.search-result-meta {
    font-size: 12px;
    color: #999;
}

.search-no-results {
    padding: 24px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.chat-item {
    display: flex;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-item:hover {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.chat-item.active {
    background: rgba(229, 85, 85, 0.1);
    border-radius: 10px;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
    margin-left: 10px;
}

.chat-preview {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-unread {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #333;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    flex-shrink: 0;
    font-weight: 600;
    white-space: nowrap;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 0 10px 10px 0;
}



#chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 0 10px 0 0;
}

#chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#chat-avatar-main {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    overflow: hidden;
}

#chat-avatar-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#chat-name-main {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

#chat-header-right {
    display: flex;
    gap: 10px;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 70%;
    margin-bottom: 20px;
    display: flex;
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.message.sent .message-avatar {
    order: 2;
    margin-left: 10px;
}

.message-content {
    /* display: flex; */
    flex-direction: column;
}

.message.sent .message-content {
    align-items: flex-end;
}

.message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    word-break: break-word;
}

.message.sent .message-text {
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.message-text.article-content {
    padding: 20px;
    font-size: 15px;
    line-height: 1.8;
}

.message-text.article-content h1,
.message-text.article-content h2,
.message-text.article-content h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.message-text.article-content h1 { font-size: 24px; }
.message-text.article-content h2 { font-size: 20px; }
.message-text.article-content h3 { font-size: 18px; }

.message-text.article-content p {
    margin-bottom: 15px;
}

.message-text.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

.message-text.article-content a {
    color: #e55555;
    text-decoration: none;
}

.message-text.article-content ul,
.message-text.article-content ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.message-text.article-content li {
    margin-bottom: 5px;
}

.message-text.article-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    border-left: 4px solid #e55555;
    background: rgba(229, 85, 85, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.message-text.article-content blockquote p {
    margin-bottom: 0;
}

.message.received .message-text {
    border-radius: 18px;
}

.message.article-message {
    max-width: 100% !important;
    width: 100%;
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.message.article-message .message-text {
    max-width: 100%;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.4s ease-out 0.1s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.comments-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 700px;
    width: 100%;
}

.comment-item.current-user {
    align-self: flex-end;
}

.comment-item.has-replies {
    max-width: 100%;
    width: 100%;
}

.comment-main {
    display: flex;
    gap: 10px;
    width: fit-content;
    align-items: flex-start;
}

.comment-item.current-user .comment-main {
    flex-direction: row-reverse;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.comment-avatar img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
}

.comment-item.current-user .comment-avatar {
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
}

.comment-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.comment-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}

.comment-author-name {
    font-weight: 600;
    color: #667eea;
    font-size: 13px;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.level-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0.9 !important;
    visibility: visible !important;
    transition: all 0.2s ease !important;
    cursor: default !important;
}

.level-badge:hover {
    opacity: 1 !important;
    transform: scale(1.15) !important;
}

.level-badge.lv0 img {
    filter: brightness(0.6) grayscale(0.4);
}
.level-badge.lv1 img {
    filter: brightness(0) saturate(100%) hue-rotate(-20deg) brightness(1);
}
.level-badge.lv2 img {
    filter: brightness(0) saturate(100%) hue-rotate(0deg) brightness(1.1);
}
.level-badge.lv3 img {
    filter: brightness(0) saturate(100%) hue-rotate(20deg) brightness(1);
}
.level-badge.lv4 img {
    filter: brightness(0) saturate(100%) hue-rotate(120deg) brightness(1);
}
.level-badge.lv5 img {
    filter: brightness(0) saturate(100%) hue-rotate(200deg) brightness(1);
}
.level-badge.lv6 img {
    filter: brightness(0) saturate(100%) hue-rotate(280deg) brightness(1);
}

.author-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0.9 !important;
    visibility: visible !important;
    transition: all 0.2s ease !important;
    cursor: default !important;
}

.author-badge:hover {
    opacity: 1 !important;
    transform: scale(1.15) !important;
}

.author-badge img {
    filter: sepia(0.3) hue-rotate(-15deg) saturate(1.8) brightness(1.1);
}

.comment-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0.9 !important;
    visibility: visible !important;
    transition: all 0.2s ease !important;
    cursor: default !important;
}

.comment-badge:hover {
    opacity: 1 !important;
    transform: scale(1.15) !important;
}

.comment-browser-icon img {
    filter: brightness(0) saturate(100%) hue-rotate(230deg) brightness(1);
}

.comment-os-icon img {
    filter: brightness(0) saturate(100%) hue-rotate(130deg) brightness(1);
}

.level-badge img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: filter 0.2s ease;
}

.level-badge:hover img {
    filter: drop-shadow(0 0 6px rgba(255, 200, 0, 0.6)) !important;
}

.author-badge img {
    width: 15px !important;
    height: 15px !important;
    object-fit: contain !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: filter 0.2s ease;
    filter: brightness(0) saturate(100%) hue-rotate(-15deg) brightness(1);
}

.author-badge:hover img {
    filter: drop-shadow(0 0 6px rgba(255, 100, 50, 0.6)) brightness(0) saturate(100%) hue-rotate(-15deg) brightness(1) !important;
}

.comment-badge img {
    width: 15px !important;
    height: 15px !important;
    object-fit: contain !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: filter 0.2s ease;
}

.comment-badge:hover img {
    filter: drop-shadow(0 0 5px rgba(100, 150, 255, 0.5)) !important;
}

[data-tip] {
    position: relative;
    cursor: pointer;
}

.global-tip {
    position: fixed;
    padding: 7px 14px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    pointer-events: none;
    transform: scale(0.9);
}

.global-tip.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}



.comment-author {
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
}

.comment-author-link {
    font-size: 13px;
    font-weight: 600;
    color: #e55555;
    text-decoration: none;
    cursor: pointer;
}

.comment-author-link:hover {
    opacity: 0.8;
}

.comment-item.current-user .comment-author-name {
    color: #e55555;
}

.comment-item.current-user .comment-author {
    color: white;
}

.comment-reply-btn {
    font-size: 12px;
    color: #999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid #ddd;
    pointer-events: none;
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    line-height: 1.2;
}

.comment-item:hover .comment-reply-btn {
    opacity: 1;
    pointer-events: auto;
    color: #e55555;
    border-color: #e55555;
    background: rgba(229, 85, 85, 0.05);
}

.comment-time {
    font-size: 11px;
    color: #bbb;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-left: auto;
}

.comment-item:hover .comment-time {
    opacity: 1;
}

.comment-item.current-user .comment-time {
    color: rgba(229, 85, 85, 0.7);
}

.comment-content-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.comment-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 14px 18px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex: 1;
    min-width: 0;
}

.comment-content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-radius: inherit;
    pointer-events: none;
}

.comment-item:hover .comment-content-wrapper {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.comment-item.current-user .comment-content-wrapper {
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
    border-radius: 16px 16px 4px 16px;
    border: none;
}

.comment-item.current-user .comment-content-wrapper::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.comment-item:not(.current-user) .comment-content-wrapper {
    border-radius: 16px;
}

.comment-item.current-user .comment-content-row {
    flex-direction: row-reverse;
}

.comment-item.current-user .comment-reply-btn {
    display: none;
}

.comment-text {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    position: relative;
    z-index: 1;
    word-wrap: break-word;
    word-break: break-word;
}

.comment-text a,
.comment-text a:link,
.comment-text a:visited,
.comment-text a:hover,
.comment-text a:active {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.1);
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
}

.comment-text a:hover {
    background: rgba(102, 126, 234, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.comment-item.current-user .comment-text a,
.comment-item.current-user .comment-text a:link,
.comment-item.current-user .comment-text a:visited {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

.comment-item.current-user .comment-text a:hover {
    background: rgba(255, 215, 0, 0.3);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.comment-item.current-user .comment-text {
    color: white;
}

.comment-text a.comment-mention,
.comment-text a.comment-mention:link,
.comment-text a.comment-mention:visited,
.comment-text a.comment-mention:hover,
.comment-text a.comment-mention:active {
    color: #667eea;
    text-decoration: none !important;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transition: all 0.2s ease;
    display: inline-block;
}

.comment-text a.comment-mention:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25) 0%, rgba(118, 75, 162, 0.25) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.comment-text a.comment-link,
.comment-text a.comment-link:link,
.comment-text a.comment-link:visited {
    /* display: inline-flex !important; */
    align-items: center !important;
    gap: 5px !important;
    color: #4facfe !important;
    font-weight: 500 !important;
    /* padding: 4px 6px;
    border-radius: 4px !important; */
    background: rgba(79, 172, 254, 0.15) !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.2s ease !important;
}

.comment-text a.comment-link:hover {
    color: #00f2fe !important;
    background: rgba(79, 172, 254, 0.25) !important;
    text-decoration: none !important;
}

.comment-text a.comment-link i {
    font-size: 12px !important;
}

.comment-item.current-user .comment-text a.comment-mention,
.comment-item.current-user .comment-text a.comment-mention:link,
.comment-item.current-user .comment-text a.comment-mention:visited,
.comment-item.current-user .comment-text a.comment-mention:hover,
.comment-item.current-user .comment-text a.comment-mention:active {
    color: #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 183, 0, 0.15) 100%);
}

.comment-item.current-user .comment-text a.comment-mention:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3) 0%, rgba(255, 183, 0, 0.3) 100%);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.comment-replies {
    margin-left: 48px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: calc(100% - 48px);
}

.comment-item.current-user .comment-replies {
    margin-left: 0;
    margin-right: 48px;
    margin-top: 10px;
    align-items: flex-end;
    width: calc(100% - 48px);
}

.comment-reply-input {
    display: none;
    margin-top: 10px;
    width: 100%;
}

.comment-reply-input.show {
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-reply-input input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    outline: none;
}

.comment-reply-input button {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.comment-reply-input button:hover {
    transform: scale(1.05);
}

.comment-item.current-user .comment-text {
    color: white;
}

.comment-text a.comment-mention {
    color: #e55555;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.comment-text a.comment-mention:hover {
    text-decoration: underline;
}

.comment-item.highlight {
    background: rgba(229, 85, 85, 0.1);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #667eea;
}

.loading-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 14px;
    color: #999;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
}

.tips-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(229, 85, 85, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tips-toast.error {
    background: rgba(229, 85, 85, 0.9);
}

.tips-toast.success {
    background: rgba(76, 175, 80, 0.9);
}

.hidden {
    display: none !important;
}

#chat-header.hidden,
#chat-input-area.hidden,
#smilies-panel.hidden,
#guest-info.hidden,
#guest-info-display.hidden {
    display: none;
}

#guest-info-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guest-info-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    font-size: 16px;
}

.guest-info-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

#guest-info-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    font-size: 14px;
}

#guest-author-display {
    font-weight: 600;
    color: #333;
}

#smilies-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.smilies-content {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.add-smily {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.add-smily:hover {
    background: rgba(0, 0, 0, 0.08);
}

.smilies-btn.active {
    color: #e55555;
}

#guest-info {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#guest-info input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    outline: none;
    transition: background 0.2s;
}

#guest-info input:focus {
    background: white;
}

#guest-info input::placeholder {
    color: #999;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 6px;
}

#chat-input-area {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    bottom: 0;
    z-index: 10;
    border-radius: 0 0 10px 0;
}

#input-tools {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    background: rgba(255, 255, 255, 0.6);
}

.tool-icon:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

#input-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

#message-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 150px;
    overflow: hidden;
    transition: background 0.2s;
}

#message-input:focus {
    background: white;
}

#send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

#send-btn:hover {
    transform: scale(1.05);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 0;
    }
    #page-container {
        flex-direction: column;
        height: 100vh;
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    #header {
        padding: 10px 15px;
        flex-shrink: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, rgba(255, 236, 210, 0.98) 0%, rgba(252, 182, 159, 0.98) 100%);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 100;
        border-bottom: 1px solid rgba(229, 85, 85, 0.1);
    }
    #username {
        font-size: 14px;
    }
    #avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    #content-area {
        flex-direction: column;
        padding: 0;
        flex: 1;
        overflow: hidden;
    }
    #nav-menu {
        width: 100%;
        flex-direction: row;
        padding: 8px 0;
        justify-content: space-around;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 0;
        flex-shrink: 0;
        position: fixed;
        top: 62px;
        left: 0;
        right: 0;
        background: transparent;
        z-index: 99;
    }
    .nav-item {
        height: 40px;
        font-size: 18px;
    }
    #chat-list-container {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        max-height: 35vh;
        border-radius: 0;
        flex-shrink: 0;
        margin-top: 114px;
    }
    #search-container {
        padding: 8px 12px;
    }
    #search-box {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }
    .chat-item {
        padding: 10px 12px;
    }
    .chat-avatar {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    .chat-name {
        font-size: 13px;
    }
    .chat-preview {
        font-size: 12px;
    }
    #main-content {
        flex: 1;
        border-radius: 0;
        min-height: 0;
        padding-top: 114px;
    }
    #chat-header {
        padding: 10px 15px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.25);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }
    #chat-avatar-main {
        width: 36px;
        height: 36px;
    }
    #chat-name-main {
        font-size: 14px;
    }
    #chat-messages {
        padding: 15px;
        padding-bottom: 120px;
    }
    .message {
        max-width: 90%;
    }
    .message-text {
        padding: 10px 14px;
        font-size: 13px;
    }
    .message-text.article-content {
        padding: 15px;
        font-size: 14px;
    }
    .message-text.article-content h2 {
        font-size: 18px;
    }
    .message-text.article-content h3 {
        font-size: 16px;
    }
    #comments-section {
        padding-top: 15px;
    }
    .comment-item {
        max-width: 90%;
    }
    #chat-input-area {
        padding: 10px;
        flex-shrink: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.25);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        z-index: 100;
    }
    #input-tools {
        gap: 8px;
        flex-wrap: wrap;
    }
    .tool-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .guest-info-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    #guest-info-toggle-wrapper {
        gap: 8px;
    }
    #guest-info-display {
        padding: 4px 10px;
        font-size: 12px;
    }
    #guest-info {
        flex-direction: column;
        gap: 8px;
    }
    #guest-info input {
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
    }
    #message-input {
        padding: 10px 15px;
        font-size: 13px;
    }
    #send-btn {
        width: 38px;
        height: 38px;
    }
    #smilies-panel {
        max-height: 150px;
    }
    .add-smily {
        width: 28px;
        height: 28px;
    }
}

/* 文章摘要列表样式 */
.article-summary .message-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.article-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.article-info {
    flex: 1;
    min-width: 0;
}

.article-excerpt {
    font-size: 13px;
    color: #888;
    margin-top: 5px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-summary .message-text a {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-summary .message-text a:hover {
    color: #667eea;
}

.sticky-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px 20px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pagination .page-numbers:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, #e55555 0%, #ff8e53 100%);
    color: white;
    cursor: default;
    box-shadow: 0 4px 15px rgba(229, 85, 85, 0.3);
}

.pagination .page-numbers.dots {
    background: transparent;
    box-shadow: none;
    padding: 8px 5px;
}

.pagination .page-numbers.dots:hover {
    transform: none;
    color: #666;
}

/* 文章摘要列表响应式样式 */
@media (max-width: 768px) {
    .article-summary .message-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .article-excerpt {
        -webkit-line-clamp: 3;
    }
    
    .pagination {
        flex-wrap: wrap;
        padding: 20px 10px;
    }
    
    .pagination .page-numbers {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 模态框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* 二维码模态框样式 */
.qrcode-modal-content {
    text-align: center;
}

.qrcode-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.qrcode-container img {
    width: 100%;
    height: 100%;
}

.qrcode-url {
    font-size: 13px;
    color: #666;
    word-break: break-all;
    margin-bottom: 15px;
}

.qrcode-tip {
    font-size: 12px;
    color: #999;
}

/* =========================================================

/* =========================================================
   归档 / 分类 / 标签页面样式（文章列表卡片）
   ========================================================= */

/* ---------- 页面元信息条（总数、描述） ---------- */
.posts-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    flex-wrap: wrap;
}

.posts-count {
    font-size: 13px;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.posts-desc {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    flex: 1;
    min-width: 120px;
}

/* ---------- 文章卡片 ---------- */
.article-summary {
    align-self: stretch !important;
    max-width: 100% !important;
    margin-bottom: 10px !important;
}

.article-summary .message-content {
    display: flex;
    gap: 16px;
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    align-items: flex-start;
}

.article-summary .message-content:hover {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.15);
}

/* 缩略图 */
.article-thumbnail {
    width: 120px;
    min-height: 88px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.article-summary .message-content:hover .article-thumbnail img {
    transform: scale(1.1);
}

/* 文章信息区 */
.article-summary .message-content .article-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 元信息条 */
.article-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.article-date {
    font-size: 12px;
    color: #999;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-date i {
    font-size: 11px;
}

/* 置顶 */
.sticky-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #b8860b;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 183, 0, 0.12));
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(255, 183, 0, 0.15);
}

/* 分类标签 */
.article-categories {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.article-cat-link {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    text-decoration: none;
    transition: all 0.2s;
}

.article-cat-link:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #5a6fd6;
}

/* 文章标题 */
.article-summary .message-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.article-summary .message-text a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.article-summary .message-content:hover .message-text a {
    color: #667eea;
}

/* 摘要 */
.article-excerpt {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 标签链接 */
.article-tags {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
}

.article-tags i {
    font-size: 10px;
    margin-right: 2px;
}

.article-tags a {
    color: #667eea;
    text-decoration: none;
    margin-right: 2px;
    transition: color 0.2s;
}

.article-tags a:hover {
    color: #e55555;
}

/* 阅读全文 */
.article-read-more {
    font-size: 12px;
    color: #667eea;
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-weight: 500;
}

.article-summary .message-content:hover .article-read-more {
    gap: 8px;
    color: #e55555;
}

/* 消息时间（底栏） */
.article-summary .message-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

/* ---------- 分页导航 ---------- */
.pagination {
    display: flex;
    justify-content: center;
    padding: 24px 0 8px;
}

.pagination .nav-links,
.pagination .page-numbers {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.pagination .page-numbers li {
    display: inline-flex;
}

.pagination a,
.pagination span.current,
.pagination span.dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 14px;
    text-decoration: none;
    color: #666;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pagination a:hover {
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 600;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.pagination .prev,
.pagination .next {
    font-size: 13px;
    gap: 4px;
}

.pagination .prev:hover,
.pagination .next:hover {
    background: rgba(229, 85, 85, 0.1);
    color: #e55555;
}

/* ---------- 标签云 ---------- */
.tags-header {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-header::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    flex-shrink: 0;
}

.tags-list-wrapper {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 18px 22px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}



/* ---------- 返回按钮 ---------- */
.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
}

/* ---------- 瀑布流网格 ---------- */

/* ---------- 横向换行网格 ---------- */
.posts-masonry {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.posts-masonry > .article-summary {
    width: calc(33.33% - 11px);
    display: flex;
    flex-direction: column;
    margin-bottom: 0 !important;
    align-self: stretch !important;
    max-width: none !important;
}

/* 文章卡片纵排 — masonry 布局 */
.posts-masonry .article-summary .message-content {
    flex-direction: column;
    padding: 0;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.posts-masonry .article-summary .article-thumbnail {
    width: 100%;
    height: 160px;
    min-height: 160px;
    border-radius: 0;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.posts-masonry .article-summary .article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posts-masonry .article-summary .message-content .article-info {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.posts-masonry .article-summary .message-content:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.posts-masonry .article-summary .message-time {
    margin-top: auto;
}

/* 网格响应式 */
@media (max-width: 1200px) {
    .posts-masonry > .article-summary {
        width: calc(50% - 8px);
    }
}
@media (max-width: 768px) {
    .posts-masonry > .article-summary {
        width: 100%;
    }
    .posts-masonry .article-summary .article-thumbnail {
        height: 200px;
        min-height: 200px;
    }
}


/* ---------- 标签卡片网格（按热度排列） ---------- */
.tag-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0;
}

.tag-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    cursor: pointer;
    min-width: 0;
}

.tag-card:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tag-card-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.tag-card-count {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.25);
    padding: 1px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* 响应式：小屏标签更紧凑 */
@media (max-width: 480px) {
    .tag-card {
        padding: 8px 12px;
        font-size: 13px;
    }
    .tag-card-name {
        max-width: 80px;
    }
}

/* ---------- 分类卡片网格 ---------- */
.category-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.category-card {
    width: calc(33.33% - 11px);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.10);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.category-card-body {
    flex: 1;
    padding: 20px 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 16px;
    flex-shrink: 0;
}

.category-card-name {
    font-size: 17px;
    font-weight: 600;
}

.category-card-desc {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card-desc-empty {
    opacity: 0.45;
    font-style: italic;
}

.category-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.10);
    -webkit-backdrop-filter: blur(4px);
}

.category-card-count {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}

.category-card-link {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.85;
    transition: all 0.2s;
}

.category-card:hover .category-card-link {
    gap: 8px;
    opacity: 1;
}

/* 响应式 */
@media (max-width: 1200px) {
    .category-card {
        width: calc(50% - 8px);
    }
}
@media (max-width: 768px) {
    .category-card {
        width: 100%;
    }
}

/* ========== QR 码弹窗 ========== */
#qrcode-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#qrcode-modal.active {
    display: flex;
}

#qrcode-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

#qrcode-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    min-width: 240px;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: qrcodeFadeIn 0.25s ease;
    text-align: center;
}

@keyframes qrcodeFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#qrcode-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

#qrcode-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

#qrcode-modal-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
}

#qrcode-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

#qrcode-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

#qrcode-container canvas,
#qrcode-container img {
    display: block;
    margin: 0 auto;
}

#qrcode-url-text {
    margin-top: 12px;
    font-size: 11px;
    color: #999;
    word-break: break-all;
    line-height: 1.4;
}

/* 移动端适配 */
@media (max-width: 480px) {
    #qrcode-modal-content {
        min-width: 200px;
        max-width: 85vw;
        padding: 20px;
    }
}

/* 代码块样式 - 纯 CSS 方案 */
pre {
    background: linear-gradient(135deg, #1e1e2e 0%, #181825 100%);
    color: #cdd6f4;
    padding: 25px 10px 10px 10px;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 20px 0;
    border: 1px solid #313244;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

pre::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f38ba8;
    box-shadow: 16px 0 0 #f9e2af, 32px 0 0 #a6e3a1;
}

pre::after {
    content: attr(data-lang);
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 10px;
    color: #6c7086;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================
   不同语言的代码块配色主题
   ================================ */

/* JavaScript / TypeScript - 温暖黄色系 */
pre[data-lang="JavaScript"] {
    border-left: 3px solid #f9e2af;
}
pre[data-lang="JavaScript"]::after,
pre[data-lang="TypeScript"]::after {
    color: #f9e2af;
}

/* Python - 清新绿色系 */
pre[data-lang="Python"] {
    border-left: 3px solid #a6e3a1;
}
pre[data-lang="Python"]::after {
    color: #a6e3a1;
}

/* PHP - 紫蓝色系 */
pre[data-lang="PHP"] {
    border-left: 3px solid #cba6f7;
}
pre[data-lang="PHP"]::after {
    color: #cba6f7;
}

/* HTML - 橙红色系 */
pre[data-lang="HTML"] {
    border-left: 3px solid #fab387;
}
pre[data-lang="HTML"]::after {
    color: #fab387;
}

/* CSS - 粉蓝色系 */
pre[data-lang="CSS"] {
    border-left: 3px solid #89dceb;
}
pre[data-lang="CSS"]::after {
    color: #89dceb;
}

/* SQL / Database - 蓝色系 */
pre[data-lang="SQL"] {
    border-left: 3px solid #89b4fa;
}
pre[data-lang="SQL"]::after {
    color: #89b4fa;
}

/* Bash / Shell - 绿色系 */
pre[data-lang="Bash"],
pre[data-lang="Shell"] {
    border-left: 3px solid #a6e3a1;
}
pre[data-lang="Bash"]::after,
pre[data-lang="Shell"]::after {
    color: #a6e3a1;
}

/* Ruby - 红色系 */
pre[data-lang="Ruby"] {
    border-left: 3px solid #f38ba8;
}
pre[data-lang="Ruby"]::after {
    color: #f38ba8;
}

/* Go - 青色系 */
pre[data-lang="Go"] {
    border-left: 3px solid #94e2d5;
}
pre[data-lang="Go"]::after {
    color: #94e2d5;
}

/* Rust - 橙色系 */
pre[data-lang="Rust"] {
    border-left: 3px solid #fab387;
}
pre[data-lang="Rust"]::after {
    color: #fab387;
}

/* Java / C / C++ / C# - 蓝色系 */
pre[data-lang="Java"],
pre[data-lang="C"],
pre[data-lang="C++"],
pre[data-lang="C#"] {
    border-left: 3px solid #89b4fa;
}
pre[data-lang="Java"]::after,
pre[data-lang="C"]::after,
pre[data-lang="C++"]::after,
pre[data-lang="C#"]::after {
    color: #89b4fa;
}

/* Swift / Kotlin - 紫色系 */
pre[data-lang="Swift"],
pre[data-lang="Kotlin"] {
    border-left: 3px solid #cba6f7;
}
pre[data-lang="Swift"]::after,
pre[data-lang="Kotlin"]::after {
    color: #cba6f7;
}

/* JSON / YAML - 粉红色系 */
pre[data-lang="JSON"],
pre[data-lang="YAML"] {
    border-left: 3px solid #f5c2e7;
}
pre[data-lang="JSON"]::after,
pre[data-lang="YAML"]::after {
    color: #f5c2e7;
}

/* Markdown - 蓝灰色系 */
pre[data-lang="Markdown"] {
    border-left: 3px solid #89dceb;
}
pre[data-lang="Markdown"]::after {
    color: #89dceb;
}

code {
    background: rgba(139, 92, 246, 0.15);
    color: #cba6f7;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Consolas', monospace;
    font-size: 13px;
    font-weight: 500;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-weight: normal;
}

/* 文章内容容器 */
.article-content {
    overflow-x: hidden;
    word-wrap: break-word;
    max-width: 100%;
}

.article-content pre {
    overflow-x: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* 代码块滚动条样式 */
pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
