/* 搜索页面样式 */

.search-page {
    background: #f8fafc;
    min-height: 100vh;
    padding: 20px 0;
}

/* 搜索头部 */
.search-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-box-large .search-form {
    display: flex;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-btn {
    padding: 16px 30px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background: #4338ca;
}

.search-info {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

.search-info strong {
    color: #1f2937;
}

/* 搜索建议样式 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.suggestions-list {
    padding: 8px 0;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: #f3f4f6;
}

.suggestion-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #6b7280;
}

.suggestion-content {
    flex: 1;
}

.suggestion-text {
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}

.suggestion-text mark {
    background: #fef3c7;
    color: #92400e;
    padding: 0 2px;
    border-radius: 2px;
}

.suggestion-type {
    font-size: 12px;
    color: #6b7280;
}

.suggestion-action {
    color: #9ca3af;
    font-size: 14px;
}

/* 搜索历史样式 */
.search-history {
    padding: 8px 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.history-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.clear-history {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.clear-history:hover {
    color: #dc2626;
    background: #fef2f2;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-item:hover {
    background: #f3f4f6;
}

.history-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #9ca3af;
    font-size: 12px;
}

.history-text {
    flex: 1;
    font-size: 14px;
    color: #4b5563;
}

.history-action {
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .history-action {
    opacity: 1;
}

.remove-history {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
}

.remove-history:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* 高级筛选 */
.advanced-filters {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.filter-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-header h3 i {
    color: #4f46e5;
}

.toggle-filters {
    background: none;
    border: none;
    color: #4f46e5;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.toggle-filters:hover {
    background: #eef2ff;
}

.filter-content {
    padding: 25px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.filter-select {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #1f2937;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-primary {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.btn-primary:hover {
    background: #4338ca;
    border-color: #4338ca;
}

.btn-outline {
    background: white;
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    color: #4f46e5;
    border-color: #4f46e5;
}

/* 搜索筛选标签 */
.search-filters {
    background: white;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tab {
    padding: 12px 20px;
    background: #f9fafb;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.filter-tab:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.filter-tab.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* 搜索结果 */
.search-results {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-section {
    border-bottom: 1px solid #f3f4f6;
    padding: 30px;
}

.result-section:last-child {
    border-bottom: none;
}

.section-title {
    margin: 0 0 25px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #4f46e5;
    font-size: 16px;
}

.search-result-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: transform 0.2s;
    border: 1px solid #f3f4f6;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-result-item:last-child {
    margin-bottom: 0;
}

/* 医生结果样式 */
.doctor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 24px;
}

/* 文章结果样式 */
.article-image {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 结果内容 */
.result-content {
    flex: 1;
}

.result-title {
    color: #1f2937;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
    transition: color 0.2s;
}

.result-title:hover {
    color: #4f46e5;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #6b7280;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-meta i {
    font-size: 12px;
    color: #9ca3af;
}

.result-description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 15px;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
}

/* 标签样式 */
.hospital-level,
.doctor-title,
.disease-category {
    background: #4f46e5;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.rating {
    color: #f59e0b !important;
}

.rating i {
    color: #f59e0b !important;
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 60px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.no-results-icon {
    width: 80px;
    height: 80px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #9ca3af;
    font-size: 32px;
}

.no-results h3 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 20px;
}

.no-results p {
    color: #6b7280;
    margin-bottom: 30px;
}

.search-suggestions-tips {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-suggestions-tips h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 16px;
}

.search-suggestions-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #6b7280;
}

.search-suggestions-tips li {
    margin-bottom: 5px;
}

/* 热门搜索 */
.popular-searches {
    margin-top: 30px;
}

.popular-searches h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 16px;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-tag:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-1px);
}

.search-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

.hot-search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    text-decoration: none;
    color: #4b5563;
    transition: all 0.2s;
    border: 1px solid #f3f4f6;
}

.hot-search-item:hover {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.hot-search-item.top-rank {
    background: linear-gradient(45deg, #f59e0b, #f97316);
    color: white;
    border-color: #f59e0b;
}

.hot-search-item .rank {
    font-weight: 700;
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hot-search-item .keyword {
    flex: 1;
    font-size: 14px;
}

.hot-badge {
    background: #ef4444;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* 搜索提示页面 */
.search-tips {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tips-content h3 {
    text-align: center;
    margin: 0 0 30px 0;
    color: #1f2937;
    font-size: 24px;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.tip-item {
    text-align: center;
    padding: 25px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #f3f4f6;
}

.tip-item i {
    font-size: 32px;
    color: #4f46e5;
    margin-bottom: 15px;
}

.tip-item h4 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 16px;
}

.tip-item p {
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.5;
}

.tip-item .example {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

/* 分页样式 */
.pagination-wrapper {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-page {
        padding: 10px 0;
    }
    
    .search-header {
        padding: 20px;
    }
    
    .search-box-large .search-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .search-result-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .doctor-avatar,
    .article-image {
        align-self: center;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-tags {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-header {
        padding: 15px;
    }
    
    .result-section {
        padding: 20px;
    }
    
    .search-result-item {
        padding: 15px;
    }
    
    .filter-content {
        padding: 20px;
    }
}