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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f7f8fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* 卡片列表 */
.node-list{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    align-items: stretch;
}
.node-box {
    display: flex;          /* 关键：内部用 flex 撑开 */
    flex-direction: column;
    height: 100%;           /* 填满 Grid 格子 */
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}
.node-box:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #3b7ddd;
    transform: translateY(-2px);
}

/* ===== 图标 ===== */
.node-icon {
    margin-top: 20px;
    text-align: center;
    font-size: 45px;
    flex-shrink: 0;         /* 不被压缩 */
}

/* ===== 标题 ===== */
.node-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #4f4f4f;
    padding: 10px 12px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
/* ===== 描述区（核心：固定高度 + 省略） ===== */
.node-desc {
    color: #7f7f7f;
    font-size: 14px;
    line-height: 22px;
    padding: 0 14px;
    text-align: left;
    
    /* 固定高度 = 3行 × 22px = 66px */
    height: 66px;
    flex-shrink: 0;
    
    /* 多行省略 */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ===== 使用按钮 ===== */
.node-use {
    width: 50%;
    margin: 16px auto;   /* 上间距固定 */
    border: 1px solid #ccc;
    height: 37px;
    line-height: 37px;
    font-size: 14px;
    text-align: center;
    border-radius: 50px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.node-use:hover {
    background: #3b7ddd;
    border-color: #3b7ddd;
}

.node-use:hover a {
    color: #fff;
}

/* ===== 底部分类标签 ===== */
.node-class {
    color: #9f9f9f;
    font-size: 12px;
    height: 40px;
    line-height: 40px;
    margin-top: auto;        /* 关键：推到卡片最底部 */
    border-top: 1px solid #e2e2e2;
    padding: 0 14px;
    text-align: left;
    flex-shrink: 0;
}

/* 链接 */
.node-use a,
.node-class a {
    color: #9e9e9e;
    display: block;
    text-decoration: none;
}

/* 顶部导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 0 48px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar .logo span {
    color: #4f6ef7;
}

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

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: #f0f2ff;
    color: #4f6ef7;
}

.nav-links a.active {
    background: #4f6ef7;
    color: #fff;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero-section h1 span {
    color: #4f6ef7;
}

.hero-section p {
    font-size: 18px;
    color: #888;
    max-width: 520px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

/* 导航卡片网格 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.nav-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(79, 110, 247, 0.12);
}

.nav-card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-card h3 {
    font-size: 17px;
    font-weight: 600;
}

.nav-card p {
    font-size: 14px;
    color: #999;
    line-height: 1.5;
}

/* 不同卡片的图标颜色 */
.nav-card:nth-child(1) .card-icon { background: #eef2ff; }
.nav-card:nth-child(2) .card-icon { background: #fff7ed; }
.nav-card:nth-child(3) .card-icon { background: #f0fdf4; }
.nav-card:nth-child(4) .card-icon { background: #fdf2f8; }
.nav-card:nth-child(5) .card-icon { background: #f0f9ff; }
.nav-card:nth-child(6) .card-icon { background: #fefce8; }

/* 页脚 */
.footer {
    text-align: center;
    padding: 24px;
    color: #bbb;
    font-size: 13px;
}

/* 搜索框 */
.search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 6px 8px 6px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    max-width: 480px;
    width: 100%;
    margin: 0 auto 56px;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 10px 0;
    color: #333;
    background: transparent;
}

.search-bar input::placeholder {
    color: #bbb;
}

.search-bar button {
    background: #4f6ef7;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #3b5be0;
}

/* 响应式 */
@media (max-width: 640px) {
    .navbar {
        padding: 0 20px;
    }
    .nav-links {
        display: none;
    }
    .hero-section h1 {
        font-size: 30px;
    }
    .hero-section p {
        font-size: 16px;
    }
    .node-list {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 12px;
    }
}
