/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
    --primary-color: #0078d4;
    --primary-light: #00a2ff;
    --primary-dark: #005499;
    --secondary-color: #f8f9fa;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #f5f7fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --header-height: 64px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --wechat-green: #07C160;
    --wechat-green-hover: #06AD56;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.slogan {
    color: var(--text-light);
    font-size: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    background: var(--card-bg);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    width: 300px;
    height: 44px;
    border: 1px solid var(--border-color);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 0 20px;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-light);
}

.contact-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-btn:hover {
    background-color: var(--primary-light);
}

/* 分类导航 */
.categories-wrapper {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: 16px;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.category {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    flex: 0 0 auto;
}

.category:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: rgba(0, 120, 212, 0.05);
}

.category.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.category-icon {
    font-size: 16px;
    opacity: 0.8;
}

.category-name {
    font-weight: 500;
    font-size: 14px;
}

/* 主内容区 */
main {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    min-height: 600px;
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.site-card {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.site-content {
    padding: 20px;
}

.site-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-url {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 12px;
    word-break: break-all;
    opacity: 0.8;
}

.site-desc {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.site-link {
    display: block;
    padding: 8px 0;
    background: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    margin-top: 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.site-link:hover {
    background: var(--primary-light);
}

/* 无结果提示 */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: var(--text-light);
    font-size: 16px;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
}

/* 页脚 */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-content p {
    color: var(--text-light);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* 二维码弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 400px;
    max-width: 90%;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

.qrcode-container {
    text-align: center;
    margin-top: 20px;
}

.qrcode-container img.qrcode-image {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    display: block;
    background-color: white;
}

.qrcode-container h2 {
    color: var(--text-color);
    margin-bottom: 16px;
    font-size: 20px;
}

.qrcode-text {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.qrcode-info {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 12px;
    margin-bottom: 16px;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.wechat-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--wechat-green);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.wechat-link:hover {
    background-color: var(--wechat-green-hover);
}

.wechat-link i, .page-link i {
    margin-right: 8px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: var(--border-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        margin-top: 16px;
        width: 100%;
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
    
    .site-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .categories {
        justify-content: center;
    }
    
    .category {
        width: calc(50% - 8px);
        justify-content: center;
    }

    .modal-content {
        width: 90%;
        padding: 20px;
    }

    .qrcode-container img.qrcode-image {
        width: 180px;
        height: 180px;
    }
} 