* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.5;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
}

.title {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.subtitle {
    color: #718096;
    font-size: 0.9rem;
}

#loadStatus {
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
    color: #718096;
    margin-top: 5px;
}

.search-box {
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #4299e1;
}

.category {
    margin-bottom: 24px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.category-header {
    background: #f7fafc;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.links-container {
    padding: 16px 20px;
}

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

.link-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 6px;
    text-decoration: none;
    color: #2d3748;
    transition: all 0.2s;
    border: 1px solid transparent;
    gap: 12px;
}

.link-item:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.link-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.link-icon {
    width: 28px;
    height: 28px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.link-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.link-icon .icon-fallback {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: #a0aec0;
    font-size: 0.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .title {
        font-size: 1.5rem;
    }

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

    .category-header {
        padding: 10px 16px;
    }

    .links-container {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}