/* 全局设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #fdfbfb, #ebedee);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px;
}

/* 头部区域 */
header {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header h1 {
    font-size: 2.5em;
    color: #4a90e2;
    font-weight: 700;
}

/* 搜索栏 */
.search-bar {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    background: #f9f9f9;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}

.search-bar .material-icons {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

/* 导航菜单 */
.nav-categories {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.nav-categories li a {
    display: block;
    text-decoration: none;
    color: #4a90e2;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 25px;
    background: #f1f6fa;
    transition: all 0.3s ease;
}

.nav-categories li.active a,
.nav-categories li a:hover {
    background: #4a90e2;
    color: #fff;
}

/* 主体内容 */
main {
    min-height: 60vh;
}

.nav-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* 卡片样式 */
.nav-item {
    display: flex;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease; /* 添加背景色的平滑过渡 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: #e6ffe6; /* 浅绿色背景 */
}

.nav-content {
    display: flex;
    align-items: center;
    padding: 20px;
    width: 100%;
}

.nav-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4a90e2;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.nav-icon .material-icons {
    color: #fff;
    font-size: 24px;
}

.nav-text h2 {
    font-size: 1.5em;
    color: #4a90e2;
    margin-bottom: 5px;
    font-weight: 600;
}

.nav-text p {
    color: #777;
    font-size: 0.95em;
    line-height: 1.4;
}

.no-results {
    text-align: center;
    color: #777;
    font-size: 1.2em;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 10px;
}

/* 底部 */
footer {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    color: #4a90e2;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .search-bar {
        max-width: 100%;
    }

    .nav-categories {
        gap: 8px;
    }

    .nav-item {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2em;
    }

    .nav-text h2 {
        font-size: 1.3em;
    }
}