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

body {
    background: #f8fafc;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', sans-serif;
    line-height: 1.5;
    color: #0f172a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1 0 auto;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* 头部样式 */
.site-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    backdrop-filter: blur(2px);
    background-color: rgba(255,255,255,0.96);
    z-index: 10;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #1e293b, #2c3e66);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.logo p {
    font-size: 0.85rem;
    color: #475569;
    margin-top: 0.2rem;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
    font-weight: 500;
}

.nav-links a {
    text-decoration: none;
    color: #334155;
    transition: color 0.2s;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(110deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 2rem;
    padding: 2.2rem 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02), 0 1px 1px rgba(0,0,0,0.03);
    border: 1px solid #eef2ff;
}

.hero h2 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0f172a;
}

.hero p {
    font-size: 1.1rem;
    color: #334155;
    max-width: 85%;
}

/* 标签 */
.study-badge {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: #e6f0ff;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e40af;
}

/* 章节标题 */
.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 1.8rem 0 1rem 0;
    border-left: 5px solid #2563eb;
    padding-left: 1rem;
    color: #0c4a6e;
}

/* 卡片网格 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    border: 1px solid #eef2f6;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -12px rgba(0,0,0,0.08);
    border-color: #cbdffa;
}

.card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.card h3 {
    font-size: 1.45rem;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.card p {
    color: #475569;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.card-link:hover {
    text-decoration: underline;
}

/* 笔记列表 */
.notes-list {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid #eef2f6;
}

.note-item {
    padding: 1.5rem;
    border-bottom: 1px solid #eef2f6;
    transition: background 0.2s;
    cursor: pointer;
}

.note-item:hover {
    background: #f8fafc;
}

.note-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.note-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
}

.note-summary {
    color: #475569;
    margin-bottom: 0.75rem;
}

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

.tag {
    background: #f1f5f9;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #475569;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* 笔记详情页 */
.note-detail {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid #eef2f6;
}

.note-detail h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0f172a;
}

.note-detail .meta {
    color: #64748b;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eef2f6;
}

.note-detail .content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #334155;
}

.note-detail .content h2 {
    margin: 1.5rem 0 0.75rem;
    color: #0f172a;
}

.note-detail .content h3 {
    margin: 1.2rem 0 0.5rem;
    color: #1e293b;
}

.note-detail .content p {
    margin-bottom: 1rem;
}

.note-detail .content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
    font-family: monospace;
}

.note-detail .content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

/* 资源卡片 */
.resource-card {
    background: white;
    border-radius: 1rem;
    padding: 1.2rem;
    border: 1px solid #eef2f6;
    transition: all 0.2s;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.resource-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resource-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.resource-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.85rem;
}

/* 关于页面 */
.about-section {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #eef2f6;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.skill {
    background: #e6f0ff;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.85rem;
}

/* 更新列表 */
.update-list {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #eef2f6;
    margin-bottom: 2rem;
}

.update-item {
    padding: 0.9rem 0;
    border-bottom: 1px dashed #e2edf2;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.update-date {
    font-family: monospace;
    color: #4b5563;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    min-width: 100px;
    text-align: center;
}

.update-content {
    flex: 1;
    color: #1e293b;
}

/* 底部 */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 2rem 1rem 1.8rem;
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid #1e293b;
    flex-shrink: 0;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: #a5b4fc;
    text-decoration: none;
    margin: 0 0.6rem;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #c7d2fe;
}

.icp-info {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.icp-info a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted #64748b;
}

.icp-info a:hover {
    color: white;
    border-bottom: 1px solid white;
}

.copyright {
    font-size: 0.75rem;
    margin-top: 1rem;
    opacity: 0.7;
}

/* 响应式 */
@media (max-width: 680px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero p {
        max-width: 100%;
    }
    
    .hero h2 {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .notes-list {
        overflow-x: auto;
    }
}
