/* ==========================================================================
   头号英语 - 文章系统样式（仅文章页专用）
   公共样式已抽离到 ../assets/css/base.css（按钮、navbar、容器、变量等）
   本文件只放文章页专属样式
   ========================================================================== */

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    padding-top: 6rem;
    padding-bottom: 4rem;
    min-height: 100vh;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: hsl(var(--foreground));
}

.breadcrumb-separator {
    color: hsl(var(--muted-foreground) / 0.5);
}

.breadcrumb-current {
    color: hsl(var(--foreground));
    font-weight: 500;
}

/* ==========================================================================
   Articles List Page
   ========================================================================== */

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .page-header h1 {
        font-size: 3rem;
    }
}

.page-description {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.75;
}

/* Search Bar */
.search-section {
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: hsl(var(--secondary) / 0.5);
    border: 1px solid hsl(var(--border) / 0.5);
    transition: all 0.2s;
}

.search-bar:focus-within {
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.search-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: hsl(var(--muted-foreground));
    flex-shrink: 0;
}

.search-input {
    background: transparent;
    color: hsl(var(--foreground));
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.875rem;
}

.search-input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid hsl(var(--border));
    background: transparent;
    color: hsl(var(--muted-foreground));
}

.category-btn:hover {
    color: hsl(var(--foreground));
    border-color: hsl(var(--primary) / 0.3);
}

.category-btn.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.category-count {
    font-size: 0.75rem;
    opacity: 0.75;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Article Card */
.article-card {
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    background: hsl(var(--card) / 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid hsl(var(--border) / 0.5);
    overflow: hidden;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    border-color: hsl(var(--primary) / 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -10px hsl(var(--primary) / 0.15);
}

.article-cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    background: hsl(var(--secondary));
}

.article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .article-cover img {
    transform: scale(1.05);
}

/* 渐变背景封面（无图片时） */
.article-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.3), hsl(var(--secondary)));
    position: relative;
    overflow: hidden;
}

.article-cover-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, hsl(var(--primary) / 0.1) 0%, transparent 60%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.article-cover-placeholder .placeholder-text {
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    text-align: center;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px hsl(var(--background) / 0.5);
}

.article-category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.article-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-meta-icon {
    width: 0.875rem;
    height: 0.875rem;
}

.article-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: hsl(var(--foreground));
}

.article-excerpt {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.75;
    margin-bottom: 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.article-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid hsl(var(--border) / 0.3);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.author-name {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.read-more-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--primary));
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s;
}

.article-card:hover .read-more-link {
    gap: 0.5rem;
}

.read-more-icon {
    width: 1rem;
    height: 1rem;
}

/* Featured Article */
.featured-article {
    grid-column: 1 / -1;
}

@media (min-width: 768px) {
    .featured-article {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .featured-article .article-cover {
        aspect-ratio: auto;
    }
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid hsl(var(--border));
    background: transparent;
    color: hsl(var(--muted-foreground));
}

.page-btn:hover:not(:disabled) {
    color: hsl(var(--foreground));
    border-color: hsl(var(--primary) / 0.3);
}

.page-btn.active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: hsl(var(--muted-foreground));
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.empty-state p {
    font-size: 0.875rem;
}

/* ==========================================================================
   Article Detail Page
   ========================================================================== */

/* Article Header */
.article-header {
    max-width: 48rem;
    margin: 0 auto 2rem auto;
}

.article-header .article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    margin-bottom: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.article-header .article-category:hover {
    background: hsl(var(--primary) / 0.2);
}

.article-header h1 {
    font-size: 1.875rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .article-header h1 {
        font-size: 2.5rem;
    }
}

.article-subtitle {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

.article-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid hsl(var(--border) / 0.3);
    border-bottom: 1px solid hsl(var(--border) / 0.3);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.info-icon {
    width: 1rem;
    height: 1rem;
}

/* Article Cover Image */
.article-feature-image {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
}

.article-feature-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Cover Hero (详情页封面大图) */
.article-cover-hero {
    max-width: 48rem;
    margin: 0 auto 2rem auto;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px -4px hsl(var(--foreground) / 0.1);
}

.article-cover-hero img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

@media (max-width: 767px) {
    .article-cover-hero {
        border-radius: 0.75rem;
    }
}

/* ==========================================================================
   Article Content - Prose (专业阅读排版)
   参考 Medium / 知乎专栏 / Substack 的阅读体验
   ========================================================================== */

.article-content {
    max-width: 48rem;
    margin: 0 auto;
    font-family: 'Noto Sans SC', 'Space Grotesk', system-ui, sans-serif;  /* 正文优先 Noto Sans SC，更轻盈舒适 */
    font-weight: 400;                /* 显式 400，避免 Space Grotesk 笔画偏粗 */
    font-size: 1.0625rem;            /* 17px，略大于基础字号 */
    line-height: 1.8;               /* 宽行高提升可读性 */
    color: hsl(var(--foreground) / 0.85);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── 标题层级 ──────────────────────────────────────────────────────── */

/* h2：标题保持 Space Grotesk 的设计感 */
.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: 'Space Grotesk', 'Noto Sans SC', system-ui, sans-serif;
}

/* h2：大号、加粗、大间距、左侧橙色装饰条 */
.article-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 2.75rem;
    margin-bottom: 1.25rem;
    color: hsl(var(--foreground));
    padding-top: 1.75rem;
    padding-left: 0.75rem;
    border-top: 1px solid hsl(var(--border) / 0.25);
    border-left: 4px solid hsl(var(--primary));
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.article-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* h3：中号、加粗、中等间距 */
.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* h4：小号、加粗、小间距 */
.article-content h4 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground) / 0.95);
    line-height: 1.45;
}

/* ── 段落 ──────────────────────────────────────────────────────────── */

.article-content p {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 1.5em;          /* 用 em 让段间距随字号缩放 */
    color: hsl(var(--foreground) / 0.85);
}

/* ── 列表 ──────────────────────────────────────────────────────────── */

.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    margin-top: 0.25em;
    padding-left: 1.75rem;
}

.article-content ul {
    list-style-type: none;         /* 自定义 marker */
}

/* 无序列表：橙色圆点 marker */
.article-content ul > li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.8;
    color: hsl(var(--foreground) / 0.85);
}

.article-content ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--primary));
}

/* 有序列表 */
.article-content ol > li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
    color: hsl(var(--foreground) / 0.85);
    padding-left: 0.25rem;
}

.article-content ol {
    list-style-type: decimal;
}

.article-content ol > li::marker {
    color: hsl(var(--primary));
    font-weight: 600;
}

/* ── 引用块 ────────────────────────────────────────────────────────── */

.article-content blockquote {
    margin: 1.75em 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid hsl(var(--primary));
    background: hsl(var(--primary) / 0.06);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
}

.article-content blockquote p {
    margin-bottom: 0.75em;
    color: hsl(var(--foreground) / 0.82);
    font-size: 1rem;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* ── 强调 ──────────────────────────────────────────────────────────── */

.article-content strong {
    font-weight: 600;              /* 半粗而非全粗 700，阅读体验更舒适 */
    color: hsl(var(--foreground) / 0.95);
}

.article-content em {
    font-style: italic;
    color: hsl(var(--primary));
}

/* ── 代码 ──────────────────────────────────────────────────────────── */

/* inline code */
.article-content code {
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    background: hsl(var(--muted));
    color: hsl(var(--primary));
    word-break: break-word;
}

/* code block（如果有 pre > code） */
.article-content pre {
    margin: 1.75em 0;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border) / 0.3);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content pre code {
    padding: 0;
    background: none;
    color: hsl(var(--foreground) / 0.9);
    font-size: 1em;
}

/* ── 分隔线 ────────────────────────────────────────────────────────── */

.article-content hr {
    border: none;
    height: 2px;
    margin: 2.5em 0;
    background: linear-gradient(
        to right,
        transparent,
        hsl(var(--border) / 0.5) 20%,
        hsl(var(--primary) / 0.3) 50%,
        hsl(var(--border) / 0.5) 80%,
        transparent
    );
}

/* ── 链接 ──────────────────────────────────────────────────────────── */

.article-content a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: color 0.2s, text-decoration-color 0.2s;
    text-underline-offset: 0.15em;
    text-decoration: underline;
    text-decoration-color: hsl(var(--primary) / 0.3);
}

.article-content a:hover {
    color: hsl(var(--primary));
    text-decoration-color: hsl(var(--primary));
}

/* ── 图片（如有） ──────────────────────────────────────────────────── */

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5em 0;
}

/* ── 响应式 ────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .article-content {
        font-size: 1rem;           /* 移动端字号略小 */
    }

    .article-content h2 {
        font-size: 1.375rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
        padding-top: 1.25rem;
        padding-left: 0.625rem;
    }

    .article-content h3 {
        font-size: 1.125rem;
        margin-top: 1.5rem;
        margin-bottom: 0.625rem;
    }

    .article-content h4 {
        font-size: 1rem;
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .article-content p {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 1.25em;
    }

    .article-content ul,
    .article-content ol {
        padding-left: 1.5rem;
        margin-bottom: 1.25em;
    }

    .article-content ul > li {
        padding-left: 1rem;
        margin-bottom: 0.375rem;
    }

    .article-content blockquote {
        padding: 1rem 1.25rem;
        margin: 1.5em 0;
    }

    .article-content hr {
        margin: 2em 0;
    }
}

/* Article Tags Section */
.article-tags-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border) / 0.3);
}

.tags-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    background: hsl(var(--secondary) / 0.5);
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid hsl(var(--border) / 0.3);
}

.tag-link:hover {
    color: hsl(var(--primary));
    border-color: hsl(var(--primary) / 0.3);
    background: hsl(var(--primary) / 0.1);
}

/* Related Articles */
.related-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid hsl(var(--border) / 0.3);
}

.related-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Article Navigation */
.article-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border) / 0.3);
}

@media (min-width: 640px) {
    .article-nav {
        flex-direction: row;
        justify-content: space-between;
    }
}

.nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: hsl(var(--secondary) / 0.3);
    text-decoration: none;
    transition: all 0.2s;
    flex: 1;
    max-width: 100%;
}

@media (min-width: 640px) {
    .nav-link {
        max-width: 48%;
    }
}

.nav-link:hover {
    background: hsl(var(--secondary) / 0.5);
}

.nav-link-label {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.nav-link-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.nav-link.next {
    text-align: right;
}

/* ==========================================================================
   Footer - 复用主页样式
   ========================================================================== */

.footer {
    border-top: 1px solid hsl(var(--border) / 0.4);
    padding: 2.5rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo-img {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background-size: cover;
    background-position: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.footer-links a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: hsl(var(--foreground));
}

.footer-copyright {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 639px) {
    .hide-mobile {
        display: none;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* 仅当 JS 标记为 fade-in-pending 时才隐藏，等 IntersectionObserver 触发 */
.fade-in.fade-in-pending {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Difficulty Badge Colors
   ========================================================================== */

.difficulty-beginner {
    color: #22c55e;
}

.difficulty-intermediate {
    color: #eab308;
}

.difficulty-advanced {
    color: #ef4444;
}

/* ==========================================================================
   Crawler Fallback Content
   ========================================================================== */

.crawler-article-list {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}

.crawler-article-list h2 {
    grid-column: 1 / -1;
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.crawler-article-item {
    padding: 1rem;
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: 0.5rem;
    background: hsl(var(--card) / 0.45);
}

.crawler-article-item a {
    display: block;
    color: hsl(var(--foreground));
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
}

.crawler-article-item time {
    display: block;
    margin-top: 0.5rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.75rem;
}

.crawler-article-item p {
    margin: 0.5rem 0 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ── Back to Top 按钮 ─────────────────────────────────────────────── */

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
    box-shadow: 0 4px 16px -4px hsl(var(--primary) / 0.4);
}

.back-to-top:hover {
    background: hsl(var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -4px hsl(var(--primary) / 0.5);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 767px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}
