/* ============================================
   文章详情页 - 与列表页配套的现代风格
   ============================================ */

.page-article-view {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #faf5ff 100%);
    color: #1f2937;
    overflow-x: hidden;
}

/* 网格背景 */
.page-article-view .bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.page-article-view .mesh-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: meshFloat 18s ease-in-out infinite;
}
.page-article-view .mesh-1 {
    width: 540px; height: 540px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    top: -180px; right: -120px;
}
.page-article-view .mesh-2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
    bottom: -160px; left: -100px;
    animation-delay: -6s;
}
.page-article-view .mesh-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, #f472b6 0%, transparent 70%);
    top: 45%; left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -12s;
}
@keyframes meshFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(30px, -40px) scale(1.06); }
    66%      { transform: translate(-20px, 30px) scale(0.96); }
}

.av-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    position: relative;
    z-index: 1;
}

/* ========== 入场动画 ========== */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--idx, 0) * 0.06s);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 顶部条 ========== */
.av-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 16px;
    box-shadow: 0 6px 18px -8px rgba(99, 102, 241, 0.1);
    position: sticky;
    top: 8px;
    z-index: 10;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s;
}
.back-link:hover {
    background: rgba(99, 102, 241, 0.06);
    color: #6366f1;
}
.back-icon {
    font-size: 16px;
    transition: transform 0.2s;
}
.back-link:hover .back-icon {
    transform: translateX(-2px);
}
.topbar-title {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.topbar-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}
.meta-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    font-weight: 500;
}
.meta-tag.hot {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #b91c1c;
}
.meta-tag.views {
    background: rgba(148, 163, 184, 0.1);
    color: #475569;
}

/* ========== 主体两列 ========== */
.av-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: flex-start;
}

/* ========== 文章主区 ========== */
.av-article {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 10px 30px -12px rgba(99, 102, 241, 0.12);
}

/* 封面标题区 */
.av-cover {
    position: relative;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 45%, #c026d3 100%);
    padding: 40px 36px;
    overflow: hidden;
    color: #fff;
}
.cover-deco {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
}
.cover-deco.deco-1 {
    width: 280px; height: 280px;
    background: #f472b6;
    top: -100px; right: -80px;
}
.cover-deco.deco-2 {
    width: 200px; height: 200px;
    background: #38bdf8;
    bottom: -80px; left: 10%;
    opacity: 0.35;
}
.cover-deco.deco-3 {
    width: 140px; height: 140px;
    background: #fbbf24;
    top: 30%; right: 30%;
    opacity: 0.2;
}
.cover-content {
    position: relative;
    z-index: 2;
}
.cover-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 14px;
}
.cover-cat span { font-size: 14px; }
.cover-cat.cat-tutorial { background: rgba(96, 165, 250, 0.3); }
.cover-cat.cat-faq      { background: rgba(251, 191, 36, 0.3); }
.cover-cat.cat-promo    { background: rgba(251, 113, 133, 0.3); }
.cover-cat.cat-default  { background: rgba(255, 255, 255, 0.2); }

.cover-title {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
    word-break: break-word;
    letter-spacing: 0.3px;
}
.cover-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}
.cm-item { white-space: nowrap; }
.cm-dot { opacity: 0.5; }

/* 视频区 */
.av-video {
    padding: 24px 36px 0;
}
.block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
}
.block-title .title-icon { font-size: 17px; }
.video-wrap {
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.video-wrap video,
.video-wrap iframe {
    width: 100%;
    display: block;
    border: none;
}
.video-wrap iframe { aspect-ratio: 16 / 9; }

/* 正文 */
.av-content {
    padding: 32px 36px;
}
.content-inner {
    font-size: 15px;
    line-height: 1.85;
    color: #374151;
    word-break: break-word;
}
/* 编辑器常见标签 */
.content-inner h1, .content-inner h2, .content-inner h3, .content-inner h4 {
    color: #0f172a;
    font-weight: 600;
    margin: 24px 0 12px;
    line-height: 1.4;
}
.content-inner h1 { font-size: 22px; }
.content-inner h2 { font-size: 19px; padding-left: 12px; border-left: 4px solid #8b5cf6; }
.content-inner h3 { font-size: 17px; }
.content-inner h4 { font-size: 16px; color: #475569; }
.content-inner p { margin: 0 0 14px; }
.content-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.content-inner a {
    color: #6366f1;
    text-decoration: none;
    border-bottom: 1px dashed #6366f1;
    font-weight: 500;
}
.content-inner a:hover {
    color: #4f46e5;
    border-bottom-style: solid;
}
.content-inner ul, .content-inner ol {
    margin: 12px 0;
    padding-left: 24px;
}
.content-inner li { margin-bottom: 6px; }
.content-inner blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #eef2ff, #f5f3ff);
    border-left: 4px solid #8b5cf6;
    border-radius: 0 10px 10px 0;
    color: #475569;
}
.content-inner code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #ec4899;
    font-family: Consolas, Monaco, monospace;
}
.content-inner pre {
    background: #1f2937;
    color: #f1f5f9;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 14px 0;
    line-height: 1.6;
}
.content-inner pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}
.content-inner table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}
.content-inner th, .content-inner td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.content-inner th {
    background: #f8fafc;
    font-weight: 600;
    color: #0f172a;
}
.content-inner hr {
    border: none;
    border-top: 2px dashed #e2e8f0;
    margin: 24px 0;
}

/* 文章底部 */
.av-footer {
    padding: 20px 36px 28px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.ft-tag {
    font-size: 12px;
    padding: 5px 12px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 999px;
    color: #475569;
    font-weight: 500;
}
.footer-actions {
    display: flex;
    gap: 8px;
}
.fa-btn {
    padding: 8px 18px;
    background: #f1f5f9;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.25s;
}
.fa-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.fa-btn.primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.fa-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

/* ========== 侧边栏 ========== */
.av-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 150px;
}

.sb-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 6px 18px -8px rgba(99, 102, 241, 0.1);
}

/* 作者卡 */
.sb-author {
    position: relative;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 50%, #e0e7ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.7);
}
.author-bg {
    position: absolute;
    width: 200px; height: 200px;
    background: rgba(251, 191, 36, 0.3);
    border-radius: 50%;
    filter: blur(40px);
    top: -80px; right: -50px;
    pointer-events: none;
}
.author-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px 20px 20px;
}
.author-avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
    border: 3px solid rgba(255, 255, 255, 0.6);
}
.author-name {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}
.author-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
}
.author-stats {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px 4px;
}
.as-item {
    flex: 1;
    text-align: center;
}
.as-num {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.as-label {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    font-weight: 500;
}
.as-divider {
    width: 1px;
    height: 28px;
    background: rgba(0, 0, 0, 0.08);
}

/* 标题样式 */
.sb-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}
.sb-title .title-icon { font-size: 16px; }

/* 文章列表 */
.sb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.2s;
}
.sb-item:hover { background: rgba(99, 102, 241, 0.04); }
.sb-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.06));
}
.sb-item.active .sb-link { color: #6366f1; font-weight: 500; }

.sb-rank {
    width: 22px; height: 22px;
    border-radius: 6px;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sb-item:nth-child(1) .sb-rank { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.sb-item:nth-child(2) .sb-rank { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.sb-item:nth-child(3) .sb-rank { background: linear-gradient(135deg, #fb923c, #ea580c); }

.sb-link {
    flex: 1;
    color: #475569;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s;
    font-weight: 500;
}
.sb-link:hover { color: #6366f1; }
.sb-views {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
    font-weight: 500;
}
.sb-empty {
    padding: 20px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}
.sb-more {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.06);
    border-radius: 8px;
    color: #6366f1;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.sb-more:hover {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

/* 提示卡 */
.sb-tip {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.85), rgba(253, 230, 138, 0.65));
    border: 1px solid rgba(251, 191, 36, 0.3);
    text-align: center;
}
.tip-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.tip-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 6px;
}
.tip-desc {
    font-size: 12px;
    color: #b45309;
    line-height: 1.6;
}

/* 行动卡 */
.sb-cta {
    text-align: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: transparent;
}
.cta-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.cta-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cta-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
    line-height: 1.5;
}
.cta-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    color: #6366f1;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -6px rgba(0, 0, 0, 0.2);
}

/* ========== Trust Section ========== */
.av-trust-section {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    padding: 26px 28px;
    margin-top: 24px;
    box-shadow: 0 10px 30px -12px rgba(99, 102, 241, 0.12);
}
.av-trust-head {
    text-align: center;
    margin-bottom: 22px;
}
.av-trust-kicker {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #6366f1;
    margin-bottom: 6px;
}
.av-trust-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}
.av-trust-sub {
    font-size: 13px;
    color: #64748b;
}
.av-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.av-trust-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.25s ease;
}
.av-trust-card:hover {
    background: #fff;
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 0.15);
}
.av-trust-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.av-trust-icon.blue  { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.av-trust-icon.amber { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.av-trust-icon.coral { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.av-trust-icon.green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.av-trust-text {
    flex: 1;
    min-width: 0;
}
.av-trust-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}
.av-trust-text p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .av-trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1000px) {
    .av-main { grid-template-columns: 1fr; }
    .av-sidebar { position: static; }
}
@media (max-width: 768px) {
    .av-wrap { padding: 80px 14px 30px; }
    .av-topbar { padding: 10px 14px; }
    .topbar-title { font-size: 13px; }
    .av-cover { padding: 28px 22px; }
    .cover-title { font-size: 22px; }
    .av-content { padding: 22px 20px; }
    .av-video { padding: 20px 20px 0; }
    .av-footer { padding: 16px 20px 22px; }
    .content-inner { font-size: 14px; }
    .av-trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .av-cover { padding: 22px 16px; }
    .cover-title { font-size: 20px; }
    .av-content { padding: 18px 16px; }
}