/* --- SEARCH OVERLAY (👻 INVISIBLE GLASS EDITION 👻) --- */
.search-overlay {
    position: fixed; 
    inset: 0;
    /* Полная прозрачность фона сайта */
    background: transparent; 
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    
    z-index: 2500; 
    display: none; 
    flex-direction: column;
    
    /* Опускаем контент под челку iPhone */
    padding-top: calc(env(safe-area-inset-top) + 40px);
    overflow-x: hidden;
    /* Плавное появление самого оверлея */
    animation: fadeIn 0.2s ease-out;
}

.search-overlay.active { 
    display: flex; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- SEARCH HEADER --- */
.search-header { 
    padding: 20px 20px 40px 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 40px; 
}

/* Кнопка BACK (С точечным блюром) */
.search-header .back-btn {
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    border: 1.5px solid var(--neon-blue); 
    border-radius: 12px;
    padding: 8px 18px;
    color: #ffffff;
    display: flex; 
    align-items: center; 
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px; 
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3);
    transition: all 0.2s ease;
}

.search-header .back-btn:active { transform: scale(0.95); }
.search-header .back-btn ion-icon { font-size: 20px; color: var(--neon-blue); }

/* --- ПОЛЕ ВВОДА --- */
.search-input-wrapper {
    width: 100%; 
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px; 
    display: flex; 
    align-items: center; 
    padding: 0 18px; 
    height: 60px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--neon-blue);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 30px rgba(0, 204, 255, 0.4);
}

.search-icon-inner { 
    color: var(--neon-blue); 
    font-size: 24px; 
    margin-right: 12px;
}

#search-input { 
    flex: 1; 
    background: none; 
    border: none; 
    color: white; 
    font-size: 18px; 
    font-weight: 600;
    outline: none; 
    font-family: 'Montserrat', sans-serif;
}

#search-input::placeholder { 
    color: rgba(255, 255, 255, 0.4); 
}

.clear-btn { 
    background: rgba(255, 255, 255, 0.1); 
    border: none; 
    color: white; 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer;
}

/* --- РЕЗУЛЬТАТЫ --- */
.search-results { 
    flex: 1;
    padding: 10px 16px; 
    overflow-y: auto; 
    padding-bottom: 150px; 
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-results .app-card {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: resultAppear 0.3s ease-out;
}

@keyframes resultAppear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}