/**
 * DZ论坛采集 + 腾讯云文档聚合搜索系统
 * 样式文件
 */

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f6fa;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== 前台样式 ========== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.nav a {
    color: #fff;
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav a:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: none;
}

.nav a.active {
    background: rgba(255,255,255,0.3);
}

/* 搜索区域 */
.search-box {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input-wrap input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input-wrap input:focus {
    border-color: #667eea;
}

.search-input-wrap button {
    padding: 15px 30px;
    font-size: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-input-wrap button:hover {
    transform: translateY(-2px);
}

.search-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.search-options select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 统计信息 */
.stats {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stats strong {
    color: #667eea;
    font-size: 18px;
}

/* 搜索结果 */
.results {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.result-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    flex-wrap: wrap;
}

.source-badge {
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff;
    font-weight: 500;
}

.source-1 {
    background: #3498db;
}

.source-2 {
    background: #9b59b6;
}

.source-name {
    color: #666;
}

.author {
    color: #999;
}

.time {
    color: #999;
}

.result-title {
    margin-bottom: 10px;
}

.result-title a {
    font-size: 18px;
    color: #2c3e50;
}

.result-title a:hover {
    color: #667eea;
}

.result-title em {
    background: #fff3cd;
    color: #856404;
    font-style: normal;
    padding: 0 2px;
    border-radius: 2px;
}

.result-summary {
    color: #666;
    line-height: 1.8;
}

.result-summary em {
    background: #fff3cd;
    color: #856404;
    font-style: normal;
    padding: 0 2px;
    border-radius: 2px;
}

.no-result {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.no-result p {
    font-size: 18px;
    margin-bottom: 10px;
}

.no-result .tips {
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f0f0f0;
    text-decoration: none;
}

.pagination a.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #999;
    margin-top: 30px;
}

.footer a {
    color: #667eea;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        margin-top: 15px;
    }
    
    .nav a {
        margin: 0 5px;
    }
    
    .search-input-wrap {
        flex-direction: column;
    }
    
    .search-input-wrap button {
        width: 100%;
    }
    
    .stats {
        justify-content: center;
    }
}

/* ========== 后台样式 ========== */
/* 后台样式已在 common.php 中定义 */
