/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e1e8ed;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.site-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.site-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 导航栏样式 */
.nav {
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 10px;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--secondary-color);
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 250px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--secondary-color);
}

/* 主内容区域 */
.main {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

.section {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 欢迎区域 */
.welcome {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.welcome h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* 笔记网格 */
.recent-notes h3,
.section h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.note-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.note-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.note-card .note-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.note-card .note-excerpt {
    color: #555;
    line-height: 1.6;
}

.note-card .category-tag {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* 分类卡片 */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.category-card p {
    color: #666;
    margin-bottom: 15px;
}

.category-card .note-count {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
}

/* 关于页面 */
.about-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-content p {
    margin-bottom: 15px;
}

.about-content ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.about-content li {
    margin-bottom: 8px;
}

.disclaimer {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 5px;
}

/* 页脚 */
.footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
}

.footer .icp {
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.75;
}

.footer .icp a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer .icp a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer .icp .separator {
    margin: 0 10px;
    opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .site-title {
        font-size: 1.8rem;
    }

    .nav .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-list {
        gap: 15px;
    }

    .search-box input {
        width: 100%;
    }

    .notes-grid,
    .categories {
        grid-template-columns: 1fr;
    }
}
