/* 全局搜索弹出层样式 */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.search-overlay.active {
    display: block;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.search-overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: overlayContentIn 0.3s ease;
}

@keyframes overlayContentIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.search-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.search-overlay-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.search-overlay-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
    font-size: 16px;
}

.search-overlay-close:hover {
    background: #e0e0e8;
    color: #333;
}

.search-overlay-body {
    padding: 20px 24px 24px;
}

.search-overlay-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-tab {
    padding: 8px 20px;
    border: 2px solid #e0e0e8;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.search-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: #fff;
}

.search-tab i {
    font-size: 14px;
}

.search-overlay-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.search-overlay-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e8;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    color: #333;
    background: #f8f9fa;
}

.search-overlay-input:focus {
    border-color: #667eea;
    background: #fff;
}

.search-overlay-input::placeholder {
    color: #aaa;
}

.search-overlay-submit {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.search-overlay-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.search-overlay-submit:active {
    transform: translateY(0);
}

.search-overlay-suggestions {
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestion-hint {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    color: #333;
    font-size: 14px;
}

.search-suggestion-item:hover {
    background: #f0f0f8;
}

.search-suggestion-item i {
    color: #667eea;
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.search-suggestion-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 热门标签样式 */
.search-overlay-hot-tags {
    margin-bottom: 16px;
}

.hot-tags-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.hot-tags-header i {
    color: #ff6b6b;
    font-size: 14px;
}

.hot-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #f0f0f8;
    border-radius: 15px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.hot-tag-item:hover {
    background: #e8e8ff;
    color: #667eea;
    border-color: #667eea;
    transform: translateY(-1px);
}

.hot-tag-item i {
    font-size: 12px;
    color: #667eea;
}

/* 滚动条样式 */
.search-overlay-suggestions::-webkit-scrollbar {
    width: 4px;
}

.search-overlay-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-overlay-suggestions::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

/* 响应式 */
@media (max-width: 768px) {
    .search-overlay-content {
        width: 95%;
        border-radius: 12px;
    }

    .search-overlay-header {
        padding: 16px 16px 0;
    }

    .search-overlay-body {
        padding: 16px;
    }

    .search-overlay-title {
        font-size: 18px;
    }

    .search-overlay-input {
        font-size: 14px;
        padding: 10px 14px;
    }

    .search-overlay-submit {
        padding: 10px 16px;
        font-size: 14px;
    }

    .search-tab {
        padding: 6px 14px;
        font-size: 13px;
    }
}