/* ==================== GitHub 快速搜索样式 ==================== */

.quick-search-section {
    margin-bottom: 30px;
    /* 与 input-section 一致 */
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    /* 与 input-section 一致 */
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.search-header {
    margin-bottom: 10px;
    /* 与 input-mode label 一致 */
}

.search-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.search-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* 搜索输入框容器 - 现在使用统一的 .input-with-button 类 */
.quick-search-section .input-with-button {
    margin-bottom: 0;
    /* 无搜索结果时不需要底部边距 */
}

/* 搜索结果 */
.search-results {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.results-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-close-results {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-close-results:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

/* 搜索结果项 */
.result-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease backwards;
}

.result-item:nth-child(1) {
    animation-delay: 0.05s;
}

.result-item:nth-child(2) {
    animation-delay: 0.1s;
}

.result-item:nth-child(3) {
    animation-delay: 0.15s;
}

.result-item:nth-child(4) {
    animation-delay: 0.2s;
}

.result-item:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.result-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.result-full-name {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.result-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 8px 0;
    line-height: 1.5;
}

.result-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 加载状态 */
.search-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.search-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.search-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.search-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* 响应式 */
@media (max-width: 768px) {
    .result-meta {
        flex-wrap: wrap;
    }
}