/* Global Search Bar */
.search-bar-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 8px 8px 8px 25px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-input-wrapper:focus-within {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    transform: translateY(-1px);
}

.search-input-wrapper input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: white !important;
    outline: none !important;
    font-size: 16px;
    padding: 5px 0;
}

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

/* Fix for browser autofill background */
.search-input-wrapper input:-webkit-autofill,
.search-input-wrapper input:-webkit-autofill:hover, 
.search-input-wrapper input:-webkit-autofill:focus, 
.search-input-wrapper input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0f1117 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.search-input-wrapper button {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 10px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-smooth);
    letter-spacing: 0.5px;
}

.search-input-wrapper button:hover {
    background: #9d4edd;
}

.mobile-icon {
    display: none !important;
}


/* Type Selectors */
.search-type-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    align-self: flex-start;
}

.type-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 6px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.type-btn:hover {
    color: white;
}

.type-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* Page Headers */
.search-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.search-page-header h1 {
    font-size: 32px;
    margin: 0;
    font-weight: 700;
}

/* Library Search Specifics */
.library-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.small-search {
    width: 200px;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 30px !important;
    padding: 2px 2px 2px 15px !important;
}

.small-search input {
    font-size: 13px !important;
}

/* Dropdown User Selector */
.theme-select {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid var(--glass-border);
    padding: 4px 12px;
    border-radius: 8px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px auto;
}

.theme-select option {
    background-color: var(--bg-dark);
    color: #ffffff;
    padding: 8px;
}

.mini-selector {
    padding: 2px !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.mini-selector .lib-type-btn {
    padding: 4px 10px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mini-selector .lib-type-btn.active {
    background: var(--accent-primary);
    color: white;
}

/* Responsiveness */
@media (max-width: 768px) {
    .search-bar-container {
        max-width: none;
        gap: 8px;
    }

    .search-input-wrapper {
        padding: 4px 4px 4px 15px;
    }

    .search-input-wrapper input {
        font-size: 14px;
    }

    .search-input-wrapper button {
        padding: 8px !important;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50% !important;
        flex-shrink: 0;
    }

    .desktop-text {
        display: none !important;
    }

    .mobile-icon {
        display: block !important;
    }


    .search-type-selector {
        width: 100%;
        overflow-x: auto;
        padding: 2px;
    }

    .type-btn {
        padding: 4px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .search-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }

    .search-page-header h1 {
        display: none;
    }

    .library-search-wrapper {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .small-search {
        width: 100% !important;
    }

    .mini-selector {
        width: 100%;
        justify-content: space-between;
    }
}
