/* --- 基础样式 --- */
:root {
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4); 
    --accent-color: #6366f1;
    --text-main: #1f2937;
    --text-sub: #4b5563;
    --text-muted: #9ca3af;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-main);
    padding: 2rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
    body { padding: 4rem; }
}

.main-container, .navbar, .footer {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

/* --- 顶部进度条 --- */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #4f46e5, #c084fc);
    width: 0%;
    z-index: 100;
    transition: width 0.2s ease-out;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* --- 导航栏 --- */
.navbar {
    margin-bottom: 3rem;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 1rem;
    z-index: 50;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(to right, #4f46e5, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: none;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .nav-links { display: flex; }
}

.nav-link {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:not(.active) { color: var(--text-sub); }
.nav-link.active {
    color: var(--accent-color);
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.mobile-menu { display: block; padding: 0.5rem; }
@media (min-width: 768px) { .mobile-menu { display: none; } }
.icon { width: 1.5rem; height: 1.5rem; color: var(--text-sub); }

/* --- 头部 --- */
.main-header { margin-bottom: 4rem; text-align: center; }
@media (min-width: 768px) { .main-header { text-align: left; } }

.title { font-size: 2.25rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.05em; }
@media (min-width: 768px) { .title { font-size: 3rem; } }

.subtitle { font-size: 1.125rem; color: var(--text-sub); line-height: 1.75; }

/* --- 卡片通用样式 --- */
.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-radius: 1.5rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px 0 rgba(31, 38, 135, 0.15);
    background: rgba(255, 255, 255, 0.8);
}

/* --- 文章网格 --- */
.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-container { grid-template-columns: repeat(2, 1fr); }
}

.article-card { overflow: hidden; display: flex; flex-direction: column; }

.card-image {
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    transition: transform 0.5s;
}

.article-card:hover .card-image { transform: scale(1.05); }

.design-bg { background: linear-gradient(135deg, #60a5fa, #4f46e5); }
.tech-bg { background: linear-gradient(135deg, #c084fc, #ec4899); }

.card-content { padding: 1.5rem; }

.tag {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.design-tag { color: #4f46e5; }
.tech-tag { color: #c084fc; }

.article-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; cursor: pointer; transition: color 0.2s; }
.article-card:hover .article-title { color: var(--accent-color); }

.article-excerpt { color: var(--text-sub); font-size: 0.875rem; line-height: 1.625; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.read-more { font-size: 0.875rem; font-weight: 600; color: var(--accent-color); }

/* --- 按钮和页脚 --- */
.center-button { margin-top: 3rem; text-align: center; }
.load-more {
    padding: 0.75rem 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.footer {
    margin-top: 6rem;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ... 原有 style.css 内容保持不变 ... */

/* --- 文章详情页专用样式 --- */
.article-detail-container {
    padding: 2.5rem;
}

@media (min-width: 768px) {
    .article-detail-container {
        padding: 3rem 4rem;
    }
}

.article-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
}

.article-meta {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.article-title-large {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

@media (min-width: 768px) {
    .article-title-large { font-size: 3rem; }
}

.article-description {
    font-size: 1.25rem;
    color: var(--text-sub);
    line-height: 1.6;
}

.article-content {
    color: var(--text-main);
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content code {
    background-color: rgba(0,0,0,0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.9em;
}

.article-content pre {
    background-color: #1f2937;
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.back-link {
    margin-top: 3rem;
    text-align: center;
}

.back-link a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #4f46e5;
}