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

:root {
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --primary-light: #40a9ff;
    --secondary: #52c41a;
    --accent: #1890ff;
    --bg-main: #f0f2f5;
    --bg-card: #ffffff;
    --bg-hover: #fafafa;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-muted: #8c8c8c;
    --border-color: #e8e8e8;
    --border-hover: #1890ff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* 顶部导航栏 - 导航网站风格 */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

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

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(24, 144, 255, 0.1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* 搜索区域 - 导航网站特色 */
.search-section {
    background: var(--bg-card);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    flex: 1;
    height: 48px;
    padding: 0 20px;
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

.search-btn {
    height: 48px;
    padding: 0 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.search-tips {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* 主容器 */
.main-wrapper {
    padding: 0;
    background: var(--bg-main);
}

/* 介绍区块 */
.intro-section {
    padding: 60px 0;
    background: var(--bg-card);
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
}

.intro-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.intro-text p {
    margin-bottom: 20px;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

/* 分类导航区块 */
.categories-section {
    padding: 60px 0;
    background: var(--bg-main);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.category-card:hover .category-icon {
    border-color: var(--primary);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.category-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.category-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.category-link:hover {
    color: var(--primary-dark);
}

/* 链接列表区块 */
.links-section {
    padding: 60px 0;
    background: var(--bg-card);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.link-item {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.link-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.link-card {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    gap: 16px;
}

.link-icon {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.link-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.link-content {
    flex: 1;
    min-width: 0;
}

.link-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.link-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-tag {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(24, 144, 255, 0.1);
    color: var(--primary);
    font-weight: 500;
}

/* 页面标题 */
.page-header {
    background: var(--bg-card);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-muted);
}

/* 内容区块 */
.content-section {
    padding: 50px 0;
    background: var(--bg-card);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.3;
}

.content-image {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
}

.content-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.content-text p {
    margin-bottom: 20px;
}

.content-text p:last-child {
    margin-bottom: 0;
}

/* 页脚 */
.main-footer {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 50px 0 25px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 500px;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.footer-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.footer-column {
    flex: 1;
}

.footer-heading {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-list {
    list-style: none;
}

.footer-list li {
    margin-bottom: 10px;
}

.footer-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

@media (max-width: 768px) {
    .nav-list {
        position: fixed;
        top: 64px;
        left: -100%;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-md);
        transition: left 0.3s;
        z-index: 999;
        border-top: 1px solid var(--border-color);
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item {
        display: block;
        padding: 12px 0;
        border-radius: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .search-box {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
    }

    .section-title {
        font-size: 28px;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }

    .content-title {
        font-size: 28px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
