/* 移动端搜索下拉样式 */

/* 覆盖原始mini-search样式 */
.mini-search {
    display: block !important;
    padding: 0 !important;
    width: 100% !important;
    background: transparent !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    overflow: visible !important;
    z-index: 99999 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.search-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-trigger:hover {
    transform: scale(1.1);
    color: #4f46e5;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99998;
    pointer-events: none;
}

.search-dropdown {
    position: fixed;
    top: 65px;
    left: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ffffff, #f8f9ff);
    border-radius: 20px;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(79, 70, 229, 0.15);
    max-height: calc(100vh - 85px);
    overflow-y: auto;
    pointer-events: none;
}

body.night .search-dropdown {
    background: linear-gradient(135deg, #2d2f30, #37393a);
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(79, 70, 229, 0.1);
}

.search-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

body.night .search-title {
    color: #e5e7eb;
}

.search-title i {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 20px;
}

.search-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: #4f46e5;
    color: white;
    transform: rotate(90deg);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 4px;
    box-shadow: 0 2px 12px rgba(79, 70, 229, 0.08);
    border: 2px solid rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
}

body.night .search-input-wrapper {
    background: #1a1a1a;
    border-color: rgba(165, 180, 252, 0.2);
}

.search-input-wrapper:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.2);
}

.searchInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 16px;
    color: #1f2937;
    outline: none;
}

body.night .searchInput {
    color: #e5e7eb;
}

.searchInput::placeholder {
    color: #9ca3af;
}

.btn-search {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-search:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.search-tags {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(79, 70, 229, 0.1);
}

.tags-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
}

.tags-header i {
    color: #f59e0b;
    font-size: 16px;
}

body.night .tags-header {
    color: #9ca3af;
}

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

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 20px;
    font-size: 14px;
    color: #4f46e5;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.tag-item:hover {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

body.night .tag-item {
    background: rgba(45, 47, 48, 0.8);
    border-color: rgba(165, 180, 252, 0.2);
    color: #a5b4fc;
}

body.night .tag-item:hover {
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .search-dropdown {
        top: 60px;
        left: 8px;
        right: 8px;
        border-radius: 16px;
        padding: 16px;
        max-height: calc(100vh - 80px);
    }
    
    .search-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .search-title {
        font-size: 16px;
    }
    
    .searchInput {
        padding: 10px 12px;
        font-size: 15px;
    }
    
    .btn-search {
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }
    
    .search-tags {
        margin-top: 20px;
        padding-top: 16px;
    }
    
    .tag-item {
        padding: 6px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-dropdown {
        top: 55px;
        left: 6px;
        right: 6px;
        padding: 14px;
        max-height: calc(100vh - 75px);
        border-radius: 14px;
    }
    
    .search-title {
        font-size: 15px;
    }
    
    .searchInput {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .btn-search {
        width: 40px;
        height: 40px;
    }
    
    .tag-item {
        padding: 5px 12px;
        font-size: 12px;
    }
    
    .tags-list {
        gap: 8px;
    }
}
