.bf-search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.bf-search-modal.show {
    display: block;
}

.bf-search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.bf-search-modal.show .bf-search-overlay {
    opacity: 1;
}

.bf-search-content {
    position: relative;
    background: #fff;
    border-radius: 0 0 20px 20px;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow: hidden;
}

.bf-search-modal.show .bf-search-content {
    transform: translateY(0);
}

.bf-search-header {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.bf-search-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.bf-search-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bf-search-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    color: #666;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bf-search-close:hover {
    background: #e8e8e8;
    color: #333;
}

.bf-search-form {
    display: flex;
    gap: 10px;
    padding: 0 20px 15px;
}

.bf-search-input-wrap {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.bf-search-input-wrap:focus-within {
    border-color: #dc3544;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(220, 53, 68, 0.1);
}

.bf-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.bf-search-input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: none;
    background: none;
    font-size: 15px;
    color: #333;
    outline: none;
}

.bf-search-input::placeholder {
    color: #999;
}

.bf-search-submit {
    padding: 0 28px;
    background: linear-gradient(135deg, #dc3544 0%, #c82333 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 53, 68, 0.3);
}

.bf-search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 68, 0.4);
}

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

.bf-search-body {
    padding: 20px;
    max-height: calc(80vh - 120px);
    overflow-y: auto;
}

.bf-search-section {
    margin-bottom: 25px;
}

.bf-search-section:last-child {
    margin-bottom: 0;
}

.bf-search-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bf-search-section-title i {
    color: #dc3544;
    font-size: 14px;
}

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

.bf-search-tag {
    padding: 8px 16px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.bf-search-tag:hover {
    background: #fff;
    color: #dc3544;
    border-color: #dc3544;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(220, 53, 68, 0.15);
}

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

.dark .bf-search-content {
    background: #1a1a1a;
}

.dark .bf-search-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark .bf-search-title {
    color: #fff;
}

.dark .bf-search-close {
    background: #2a2a2a;
    color: #888;
}

.dark .bf-search-close:hover {
    background: #333;
    color: #fff;
}

.dark .bf-search-input-wrap {
    background: #2a2a2a;
}

.dark .bf-search-input-wrap:focus-within {
    background: #2a2a2a;
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

.dark .bf-search-icon {
    color: #666;
}

.dark .bf-search-input {
    color: #ccc;
}

.dark .bf-search-input::placeholder {
    color: #666;
}

.dark .bf-search-section-title {
    color: #fff;
}

.dark .bf-search-tag {
    background: #2a2a2a;
    color: #888;
}

.dark .bf-search-tag:hover {
    background: #1a1a1a;
    color: #f87171;
    border-color: #f87171;
}

.bf-search-tabs {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 10px;
}

.bf-search-tabs li {
    margin: 0;
}

.bf-search-tabs li a {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0;
}

.bf-search-tabs li a:hover {
    color: #dc3544;
    background: #fff;
}

.bf-search-tabs li a.active {
    color: #fff;
    background: #dc3544;
}

.dark .bf-search-tabs {
    background: #2a2a2a;
}

.dark .bf-search-tabs li a {
    color: #888;
}

.dark .bf-search-tabs li a:hover {
    color: #f87171;
    background: #333;
}

.dark .bf-search-tabs li a.active {
    color: #fff;
    background: #f87171;
}

@media (max-width: 768px) {
    .bf-search-content {
        border-radius: 0;
        max-height: 90vh;
    }
    
    .bf-search-header-top {
        padding: 12px 15px;
    }
    
    .bf-search-form {
        flex-direction: column;
        padding: 0 15px 12px;
    }
    
    .bf-search-submit {
        padding: 14px;
    }
    
    .bf-search-body {
        padding: 15px;
        max-height: calc(90vh - 140px);
    }
    
    .bf-search-tag {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    .bf-search-tabs li a {
        padding: 6px 12px;
        font-size: 12px;
    }
}