/* ===== 全局样式 ===== */
:root {
    --primary-color: #2563eb;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #e5e5e5;
    --bg-color: #f5f5f5;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

body {
    background-color: var(--bg-color);
    min-height: 100vh;
}

/* ===== PC端顶部导航 ===== */
.navlist-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    display: block;
}

.navlist-header .container {
    display: flex;
    align-items: center;
    height: 60px;
    max-width: 1200px;
}

.header-left {
    flex-shrink: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.header-nav {
    display: flex;
    margin-left: 30px;
}

.header-nav a {
    padding: 0 15px;
    height: 60px;
    line-height: 60px;
    color: var(--text-color);
    transition: color 0.3s;
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--primary-color);
}

.header-search {
    margin-left: auto;
}

.header-search form {
    display: flex;
}

.header-search input {
    width: 200px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.header-search input:focus {
    border-color: var(--primary-color);
}

.header-search button {
    width: 60px;
    height: 36px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ===== 移动端顶部导航 ===== */
.mobile-header {
    display: none;
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 15px;
}

.mobile-logo a {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-color);
    border-radius: 1px;
}

.mobile-search-btn {
    color: var(--text-color);
}

/* 移动端搜索框 */
.mobile-search-box {
    display: none;
    padding: 10px 15px;
    background: var(--white);
    border-top: 1px solid var(--border-color);
}

.mobile-search-box form {
    display: flex;
}

.mobile-search-box input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius) 0 0 var(--radius);
    outline: none;
}

.mobile-search-box button {
    width: 60px;
    height: 36px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
}

.mobile-menu-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 280px;
    height: 100%;
    background: var(--white);
    transform: translateX(-100%);
    transition: transform 0.3s;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu.open .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header .close-btn {
    font-size: 24px;
    cursor: pointer;
}

.mobile-menu-content a {
    display: block;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.mobile-menu-content a.active {
    color: var(--primary-color);
    background: #f0f0f0;
}

/* ===== 主内容区 ===== */
.navlist-main {
    min-height: calc(100vh - 120px);
}

/* ===== 搜索区域 ===== */
.search-section {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    padding: 60px 0;
    text-align: center;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 10px;
}

.search-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-form input {
    flex: 1;
    height: 50px;
    padding: 0 20px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-form button {
    width: 100px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1rem;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #1d4ed8;
}

/* ===== 常用网站 ===== */
.hot-sites-section {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
}

.hot-sites-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.hot-site-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.hot-site-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hot-site-item .site-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.hot-site-item .site-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.hot-site-item .site-name {
    font-size: 0.85rem;
    color: var(--text-color);
    text-align: center;
}

/* ===== 分类区块 ===== */
.categories-section {
    padding: 20px 0 40px;
}

.category-block {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.category-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}

.more-link {
    font-size: 0.85rem;
    color: var(--primary-color);
}

.more-link:hover {
    text-decoration: underline;
}

/* 子分类标签 */
.sub-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.sub-tab {
    padding: 6px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.sub-tab:hover {
    color: var(--primary-color);
    background: #e6f7ff;
}

.sub-tab.active {
    color: var(--white);
    background: var(--primary-color);
}

/* 子分类内容 */
.sub-category-content {
    display: none;
}

.sub-category-content.active {
    display: block;
}

/* 网站列表 */
.sites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.site-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9f9f9;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.site-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.site-item .site-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 12px;
}

.site-item .site-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.site-item .site-info {
    flex: 1;
    min-width: 0;
}

.site-item .site-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 2px;
}

.site-item .site-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 网站卡片网格 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.site-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: #f9f9f9;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.site-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.site-card .site-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.site-card .site-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.site-card .site-info {
    text-align: center;
    width: 100%;
}

.site-card .site-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.site-card .site-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 空状态 */
.empty-state {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    color: var(--text-light);
}

/* ===== Footer ===== */
.navlist-footer {
    background: var(--white);
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    display: inline-block;
    padding: 0 15px;
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright p {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== 响应式适配 ===== */
@media (max-width: 1024px) {
    .hot-sites-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .navlist-header {
        display: none;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .search-section {
        padding: 40px 0;
    }

    .search-title {
        font-size: 1.8rem;
    }

    .search-form {
        flex-direction: column;
        border-radius: var(--radius);
    }

    .search-form input {
        height: 44px;
        border-radius: var(--radius) var(--radius) 0 0;
    }

    .search-form button {
        width: 100%;
        height: 44px;
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .hot-sites-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .hot-site-item {
        padding: 10px;
    }

    .hot-site-item .site-icon {
        width: 36px;
        height: 36px;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sites-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .site-card {
        padding: 15px 10px;
    }

    .site-card .site-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hot-sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sites-list {
        grid-template-columns: 1fr;
    }

    .sub-category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .sub-tab {
        flex-shrink: 0;
    }
}