/* ============================================
   文章列表页 - 公开展示，无需登录
   ============================================ */

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

/* 网格背景 */
.page-articles-index .bg-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.page-articles-index .mesh-gradient {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: meshFloat 18s ease-in-out infinite;
}
.page-articles-index .mesh-1 {
    width: 540px; height: 540px;
    background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
    top: -180px; right: -120px;
}
.page-articles-index .mesh-2 {
    width: 460px; height: 460px;
    background: radial-gradient(circle, #60a5fa 0%, transparent 70%);
    bottom: -160px; left: -100px;
    animation-delay: -6s;
}
.page-articles-index .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); }
}

.ai-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.04s);
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Hero ========== */
.ai-hero {
    position: relative;
    border-radius: 22px;
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 45%, #c026d3 100%);
    color: #fff;
    padding: 28px 32px 24px;
    margin-bottom: 24px;
    box-shadow: 0 18px 40px -18px rgba(124, 58, 237, 0.5);
    overflow: hidden;
}
.ai-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.ai-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.35), transparent 70%);
    filter: blur(40px);
    animation: orbFloat 14s ease-in-out infinite;
}
.ai-orb-1 { width: 220px; height: 220px; top: -60px; right: -40px; }
.ai-orb-2 { width: 160px; height: 160px; bottom: -50px; left: 30%; animation-delay: -5s; }
.ai-orb-3 { width: 120px; height: 120px; top: 30%; left: -40px; animation-delay: -9s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(20px, -25px); }
}

.ai-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.ai-hero-info {
    flex: 1;
    min-width: 260px;
}
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}
.ai-hero-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: 0.5px;
}
.ai-hero-title .title-accent {
    background: linear-gradient(90deg, #fde68a, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-left: 6px;
}
.ai-hero-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
}

.ai-hero-stats {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 12px 16px;
    gap: 6px;
    flex-shrink: 0;
}
.ahs-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}
.ahs-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.ahs-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2px;
    font-weight: 500;
}
.ahs-value {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.ahs-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.25);
}

/* ========== 搜索栏 ========== */
.ai-search-bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    padding: 4px 4px 4px 16px;
    gap: 8px;
}
.ai-search-icon {
    font-size: 14px;
    opacity: 0.85;
}
.ai-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 0;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
}
.ai-search-input::placeholder { color: rgba(255, 255, 255, 0.65); font-weight: 400; }
.ai-search-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #78350f;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
    font-family: inherit;
}
.ai-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
}

/* ========== Section Head ========== */
.ai-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 14px;
    padding: 0 4px;
}
.ai-section-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ai-section-kicker {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: #6366f1;
    text-transform: uppercase;
}
.ai-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-section-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a78bfa);
    border-radius: 2px;
    margin-top: 6px;
}
.ai-section-sub {
    font-size: 14px;
    font-weight: 500;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    padding: 2px 10px;
    border-radius: 6px;
}
.ai-section-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-tools-tip {
    font-size: 13px;
    color: #64748b;
    background: rgba(99, 102, 241, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-weight: 500;
}

/* ========== 分类筛选 ========== */
.ai-cat-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px -8px rgba(99, 102, 241, 0.1);
}
.ai-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: #f8fafc;
    border-radius: 999px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}
.ai-cat-chip:hover {
    border-color: #a5b4fc;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.04);
    transform: translateY(-1px);
}
.ai-cat-chip.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.ai-cat-emoji {
    font-size: 14px;
}
.cat-count {
    background: rgba(255, 255, 255, 0.6);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
    color: #64748b;
}
.ai-cat-chip.active .cat-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* ========== 文章卡片网格 ========== */
.ai-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ai-card {
    position: relative;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow: 0 4px 14px -4px rgba(99, 102, 241, 0.08);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ai-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -10px rgba(99, 102, 241, 0.18);
    border-color: rgba(165, 180, 252, 0.6);
    background: rgba(255, 255, 255, 0.95);
}

.ai-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    min-height: 28px;
}
.ai-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}
.ai-cat span { font-size: 13px; }
.cat-tutorial { background: #dbeafe; color: #1d4ed8; }
.cat-faq      { background: #fef3c7; color: #b45309; }
.cat-promo    { background: #fee2e2; color: #b91c1c; }
.cat-default  { background: #f1f5f9; color: #475569; }

.ai-hot {
    background: linear-gradient(135deg, #fb7185, #f43f5e);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
}

.ai-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
}
.ai-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.ai-card-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    font-size: 11px;
    color: #94a3b8;
    flex-wrap: wrap;
    font-weight: 500;
}
.ai-meta { white-space: nowrap; }
.ai-views {
    margin-left: auto;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}
.ai-card-arrow {
    position: absolute;
    bottom: 14px;
    right: 18px;
    font-size: 18px;
    color: #c7d2fe;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
}
.ai-card:hover .ai-card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: #6366f1;
}

/* ========== 空状态 ========== */
.ai-empty {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    padding: 60px 20px;
    text-align: center;
    color: #94a3b8;
    box-shadow: 0 4px 14px -4px rgba(99, 102, 241, 0.08);
}
.ai-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.55;
}
.ai-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}
.ai-empty-desc {
    font-size: 13px;
    color: #94a3b8;
}

/* ========== 分页 ========== */
.ai-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.page-btn, .page-num, .page-dots {
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}
.page-btn:hover, .page-num:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.06);
    transform: translateY(-1px);
}
.page-current {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}
.page-disabled {
    color: #cbd5e1 !important;
    background: #f8fafc !important;
    border-color: #f1f5f9 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}
.page-dots {
    border: none;
    background: transparent;
    cursor: default;
    color: #94a3b8;
}

/* 跳转 */
.page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}
.page-jump input {
    width: 52px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 6px;
    font-size: 13px;
    color: #374151;
    text-align: center;
    background: #fff;
    outline: none;
    transition: all 0.2s ease;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.page-jump input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.page-jump button {
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}
.page-jump button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.page-info {
    margin-left: 12px;
    padding-left: 14px;
    border-left: 1px solid #e5e7eb;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

/* ========== Trust Section ========== */
.ai-trust-section {
    background: rgba(255, 255, 255, 0.85);
    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);
}
.ai-trust-head {
    text-align: center;
    margin-bottom: 22px;
}
.ai-trust-kicker {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    color: #6366f1;
    margin-bottom: 6px;
}
.ai-trust-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}
.ai-trust-sub {
    font-size: 13px;
    color: #64748b;
}
.ai-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.ai-trust-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.25s ease;
}
.ai-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);
}
.ai-trust-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.ai-trust-icon.blue  { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.ai-trust-icon.amber { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.ai-trust-icon.coral { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.ai-trust-icon.green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.ai-trust-text {
    flex: 1;
    min-width: 0;
}
.ai-trust-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 4px;
}
.ai-trust-text p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
    .ai-content { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .ai-trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .ai-wrap { padding: 80px 14px 30px; }
    .ai-hero { padding: 22px 20px 18px; border-radius: 20px; }
    .ai-hero-title { font-size: 22px; }
    .ai-hero-content { flex-direction: column; align-items: flex-start; }
    .ai-content { grid-template-columns: 1fr; }
    .ai-cat-bar { gap: 6px; padding: 10px; }
    .ai-cat-chip { padding: 7px 12px; font-size: 12px; }
    .ai-pagination { padding: 10px 12px; gap: 4px; }
    .page-btn, .page-num, .page-dots { min-width: 34px; height: 34px; padding: 0 10px; font-size: 13px; }
    .page-jump { margin-left: 8px; padding-left: 10px; font-size: 12px; gap: 4px; }
    .page-jump input { width: 42px; height: 28px; font-size: 12px; }
    .page-jump button { height: 28px; padding: 0 10px; }
    .page-info { display: none; }
    .ai-section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .ai-trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .ai-pagination .page-dots { display: none; }
    .page-jump { width: 100%; justify-content: center; margin: 8px 0 0; padding: 8px 0 0; border-left: none; border-top: 1px solid #e5e7eb; }
}