/* ==================== 💎 CSS 设计系统 (Design System) ==================== */

:root {
    /* 核心色彩预设 - HSL 精调调色盘 */
    --primary-h: 262;
    --primary-s: 83%;
    --primary-l: 58%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-hover: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 8%));
    --primary-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.35);

    --accent: #ff7b00;
    --success: #10b981;
    --error: #ef4444;

    /* 浅色模式变量 */
    --bg-mesh-1: hsla(280, 80%, 95%, 1);
    --bg-mesh-2: hsla(240, 80%, 95%, 1);
    --bg-mesh-3: hsla(340, 85%, 96%, 1);
    --text-primary: #1e1b4b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-card-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-blur: 24px;
    --input-bg: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.06), 0 4px 12px 0 rgba(0, 0, 0, 0.02);
    --header-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    --header-bg: rgba(255, 255, 255, 0.6);

    --border-radius-sm: 12px;
    --border-radius-md: 20px;
    --border-radius-lg: 28px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 暗黑模式变量 */
.dark-mode {
    --bg-mesh-1: hsla(280, 50%, 10%, 1);
    --bg-mesh-2: hsla(240, 50%, 8%, 1);
    --bg-mesh-3: hsla(320, 60%, 10%, 1);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --glass-bg: rgba(15, 23, 42, 0.45);
    --glass-card-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: 30px;
    --input-bg: rgba(15, 23, 42, 0.8);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --header-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    --header-bg: rgba(15, 23, 42, 0.65);
}

/* ==================== 📱 基础与移动端适配 ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-mesh-2);
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background-color 0.5s ease, color 0.3s ease;
}

html {
    height: -webkit-fill-available;
}

/* 弥散背景 (Mesh Gradient Background) */
.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background: linear-gradient(135deg, var(--bg-mesh-1) 0%, var(--bg-mesh-2) 50%, var(--bg-mesh-3) 100%);
    background-size: 200% 200%;
    animation: gradientFlow 15s ease infinite;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== 🛠️ 通用排版与组件 ==================== */

.view-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* 允许iOS物理回弹 */
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.96);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    padding-bottom: env(safe-area-inset-bottom);
}

.view-container.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    z-index: 10;
}

.glass-card {
    background: var(--glass-card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--card-shadow);
    padding: 24px;
    width: 100%;
    transition: var(--transition-smooth);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    padding: 16px 24px;
    width: 100%;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

.icon-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.icon-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== 🔑 1. 核销验证页样式 ==================== */

#verification-view {
    justify-content: flex-start;
    align-items: center;
    padding: 40px 20px;
    overflow-y: auto;
}

.glass-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 420px;
    margin: auto 0;
}

.brand-header {
    text-align: center;
    margin-bottom: 8px;
}

.brand-icon {
    width: 68px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: #ffffff;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px auto;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.3);
}

.brand-logo-img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    margin: 0 auto 16px auto;
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.22);
    border: 2.5px solid rgba(255, 255, 255, 0.6);
    display: block;
    transition: var(--transition-smooth);
}

.brand-logo-img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.35);
}

.dark-mode .brand-logo-img {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.brand-header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tagline {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 6px;
    padding: 0 10px;
}

.brand-sub-tagline {
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--primary-glow);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    margin-top: 4px;
}

.auth-card .card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-card .card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--glass-border);
    color: var(--text-primary);
    padding: 16px 20px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--border-radius-sm);
    outline: none;
    transition: var(--transition-smooth);
}

.input-group input:focus {
    border-color: var(--primary);
    background: var(--glass-card-bg);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.error-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.hide {
    display: none !important;
}

/* 联系卡片 */
.contact-card {
    padding: 20px;
}

.contact-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 16px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    gap: 12px;
}

.contact-item i {
    font-size: 20px;
    color: var(--primary);
}

.contact-item .contact-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.contact-item .label {
    font-size: 10.5px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
}

.contact-item .value {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.select-text {
    user-select: all;
    -webkit-user-select: all;
}

.btn-copy {
    background: var(--primary-glow);
    border: none;
    color: var(--primary);
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-copy:active {
    transform: scale(0.94);
}

.qr-container {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.qr-placeholder {
    width: 100%;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.qr-placeholder i {
    font-size: 40px;
    color: var(--text-muted);
}

/* ==================== 📦 2. 知识库主页样式 ==================== */

#app-view {
    background-color: var(--bg-mesh-2);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--header-shadow);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: calc(14px + env(safe-area-inset-top)); /* 适配iOS刘海 */
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-primary);
}

.header-logo i {
    color: var(--primary);
    font-size: 20px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.app-main {
    flex-grow: 1;
    padding: 24px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.welcome-quote {
    font-size: 13.5px;
    color: var(--text-secondary);
    font-style: italic;
    border-left: 3.5px solid var(--primary);
    padding-left: 10px;
}

.search-filter-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar input {
    width: 100%;
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 14px 16px 14px 44px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

/* 横向滚动分类 */
.category-tabs-container {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
    margin: 0 -20px;
    padding: 4px 20px;
}

.category-tabs-container::-webkit-scrollbar {
    display: none; /* Webkit 隐藏滚动条 */
}

.category-tabs {
    display: flex;
    gap: 8px;
    width: max-content;
}

.tab-btn {
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 8px 18px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-btn:active {
    transform: scale(0.95);
}

/* 文章列表 */
.article-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
}

.article-card:active {
    transform: scale(0.975);
    background: var(--glass-bg);
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.article-badge {
    background: var(--primary-glow);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}

.article-date {
    font-size: 11.5px;
    color: var(--text-muted);
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.card-title-row h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.card-title-row i {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition-smooth);
}

.article-card:hover .card-title-row i {
    transform: translateX(4px);
    color: var(--primary);
}

.card-summary {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11.5px;
    color: var(--text-muted);
    border-top: 1px dashed var(--glass-border);
    padding-top: 10px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    gap: 12px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 14px;
}

/* ==================== 📖 3. 全屏文章阅读器 ==================== */

#reader-view {
    background: var(--bg-mesh-2);
}

.reader-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: calc(12px + env(safe-area-inset-top));
}

.back-btn {
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    padding: 6px 12px 6px 0;
}

.back-btn:active {
    opacity: 0.7;
}

.reader-header-actions {
    display: flex;
    gap: 8px;
}

.text-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13.5px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.text-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.reader-main {
    flex-grow: 1;
    padding: 24px 20px 60px 20px;
    overflow-y: auto;
    background: var(--glass-bg);
}

.article-detail {
    max-width: 600px;
    margin: 0 auto;
}

.article-detail .article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.article-detail .article-title {
    font-family: 'Noto Serif SC', 'Georgia', serif;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.reader-divider {
    height: 1px;
    background: linear-gradient(to right, var(--primary-glow), transparent);
    margin-bottom: 24px;
}

/* 沉浸式阅读正文排版（核心） */
.article-rich-content {
    font-size: var(--article-font-size, 17px);
    line-height: 1.8;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.article-rich-content h3 {
    font-size: 1.25em;
    font-weight: 700;
    margin: 32px 0 16px 0;
    color: var(--text-primary);
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.article-rich-content p {
    margin-bottom: 20px;
    text-align: justify;
}

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

.article-rich-content li {
    margin-bottom: 8px;
}

.article-rich-content strong {
    color: var(--primary);
    font-weight: 700;
}

.article-rich-content code {
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-border);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.article-rich-content pre {
    background: #1e1e2e;
    color: #cdd6f4;
    padding: 16px;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-rich-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 13.5px;
    color: inherit;
}

.article-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px dashed var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.article-footer .view-count {
    font-size: 13px;
    color: var(--text-muted);
}

.copyright-notice {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* ==================== 💀 4. 加载中骨架屏与 Toast ==================== */

.skeleton-card {
    height: 160px;
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: skeletonShimmer 1.6s infinite;
}

.dark-mode .skeleton-card::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

@keyframes skeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13.5px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    text-align: center;
    white-space: nowrap;
}

.dark-mode .toast {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
}

/* ==================== 🔒 防复制保护 (Anti-Copy Protection) ==================== */
.no-copy {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 🔗 允许链接与特定区域被鼠标框选与高亮 */
.no-copy a,
.no-copy .allow-copy {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* ==================== 💬 答疑专区 & Q&A CSS ==================== */

.section-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* 导航 Tabs */
.main-nav-tabs {
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    padding: 6px;
    display: flex;
    gap: 6px;
    box-shadow: var(--card-shadow);
    width: 100%;
}

.nav-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-tab-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* 提问卡片 */
.qa-form-card {
    padding: 20px;
}

.qa-input-wrapper textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    resize: none;
    transition: var(--transition-smooth);
}

.qa-input-wrapper textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 答疑二级 Tabs */
.qa-sub-tabs {
    display: flex;
    gap: 16px;
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 6px;
    margin-top: 8px;
}

.qa-sub-tab {
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 4px;
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.qa-sub-tab.active {
    color: var(--primary);
}

.qa-sub-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 4px;
}

/* 问答列表与卡片 */
.qa-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qa-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.qa-question-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.qa-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.qa-question-text {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    text-align: justify;
}

.qa-reply-box {
    background: rgba(139, 92, 246, 0.05);
    border-left: 4.5px solid var(--primary);
    border-radius: 0 12px 12px 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 38px;
}

.dark-mode .qa-reply-box {
    background: rgba(139, 92, 246, 0.08);
}

.qa-author-tag {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.qa-reply-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: justify;
}

.qa-unreplied-badge {
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    margin-left: 38px;
}

.qa-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px dashed var(--glass-border);
    padding-top: 8px;
    margin-left: 38px;
}

.qa-badge-private {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.qa-badge-public {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* 二维码展示 */
.qr-box {
    width: 170px;
    height: 170px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: var(--card-shadow);
}

#contact-qr-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ==================== 👁️ 对公众隐藏阅读数 ==================== */
.article-card .views {
    display: none !important;
}
.article-footer .view-count {
    display: none !important;
}

/* ==================== 📝 飞书/Markdown 排版引擎完美适配样式 ==================== */
.article-rich-content h2.sop-heading-2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 28px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.35;
}

.article-rich-content h2.sop-heading-2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #ec4899, #8b5cf6);
    border-radius: 2px;
}

.article-rich-content h3.sop-heading-3 {
    font-size: 17.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
    line-height: 1.35;
}

.article-rich-content p.sop-paragraph {
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 14px;
    text-align: justify;
    word-break: break-all;
}

.article-rich-content .sop-blockquote {
    background: rgba(139, 92, 246, 0.05);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 12px 12px 0;
    padding: 12px 16px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.dark-mode .article-rich-content .sop-blockquote {
    background: rgba(139, 92, 246, 0.09);
}

.article-rich-content .sop-list {
    margin: 10px 0 14px 20px;
    padding: 0;
    list-style-type: none;
}

.article-rich-content .sop-list li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 6px;
    position: relative;
    padding-left: 18px;
}

/* 无序列表小圆点 */
.article-rich-content ul.sop-list li::before {
    content: "•";
    color: #8b5cf6;
    font-size: 18px;
    position: absolute;
    left: 0;
    top: -2px;
}

/* 有序列表计数器 */
.article-rich-content ol.sop-list {
    counter-reset: sop-counter;
}

.article-rich-content ol.sop-list li::before {
    counter-increment: sop-counter;
    content: counter(sop-counter) ".";
    color: #8b5cf6;
    font-weight: 600;
    font-size: 13px;
    position: absolute;
    left: 0;
    top: 0;
}

/* 行内代码与加粗 */
.article-rich-content strong {
    color: var(--text-primary);
    font-weight: 700;
    background: linear-gradient(120deg, rgba(236, 72, 153, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 2px 4px;
    border-radius: 4px;
}

.article-rich-content code.inline-code {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--glass-border);
    color: #ec4899;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12.5px;
    margin: 0 3px;
}

.dark-mode .article-rich-content code.inline-code {
    background: rgba(255, 255, 255, 0.05);
    color: #f472b6;
}

.article-rich-content a.sop-link {
    color: #8b5cf6;
    text-decoration: none;
    border-bottom: 1px dashed #8b5cf6;
    transition: var(--transition-smooth);
}

.article-rich-content a.sop-link:hover {
    color: #ec4899;
    border-bottom-style: solid;
}

