/* ====== 搜索页面专用样式 ====== */

/* 搜索头部 */
.search-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.search-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .search-title {
        font-size: 1.8rem;
    }
}

/* 搜索框区域 */
.search-box {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
}

.search-form {
    display: flex;
    margin-bottom: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px 0 0 12px;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-btn {
    padding: 0 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0 12px 12px 0;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.search-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

/* 搜索结果信息 */
.search-results-info {
    text-align: center;
    padding: 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.search-results-info p {
    font-size: 1.1rem;
    color: #4a5568;
    margin: 0;
}

.search-results-info strong {
    color: #667eea;
    font-weight: 700;
}

/* 搜索介绍页面 */
.search-intro {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin: 2rem auto;
    max-width: 800px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.search-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-intro h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 700;
}

.search-intro p {
    font-size: 1.1rem;
    color: #718096;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* 热门搜索 */
.popular-searches {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid #f7fafc;
}

.popular-searches p {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.popular-tags a {
    padding: 0.7rem 1.5rem;
    background: white;
    border-radius: 50px;
    color: #4a5568;
    font-size: 0.95rem;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-tags a::before {
    content: '🔍';
    font-size: 0.9rem;
    opacity: 0.7;
}

.popular-tags a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

/* 空搜索结果 */
.empty-search {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin: 2rem auto;
    max-width: 800px;
    border: 2px dashed #e2e8f0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: #cbd5e0;
}

.empty-search h3 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 700;
}

.empty-search p {
    font-size: 1.1rem;
    color: #718096;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.empty-search strong {
    color: #667eea;
    font-weight: 700;
}

/* 搜索建议 */
.suggestions {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.suggestions p {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 1rem;
}

.suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions li {
    padding: 0.5rem 0;
    color: #718096;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.suggestions li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.suggestions li a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.suggestions li a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 搜索结果网格 */
.search-results {
    margin-top: 2rem;
}

/* 分页 */
.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f7fafc;
}

.pagination-prev,
.pagination-next,
.pagination-number {
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    color: #4a5568;
    border: 2px solid #e2e8f0;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    background: white;
}

.pagination-prev:hover,
.pagination-next:hover,
.pagination-number:hover {
    background: #f8f9fa;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.pagination-number.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.pagination-ellipsis {
    color: #a0aec0;
    padding: 0 0.5rem;
    font-size: 1.2rem;
}

/* 搜索提示 */
.search-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(245, 202, 153, 0.1) 0%, rgba(254, 215, 170, 0.1) 100%);
    border-radius: 10px;
    border-left: 4px solid #ed8936;
    font-size: 0.9rem;
    color: #718096;
}

.search-tips p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-tips p::before {
    content: '💡';
    font-size: 1rem;
}

/* 错误提示 */
.alert-error {
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, rgba(254, 178, 178, 0.1) 0%, rgba(254, 215, 215, 0.1) 100%);
    color: #c53030;
    border: 2px solid #fc8181;
    font-weight: 500;
}

.alert-error::before {
    content: '⚠️';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-box {
        padding: 1.2rem;
        border-radius: 12px;
    }
    
    .search-form {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .search-input {
        border-radius: 12px;
        padding: 0.9rem 1.2rem;
    }
    
    .search-btn {
        border-radius: 12px;
        padding: 0.9rem;
        width: 100%;
    }
    
    .popular-tags {
        gap: 0.5rem;
    }
    
    .popular-tags a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .search-pagination {
        flex-wrap: wrap;
    }
    
    .search-intro,
    .empty-search {
        padding: 2.5rem 1.5rem;
        margin: 1.5rem auto;
    }
}

@media (max-width: 480px) {
    .search-title {
        font-size: 1.5rem;
    }
    
    .search-icon,
    .empty-icon {
        font-size: 3rem;
    }
    
    .search-intro h3,
    .empty-search h3 {
        font-size: 1.5rem;
    }
    
    .search-results-info p {
        font-size: 1rem;
    }
    
    .suggestions {
        padding: 1rem;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .search-title {
        background: linear-gradient(135deg, #7c9bf5 0%, #9d7cf5 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .search-box {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
        border-color: rgba(124, 155, 245, 0.2);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .search-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .search-input:focus {
        border-color: #7c9bf5;
        box-shadow: 0 0 0 4px rgba(124, 155, 245, 0.2);
    }
    
    .search-intro,
    .empty-search {
        background: #2d3748;
        border-color: #4a5568;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .search-intro h3,
    .empty-search h3 {
        color: #f7fafc;
    }
    
    .search-intro p,
    .empty-search p {
        color: #cbd5e0;
    }
    
    .popular-tags a {
        background: #2d3748;
        color: #cbd5e0;
        border-color: #4a5568;
    }
    
    .popular-tags a:hover {
        background: linear-gradient(135deg, #7c9bf5 0%, #9d7cf5 100%);
        color: #ffffff;
        border-color: transparent;
    }
    
    .suggestions {
        background: #4a5568;
        border-color: #718096;
    }
    
    .suggestions p {
        color: #e2e8f0;
    }
    
    .suggestions li {
        color: #cbd5e0;
    }
    
    .search-results-info {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
        border-color: #4a5568;
    }
    
    .search-results-info p {
        color: #e2e8f0;
    }
    
    .alert-error {
        background: linear-gradient(135deg, rgba(254, 178, 178, 0.15) 0%, rgba(254, 215, 215, 0.15) 100%);
        border-color: #fc8181;
        color: #fed7d7;
    }
    
    .pagination-prev,
    .pagination-next,
    .pagination-number {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .pagination-prev:hover,
    .pagination-next:hover,
    .pagination-number:hover {
        background: #4a5568;
        border-color: #718096;
    }
    
    .search-tips {
        background: linear-gradient(135deg, rgba(237, 137, 54, 0.15) 0%, rgba(251, 211, 141, 0.15) 100%);
        border-color: #ed8936;
        color: #e2e8f0;
    }
}