/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
}

.title {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* 搜索框样式 */
.search-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 25px 0 0 25px;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#search-btn {
    padding: 12px 25px;
    font-size: 16px;
    border: none;
    border-radius: 0 25px 25px 0;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#search-btn:hover {
    background-color: #45a049;
}

/* 主要内容区域 */
.main-content {
    margin-bottom: 40px;
}

/* 导航区域样式 */
.nav-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #667eea;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* 导航网格样式 */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    background-color: #f9f9f9;
}

.nav-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #f0f0f0;
}

.nav-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background-color: #667eea;
    color: white;
}

.nav-text {
    font-size: 13px;
    font-weight: 500;
}

/* 分类导航样式 */
.category-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #f0f0f0;
}

.category-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #667eea;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-link {
    padding: 8px 15px;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    background-color: white;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.category-link:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* 尾部样式 */
.footer {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: #666;
    font-size: 14px;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .title {
        font-size: 1.8rem;
    }

    .search-box {
        padding: 0 10px;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 12px;
    }

    .nav-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .category-nav {
        gap: 15px;
    }

    .category-link {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }

    .nav-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: 10px;
    }

    .nav-item {
        padding: 10px;
    }

    .nav-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .nav-text {
        font-size: 12px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .category-title {
        font-size: 14px;
    }

    .category-link {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-section {
    animation: fadeIn 0.5s ease-out;
}

.nav-item,
.category-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 16px;
    color: #666;
}

/* 搜索结果样式 */
.search-results {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-results h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #667eea;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}