/* ========== Claude Style - 浅色主题 ========== */

:root {
    --bg-primary: #fafafa;
    --bg-secondary: #f5f5f0;
    --bg-card: #ffffff;
    --bg-card-hover: #fefefe;
    --border-color: rgba(0,0,0,0.06);
    --border-hover: rgba(0,0,0,0.12);

    --text-primary: #1a1a2e;
    --text-secondary: #55556a;
    --text-muted: #9999aa;

    --accent: #7c5cfc;
    --accent-light: rgba(124,92,252,0.08);
    --accent-glow: rgba(124,92,252,0.15);

    --gradient-accent: linear-gradient(135deg, #7c5cfc 0%, #a855f7 50%, #ec4899 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #059669 100%);

    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;

    --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
    --shadow-glow: 0 4px 20px var(--accent-glow);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    display: flex; flex-direction: column;
}

::selection {
    background: var(--accent);
    color: white;
}

/* ========== 导航栏 ========== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

.navbar-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.icon-circle {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.icon-circle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.45);
    border-radius: 50%;
    top: -5px;
    left: -5px;
}

.brand-text {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-search {
    flex: 1;
    max-width: 360px;
}

.navbar-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    margin-left: auto;
}

.navbar-nav-links a {
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-xs);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.navbar-nav-links a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.navbar-nav-links a.current {
    color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}

.navbar-search form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2px;
    transition: all 0.25s ease;
}

.navbar-search form:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.search-icon {
    padding: 0 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.navbar-search input {
    flex: 1;
    padding: 10px 12px;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.navbar-search input::placeholder { color: var(--text-muted); }

.mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ========== 分类导航 ========== */
.category-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 65px;
    z-index: 90;
}

#mobileMenu {
    display: none;
}

.category-scroll {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    gap: 4px;
    height: 48px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.category-bar a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.cat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
    transition: all 0.25s ease;
}

.category-bar a:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.cat-active {
    color: white !important;
    background: var(--gradient-accent) !important;
    box-shadow: var(--shadow-glow);
}
.cat-active .cat-dot {
    background: white !important;
    opacity: 1 !important;
}

/* ========== 主内容区 ========== */
.main-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 24px 72px;
    flex: 1;
}

/* ========== 区块标题 ========== */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}
.section-title i { color: var(--accent); font-size: 0.95rem; }

/* ========== 推荐文章 ========== */
.featured-section { margin-bottom: 64px; }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.featured-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.25s ease;
}
.featured-card:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.featured-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, #eef0f5 0%, #e8ecf2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.featured-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.35s ease; display: block;
}
.featured-card:hover .featured-image img { transform: scale(1.02); }

.featured-body { padding: 12px; }
.featured-body .cat-label { margin-bottom: 6px; display: inline-block; }

.featured-body h3 {
    font-size: 0.85rem; line-height: 1.36; margin-bottom: 6px;
    font-weight: 600; letter-spacing: -0.2px;
}
.featured-body h3 a { color: var(--text-primary); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s;
}
.featured-body h3 a:hover { color: var(--accent); }

.featured-summary {
    color: var(--text-secondary); font-size: 0.82rem; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 12px;
}

.featured-meta {
    display: flex; justify-content: space-between; align-items: center;
    color: var(--text-muted); font-size: 0.8rem; padding-top: 14px;
    border-top: 1px solid var(--border-color);
}
.featured-meta i { margin-right: 4px; }

/* ========== 文章列表 ========== */
.articles-section { margin-bottom: 64px; }
.articles-grid { display: flex; flex-direction: column; gap: 16px; }

.article-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex; flex-direction: row;
}
.article-card:hover {
    transform: translateY(-2px);
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.article-image {
    width: 200px; min-width: 200px; aspect-ratio: 4/3; overflow: hidden; position: relative;
    background: linear-gradient(145deg, #eef0f5 0%, #e8ecf2 100%);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.article-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease; display: block;
}
.article-card:hover .article-image img { transform: scale(1.03); }

.article-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; justify-content: center; }

.article-meta-top {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.view-count { color: var(--text-muted); font-size: 0.78rem; }
.view-count i { margin-right: 4px; }
.article-date { color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; }

.article-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.article-title {
    font-size: 0.95rem; line-height: 1.42;
    font-weight: 600; letter-spacing: -0.2px; flex: 1; min-width: 0;
}
.article-title a {
    color: var(--text-primary); text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    transition: color 0.2s;
}
.article-title a:hover { color: var(--accent); }

.article-summary {
    color: var(--text-secondary); font-size: 0.84rem; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.article-meta-bottom {
    color: var(--text-muted); font-size: 0.78rem;
    padding-top: 10px; border-top: 1px solid var(--border-color);
}

/* ========== 分类标签 ========== */
.cat-label {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; border-radius: 18px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3px;
    background: var(--accent-light); color: var(--accent);
    border: 1px solid rgba(124,92,252,0.12);
}
.cat-label.tax-finance { background: rgba(239,68,68,0.07); color: #dc2626; border-color: rgba(220,38,38,0.12); }
.cat-label.law { background: rgba(59,130,246,0.07); color: #2563eb; border-color: rgba(37,99,235,0.12); }
.cat-label.tech { background: rgba(168,85,247,0.07); color: #9333ea; border-color: rgba(147,51,234,0.12); }
.cat-label.study { background: rgba(6,182,212,0.07); color: #0891b2; border-color: rgba(8,145,178,0.12); }
.cat-label.sense { background: rgba(245,158,11,0.08); color: #d97706; border-color: rgba(217,119,6,0.12); }
.cat-label.life { background: rgba(16,185,129,0.07); color: #059669; border-color: rgba(5,150,105,0.12); }

/* ========== 分类页面头部 ========== */
.category-header {
    text-align: center; padding: 32px 32px; margin-bottom: 36px;
    background: var(--gradient-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); position: relative; overflow: hidden;
}
.category-header::before {
    content: ''; position: absolute; top: -40%; left: -15%; width: 60%; height: 180%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); opacity: 0.5;
}

.cat-hero { display: flex; align-items: center; justify-content: center; gap: 20px; position: relative; z-index: 1; }

.cat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: white; flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.cat-icon-tech { background: linear-gradient(135deg, #9333ea, #7c3aed); }
.cat-icon-tax { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.cat-icon-law { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.cat-icon-study { background: linear-gradient(135deg, #0891b2, #0e7490); }
.cat-icon-sense { background: linear-gradient(135deg, #d97706, #b45309); }
.cat-icon-life { background: linear-gradient(135deg, #059669, #047857); }
.cat-icon-default { background: linear-gradient(135deg, #6b7280, #4b5563); }

.cat-name {
    font-size: 1.45rem; font-weight: 700; color: var(--text-primary);
    text-align: left; line-height: 1.25;
}
.cat-desc {
    font-size: 0.88rem; color: var(--text-secondary); margin-top: 4px;
    text-align: left; max-width: 360px; line-height: 1.45;
}

/* ========== 文章详情页 ========== */
.article-full {
    max-width: 800px; margin: 0 auto; background: var(--gradient-card);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg);
    padding: 44px; box-shadow: var(--shadow-md);
}
.article-header { margin-bottom: 34px; padding-bottom: 26px; border-bottom: 1px solid var(--border-color); }
.article-header .article-meta-top { margin-bottom: 16px; }

.article-full .article-title {
    font-size: 1.75rem; line-height: 1.38; margin-bottom: 16px;
    font-weight: 750; letter-spacing: -0.5px;
}

.article-cover { margin-bottom: 34px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border-color); }
.article-cover img { width: 100%; max-height: 400px; object-fit: cover; display: block; }

.article-content { font-size: 1.02rem; line-height: 1.88; color: var(--text-primary); }
.article-content p { margin-bottom: 22px; }
.article-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 24px 0; border: 1px solid var(--border-color); }
.article-content h1, .article-content h2, .article-content h3 { margin: 34px 0 16px; font-weight: 700; color: var(--text-primary); }
.article-content h2 { font-size: 1.38rem; }
.article-content h3 { font-size: 1.15rem; }

.text-content { white-space: pre-wrap; }
.no-content { color: var(--text-muted); text-align: center; padding: 64px 40px; }

.article-footer {
    margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.original-link { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.original-link:hover { text-decoration: underline; }

/* ========== 相关文章 ========== */
.related-section { max-width: 800px; margin: 52px auto 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.related-card {
    background: var(--gradient-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); overflow: hidden; text-decoration: none; color: var(--text-primary);
    transition: all 0.3s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.related-image {
    aspect-ratio: 16/9; overflow: hidden;
    background: linear-gradient(145deg, #eef0f5 0%, #e8ecf2 100%);
    display: flex; align-items: center; justify-content: center;
}
.related-image img { width: 100%; height: 100%; object-fit: cover; }
.related-body { padding: 14px; }
.related-body h4 { font-size: 0.87rem; line-height: 1.42; font-weight: 600;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== 分页 ========== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 48px; padding: 20px; }
.page-btn {
    padding: 10px 22px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); color: var(--text-primary); text-decoration: none;
    font-size: 0.88rem; font-weight: 500; transition: all 0.25s ease;
}
.page-btn:hover { background: var(--accent); color: white; border-color: var(--accent); box-shadow: var(--shadow-glow); }
.page-info { color: var(--text-muted); font-size: 0.88rem; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); grid-column: 1 / -1; }
.empty-state i { font-size: 3.5rem; margin-bottom: 20px; opacity: 0.25; }
.empty-state p { font-size: 0.96rem; }

/* ========== Footer ========== */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border-color); padding: 32px 20px; }
.site-footer p { text-align: center; color: var(--text-muted); font-size: 0.86rem; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .featured-grid, .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .navbar-inner { padding: 12px 16px; gap: 16px; }
    .brand-text { font-size: 1.05rem; }
    .navbar-search { display: none; }
    .navbar-nav-links { display: none; }
    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

    .category-bar:not(#mobileMenu) { display: none; }

    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 16px 20px;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 8px;
    }
    .mobile-nav a {
        padding: 12px 16px;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-primary);
        text-decoration: none;
        border-radius: var(--radius-sm);
        transition: all 0.2s ease;
    }
    .mobile-nav a:hover,
    .mobile-nav a.current {
        color: var(--accent);
        background: var(--accent-light);
    }

    #mobileMenu {
        display: flex;
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(250,250,250,0.97); backdrop-filter: blur(24px);
        z-index: 999; transform: translateY(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column; align-items: center;
        padding: 60px 20px 20px;
        border: none;
        overflow-y: auto;
    }
    #mobileMenu.mobile-open { transform: translateY(0); }
    #mobileMenu .category-scroll { flex-direction: column; gap: 6px; height: auto; padding: 20px; align-items: stretch; width: 100%; max-width: 320px; }
    #mobileMenu a.cat-link { display: flex; justify-content: center; padding: 14px 24px; font-size: 1rem; border-radius: var(--radius-sm); }

    .featured-grid, .articles-grid { grid-template-columns: 1fr; }
    .article-card { flex-direction: column; }
    .article-image { width: 100%; min-width: auto; aspect-ratio: 16/10; }
    .related-grid { grid-template-columns: 1fr; }
    .article-full { padding: 24px; border-radius: var(--radius-md); }
    .main-content { padding: 28px 16px 48px; }

    .cat-hero { flex-direction: column; gap: 14px; text-align: center; }
    .cat-name, .cat-desc { text-align: center; max-width: none; }
}
