/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* 页面标题 */
h1 {
    text-align: center;
    color: white;
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* 搜索区域容器 */
.search-container {
    max-width: 900px;
    margin: 0 auto 30px;
    padding: 20px 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 引擎按钮容器 */
.engine-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: center;
}

@media (max-width: 768px) {
    .engine-buttons {
        gap: 4px;
    }
}

/* 搜索框 */
.search-box {
    flex: 1;
    margin-bottom: 0;
}

#keyword {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
    background: #fafafa;
}

#keyword:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 引擎按钮 */
.engine-btn {
    display: inline-block;
    padding: 10px 22px;
    margin: 5px;
    border: 2px solid #667eea;
    border-radius: 25px;
    background: white;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
}

.engine-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.engine-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 搜索结果容器 */
#tableResult {
    max-width: 900px;
    margin: 0 auto;
}

/* 搜索结果卡片 */
.result-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

/* 结果标题 */
.result-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
    line-height: 1.5;
    transition: color 0.3s;
}

.result-title:hover {
    color: #667eea;
}

/* 结果元信息 */
.result-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-meta::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
}

/* 标签 */
.result-tags {
    margin: 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 100%);
    border-radius: 15px;
    font-size: 12px;
    color: #666;
    transition: all 0.3s;
}

.tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

/* 下载按钮 */
.download-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
}

.pagination button {
    padding: 10px 24px;
    margin: 0 8px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pagination button:active {
    transform: translateY(0);
}

#pageInfo {
    margin: 0 15px;
    font-size: 15px;
    color: white;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    /* 搜索区域：纵向排列 */
    .search-container {
        flex-direction: column;
        padding: 15px;
        gap: 12px;
    }
    
    .search-box {
        width: 100%;
    }
    
    #keyword {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    /* 引擎按钮：保持一排 */
    .engine-btn {
        display: inline-block;
        width: auto;
        padding: 6px 8px;
        margin: 2px;
        font-size: 11px;
        text-align: center;
        white-space: nowrap;
    }
    
    /* 结果卡片 */
    .result-item {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .result-title {
        font-size: 14px;
    }
    
    .result-meta {
        font-size: 12px;
        flex-direction: column;
        gap: 4px;
    }
    
    /* 标签改小 */
    .tag {
        padding: 3px 10px;
        font-size: 11px;
    }
    
    /* 下载按钮：全宽 */
    .download-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 13px;
    }
    
    /* 分页按钮改小 */
    .pagination button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    #pageInfo {
        font-size: 13px;
        margin: 0 10px;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item {
    animation: fadeIn 0.3s ease-out;
}