/* 搜索页面样式 */

/* 搜索容器 - 导航栏中的搜索框 */
.search-container {
    position: relative;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 0.3rem 0.4rem;
    box-shadow: 0 2px 6px rgba(135, 206, 235, 0.15);
    transition: all 0.3s;
}

.search-box:hover {
    box-shadow: 0 3px 8px rgba(135, 206, 235, 0.25);
    background: rgba(255, 255, 255, 1);
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    color: #2c5f7c;
    width: 160px;
    transition: width 0.3s;
}

.search-box input:focus {
    width: 200px;
}

.search-box input::placeholder {
    color: #7ba3b8;
    font-size: 0.8rem;
}

.search-btn {
    background: linear-gradient(135deg, #98D8C8 0%, #87CEEB 100%);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(135, 206, 235, 0.3);
}

.search-icon {
    font-size: 1rem;
}

/* 搜索页面头部 */
.search-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e8f4f8;
}

.search-header h1 {
    font-size: 2.5rem;
    color: #2c5f7c;
    margin-bottom: 1rem;
    font-weight: 700;
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #7ba3b8;
    font-size: 1rem;
}

#searchQuery {
    font-size: 1.2rem;
    color: #4a90a4;
    font-weight: 600;
}

#searchStats {
    font-size: 0.9rem;
    color: #7ba3b8;
}

/* 高级搜索筛选 */
.search-filters {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4f8 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.1);
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    color: #2c5f7c;
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.6rem 1rem;
    background: white;
    border-radius: 20px;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(135, 206, 235, 0.1);
}

.filter-option:hover {
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e8f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(135, 206, 235, 0.2);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a90a4;
}

.filter-option span {
    color: #2c5f7c;
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-apply-btn {
    background: linear-gradient(135deg, #98D8C8 0%, #87CEEB 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(135, 206, 235, 0.3);
    margin-top: 1rem;
}

.filter-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(135, 206, 235, 0.4);
}

/* 搜索结果 */
.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.search-result-item {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.15);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.search-result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.25);
    border-color: #87CEEB;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.result-title {
    font-size: 1.3rem;
    color: #2c5f7c;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.result-title a {
    color: #2c5f7c;
    text-decoration: none;
    transition: color 0.3s;
}

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

.result-date {
    color: #7ba3b8;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.result-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.result-category,
.result-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.result-category {
    color: #4a90a4;
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e8f0 100%);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
}

.result-tags {
    color: #7ba3b8;
}

.result-tag {
    background: #f0f8ff;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #4a90a4;
    transition: all 0.3s;
}

.result-tag:hover {
    background: linear-gradient(135deg, #98D8C8 0%, #87CEEB 100%);
    color: white;
}

.result-excerpt {
    color: #5a7a8a;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.result-excerpt mark {
    background: linear-gradient(135deg, #fff59d 0%, #ffe082 100%);
    color: #2c5f7c;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-weight: 600;
}

.result-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e8f4f8;
}

.result-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #7ba3b8;
}

.result-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.result-link {
    color: #4a90a4;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e8f0 100%);
    transition: all 0.3s;
    font-size: 0.9rem;
}

.result-link:hover {
    background: linear-gradient(135deg, #98D8C8 0%, #87CEEB 100%);
    color: white;
    transform: translateX(5px);
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f4f8 100%);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(135, 206, 235, 0.1);
}

.no-results-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.8rem;
    color: #2c5f7c;
    margin-bottom: 1rem;
}

.no-results p {
    color: #7ba3b8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.search-suggestions {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
    box-shadow: 0 2px 10px rgba(135, 206, 235, 0.1);
}

.search-suggestions h4 {
    color: #2c5f7c;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.search-suggestions li {
    padding: 0.6rem 0;
    color: #5a7a8a;
    border-bottom: 1px solid #e8f4f8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-suggestions li:last-child {
    border-bottom: none;
}

.search-suggestions li::before {
    content: '💡';
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        width: 100%;
        margin-left: 0;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
        font-size: 0.85rem;
    }
    
    .search-box input:focus {
        width: 100%;
    }
    
    .search-header h1 {
        font-size: 2rem;
    }
    
    .search-results {
        grid-template-columns: 1fr;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .filter-option {
        width: 100%;
    }
    
    .result-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-date {
        align-self: flex-start;
    }
}

/* 加载动画 */
.search-loading {
    text-align: center;
    padding: 3rem;
    color: #7ba3b8;
}

.search-loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}
