/* ============================================================
   VIP知识库 首页样式 - knowledge-base.css
   主色调: 帝王紫 #5D3FD3
   ============================================================ */

/* ---- Hero ---- */
.kb-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b6e 40%, #5D3FD3 100%);
    padding: 72px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kb-hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: rgba(123, 97, 255, 0.08);
    pointer-events: none;
}

.kb-hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(93, 63, 211, 0.1);
    pointer-events: none;
}

.kb-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

.kb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 160, 23, 0.18);
    border: 1px solid rgba(212, 160, 23, 0.4);
    color: #F5C842;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.kb-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.kb-hero p {
    font-size: 16px;
    color: rgba(255,255,255,0.72);
    margin-bottom: 32px;
    line-height: 1.7;
}

.kb-search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.22);
    border-radius: 50px;
    padding: 6px 8px 6px 20px;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto 28px;
    transition: border-color 0.2s, background 0.2s;
}

.kb-search-box:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.45);
}

.kb-search-box > i {
    color: rgba(255,255,255,0.55);
    font-size: 15px;
    flex-shrink: 0;
}

.kb-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
}

.kb-search-input::placeholder { color: rgba(255,255,255,0.45); }

.kb-search-btn {
    background: #5D3FD3;
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 9px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.kb-search-btn:hover { background: #4A2FB8; }

.kb-hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.kb-hero-stats span {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kb-hero-stats i { color: #7B61FF; }

/* ---- 主容器 ---- */
.kb-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ---- 分类导航区 ---- */
.kb-nav-section {
    padding: 40px 0 60px;
    background: #f4f6fb;
}

/* ---- 一级分类 ---- */
.kb-level1-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.kb-level1-label,
.kb-level2-label {
    font-size: 12px;
    font-weight: 700;
    color: #8888aa;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding-top: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 28px;
}

.kb-level1-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kb-l1-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 24px;
    border: 1.5px solid #e0ddf8;
    background: #fff;
    color: #4a4a6a;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.kb-l1-btn i { font-size: 13px; }

.kb-l1-btn:hover {
    border-color: #5D3FD3;
    color: #5D3FD3;
    background: #f0edff;
}

.kb-l1-btn.active {
    background: #5D3FD3;
    border-color: #5D3FD3;
    color: #fff;
    box-shadow: 0 4px 14px rgba(93,63,211,0.3);
}

.kb-l1-btn.active i { color: #fff !important; }

/* ---- 二级分类 - 胶囊标签风格 ---- */
.kb-level2-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 6px 8px;
    background: #f0ecff;
    border-radius: 14px;
    border: 1.5px solid #d9d0f8;
    box-shadow: 0 2px 8px rgba(93,63,211,0.07);
    position: relative;
}

.kb-level2-label {
    padding: 0 10px 0 4px;
    margin-right: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #5D3FD3;
    white-space: nowrap;
    border-right: 1.5px solid #d9d0f8;
    align-self: center;
    line-height: 1;
}

.kb-level2-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    padding: 2px 4px;
    scrollbar-width: none;
}
.kb-level2-list::-webkit-scrollbar { display: none; }

/* 右侧渐变提示"可滚动" */
.kb-level2-wrap::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, #f0ecff 80%);
    border-radius: 0 12px 12px 0;
    pointer-events: none;
}

.kb-l2-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 9px;
    border: 1.5px solid transparent;
    background: transparent;
    color: #5a5a7a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.kb-l2-btn:hover {
    color: #5D3FD3;
    background: rgba(93,63,211,0.10);
    border-color: rgba(93,63,211,0.2);
}

.kb-l2-btn.active {
    background: #5D3FD3;
    border-color: #5D3FD3;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(93,63,211,0.30);
}

.kb-l2-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(93,63,211,0.15);
    color: #5D3FD3;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    transition: background 0.15s, color 0.15s;
}

.kb-l2-btn.active .kb-l2-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ---- 文章卡片区 ---- */
.kb-articles-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8e8f0;
    padding: 24px 24px 28px;
    box-shadow: 0 2px 12px rgba(93,63,211,0.06);
}

.kb-articles-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0edff;
}

.kb-articles-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.kb-articles-hint {
    font-size: 12px;
    color: #4a4a6a;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f7ff;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #e0ddf8;
}

.kb-articles-hint .fa-unlock-alt { color: #22C55E; }
.kb-articles-hint .fa-crown { color: #D4A017; }

.kb-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.kb-articles-placeholder {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: #8888aa;
    gap: 14px;
}

.kb-articles-placeholder i {
    font-size: 40px;
    color: #c8c0f0;
}

.kb-articles-placeholder p {
    font-size: 14px;
}

/* ---- 文章卡片 ---- */
.kb-article-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 12px;
    border: 1.5px solid #e8e8f0;
    background: #fafafa;
    text-decoration: none;
    transition: all 0.18s;
    cursor: pointer;
}

.kb-article-card:hover {
    border-color: #5D3FD3;
    background: #f5f2ff;
    box-shadow: 0 4px 16px rgba(93,63,211,0.1);
    transform: translateY(-2px);
    text-decoration: none;
}

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

.kb-article-icon {
    font-size: 16px;
    color: #5D3FD3;
    width: 34px;
    height: 34px;
    background: rgba(93,63,211,0.1);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 品种卡片徽标：VIP */
.kb-badge-vip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #C18A00;
    background: rgba(212,160,23,0.1);
    border: 1px solid rgba(212,160,23,0.28);
    padding: 2px 8px;
    border-radius: 10px;
}

.kb-badge-vip i { color: #D4A017; }

/* 品种卡片徽标：含免费 */
.kb-badge-partial {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #22C55E;
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.22);
    padding: 2px 8px;
    border-radius: 10px;
}

.kb-article-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

/* 底部：免费篇数 + VIP篇数并排 */
.kb-article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    flex-wrap: wrap;
}

.kb-meta-free {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #22C55E;
    font-weight: 600;
}

.kb-meta-vip {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #D4A017;
    font-weight: 600;
}

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

.kb-meta-empty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #b0aed0;
    font-style: italic;
}

/* ---- VIP 引导横幅 ---- */
.kb-vip-banner {
    padding: 32px 0;
}

/* 右侧金光晕 */
.kb-vip-inner::before {
    content: '';
    position: absolute;
    top: -100px;
    right: 4%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245,200,66,0.13) 0%, transparent 65%);
    pointer-events: none;
}

/* 左下角紫光晕 */
.kb-vip-inner::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 12%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(180,150,255,0.13) 0%, transparent 65%);
    pointer-events: none;
}

/* 星点装饰 */
.kb-vip-deco-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.kb-vip-deco-stars span {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,215,0,0.55);
    animation: kb-twinkle 3s infinite alternate ease-in-out;
}
.kb-vip-deco-stars span:nth-child(1) { width:3px; height:3px; top:22%; left:6%;   animation-delay:0s; }
.kb-vip-deco-stars span:nth-child(2) { width:2px; height:2px; top:65%; left:22%;  animation-delay:0.7s; }
.kb-vip-deco-stars span:nth-child(3) { width:4px; height:4px; top:28%; left:48%;  animation-delay:1.3s; }
.kb-vip-deco-stars span:nth-child(4) { width:3px; height:3px; top:72%; left:68%;  animation-delay:0.4s; }
.kb-vip-deco-stars span:nth-child(5) { width:2px; height:2px; top:18%; left:82%;  animation-delay:1.0s; }
.kb-vip-deco-stars span:nth-child(6) { width:3px; height:3px; top:55%; left:90%;  animation-delay:1.8s; }
@keyframes kb-twinkle {
    from { opacity: 0.25; transform: scale(0.7); }
    to   { opacity: 1;    transform: scale(1.4); }
}

.kb-vip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
    background: linear-gradient(120deg, #110642 0%, #261090 30%, #432ab8 58%, #5D3FD3 78%, #6e50dc 100%);
    border-radius: 20px;
    overflow: hidden;
    padding: 40px 48px;
    box-shadow: 0 4px 32px rgba(30,10,100,0.35);
}

.kb-vip-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.kb-vip-icon {
    position: relative;
    width: 66px;
    height: 66px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #F5C842;
}

.kb-vip-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(245,200,66,0.14);
    border: 1.5px solid rgba(245,200,66,0.38);
    box-shadow: 0 0 22px rgba(245,200,66,0.22), inset 0 0 12px rgba(245,200,66,0.08);
}

.kb-vip-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kb-vip-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #F5C842;
    background: rgba(245,200,66,0.14);
    border: 1px solid rgba(245,200,66,0.3);
    border-radius: 20px;
    padding: 2px 10px;
    letter-spacing: 0.4px;
    width: fit-content;
}

.kb-vip-left h3 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: 0.2px;
}

.kb-vip-left p {
    font-size: 13px;
    color: rgba(255,255,255,0.62);
    margin: 0;
    line-height: 1.6;
}

.kb-vip-right {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}

.kb-vip-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.kb-vip-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.kb-price-from { font-size: 12px; color: rgba(255,255,255,0.65); }
.kb-price-num  {
    font-size: 42px;
    font-weight: 900;
    color: #F5C842;
    text-shadow: 0 0 24px rgba(245,200,66,0.5);
    line-height: 1;
}
.kb-price-unit { font-size: 14px; color: rgba(255,255,255,0.75); }

.kb-vip-price-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.38);
}

.kb-vip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #F5C842 0%, #E8A800 100%);
    color: #1a0847;
    font-size: 15px;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.22s;
    box-shadow: 0 4px 20px rgba(232,168,0,0.45), 0 1px 0 rgba(255,255,255,0.25) inset;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.kb-vip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -110%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
    transition: left 0.55s ease;
}

.kb-vip-btn:hover::before { left: 110%; }

.kb-btn-arrow {
    font-size: 11px;
    opacity: 0.65;
    transition: transform 0.2s;
}

.kb-vip-btn:hover {
    background: linear-gradient(135deg, #FFD740 0%, #F5B000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232,168,0,0.55);
    text-decoration: none;
    color: #1a0847;
}

.kb-vip-btn:hover .kb-btn-arrow { transform: translateX(3px); }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .kb-hero h1 { font-size: 28px; }
    .kb-hero p  { font-size: 14px; }
    .kb-container { padding: 0 16px; }
    .kb-level1-wrap { flex-wrap: wrap; gap: 10px; }
    .kb-level2-wrap { padding: 5px 6px; }
    .kb-level1-label { padding-top: 0; }
    .kb-l2-btn { padding: 6px 12px; font-size: 12px; }
    .kb-articles-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .kb-vip-inner { flex-direction: column; align-items: flex-start; }
    .kb-vip-right { align-self: stretch; justify-content: space-between; }
    .kb-vip-price-box { align-items: flex-start; }
    .kb-hero-stats { gap: 16px; }
}

@media (max-width: 480px) {
    .kb-articles-grid { grid-template-columns: repeat(2, 1fr); }
    .kb-l1-btn { font-size: 13px; padding: 7px 14px; }
}
