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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #3498db;
}

.search-bar {
    display: flex;
    gap: 10px;
    flex: 0 0 500px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
}

.search-btn {
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* 分类导航样式 */
.category-nav {
    margin-bottom: 30px;
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-list {
    display: flex;
    gap: 10px;
    list-style: none;
    overflow-x: auto;
    padding-bottom: 5px;
}

.category-list::-webkit-scrollbar {
    height: 6px;
}

.category-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.category-item {
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    background-color: #f5f7fa;
}

.category-item:hover {
    background-color: #e1e5e9;
}

.category-item.active {
    background-color: #3498db;
    color: white;
}

/* 网站卡片区域样式 */
.website-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.website-section {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 10px;
}

.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.website-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #f5f7fa;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.website-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* 为不同网站设置不同的图标颜色 */
.website-card:nth-child(6n+1) .website-icon { background-color: #3498db; }
.website-card:nth-child(6n+2) .website-icon { background-color: #e74c3c; }
.website-card:nth-child(6n+3) .website-icon { background-color: #2ecc71; }
.website-card:nth-child(6n+4) .website-icon { background-color: #f39c12; }
.website-card:nth-child(6n+5) .website-icon { background-color: #9b59b6; }
.website-card:nth-child(6n+6) .website-icon { background-color: #1abc9c; }

.website-name {
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
}

/* 底部样式 */
.footer {
    margin-top: 50px;
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

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

    .search-bar {
        width: 100%;
        flex: none;
    }

    .website-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .website-icon {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header,
    .category-nav,
    .website-section {
        padding: 15px;
    }

    .logo {
        font-size: 24px;
    }

    .search-input,
    .search-btn {
        font-size: 14px;
        padding: 10px 16px;
    }

    .website-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}